You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
pragmasolidity^0.5.0;contractTether{stringpublicname='Tether';stringpublicsymbol='USDT';uint256publictotalSupply=1000000000000000000000000;//1 million supply tokensuint8publicdecimals=18;eventTransfer(addressindexed_from,addressindexed_to,uint_value,);eventApproval(addressindexed_owner,addressindexed_spender,uint_value,);mapping(address=>uint256)publicbalanceOf;mapping(address=>mapping(address=>uint256))publicallowance;constructor()public{balanceOf[msg.sender]=totalSupply;}functiontransfer(address_to,uint256_value)publicreturns(boolsuccess){require(balanceOf[msg.sender]>=_value);balanceOf[msg.sender]=balanceOf[msg.sender]-value;balanceOf[_to]=balanceOf[_to]+_value;emitTransfer(msg.sender,_to,_value);returntrue;}functionapprove(address_spender,uint256_value)publicreturns(boolsuccess){allowance[msg.sender][_spender]=_value;emitApproval(msg.sender,_spender,_value);returntrue;}functiontransferFrom(address_from,address_to,uint256_value)publicreturns(boolsuccess){require(_value<=balanceOf[_from]);require(_value<=allowance[_from][msg.sender]);balanceOf[_to]+=_value;balanceOf[_from]-=_value;allowance[msg.sender][_from]-=_value;emitTransfer(_from,_to,_value);returntrue;}}
RWD:
pragmasolidity^0.5.0;contractRWD{stringpublicname='Reward Token';stringpublicsymbol='RWD';uint256publictotalSupply=1000000000000000000000000;//1 million supply tokensuint8publicdecimals=18;eventTransfer(addressindexed_from,addressindexed_to,uint_value,);eventApproval(addressindexed_owner,addressindexed_spender,uint_value,);mapping(address=>uint256)publicbalanceOf;mapping(address=>mapping(address=>uint256))publicallowance;constructor()public{balanceOf[msg.sender]=totalSupply;}functiontransfer(address_to,uint256_value)publicreturns(boolsuccess){require(balanceOf[msg.sender]>=_value);balanceOf[msg.sender]=balanceOf[msg.sender]-value;balanceOf[_to]=balanceOf[_to]+_value;emitTransfer(msg.sender,_to,_value);returntrue;}functionapprove(address_spender,uint256_value)publicreturns(boolsuccess){allowance[msg.sender][_spender]=_value;emitApproval(msg.sender,_spender,_value);returntrue;}functiontransferFrom(address_from,address_to,uint256_value)publicreturns(boolsuccess){require(_value<=balanceOf[_from]);require(_value<=allowance[_from][msg.sender]);balanceOf[_to]+=_value;balanceOf[_from]-=_value;allowance[msg.sender][_from]-=_value;emitTransfer(_from,_to,_value);returntrue;}}
error : ReferenceError: artifacts is not definedReferenceError: artifacts is not defined at Object.<anonymous> (/Users/cleogao/Documents/solidity/defi-staking-app-starter/defi-staking-app-starter/migrations/1_initial_migration.js:1:20) at Module._compile (node:internal/modules/cjs/loader:1105:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at /Users/cleogao/.npm/_npx/c7b5aae036bba223/node_modules/migrate/lib/load-migrations.js:44:17 at Array.map (<anonymous>) at /Users/cleogao/.npm/_npx/c7b5aae036bba223/node_modules/migrate/lib/load-migrations.js:40:30
Hi @CleoPatra2772, you are using an outdated Truffle version. Can you upgrade and see if it resolves your issue? To upgrade: npm -g uninstall truffle && npm -g install truffle. Thanks!
Hi @CleoPatra2772, you are using an outdated Truffle version. Can you upgrade and see if it resolves your issue? To upgrade: npm -g uninstall truffle && npm -g install truffle. Thanks!
Issue
Trying to deploy my contracts, but gets
ReferenceError: artifacts is not defined
Steps to Reproduce
Here is what it looks like :
What each contract looks like --
Tether:
RWD:
DecentralBank:
This is inital_migrations
Actual Results
Environment
node --version
): v16.16.0npm --version
):Solidity - ^0.5.0 (solc-js)
The text was updated successfully, but these errors were encountered: