asset
.
contracts
directory of the Embark project.
AssetTokenized.sol
file in the contracts
directory:
config
.
contracts.js
with the following configuration:
//root/.ethereum/keystore/...
— the location of the keystore filechainstack
— the argument from the configuration file contracts.js
This will deploy the contract on Sepolia.
<http://localhost:55555/explorer/contracts/CONTRACT_NAME>
where CONTRACT_NAME — the name of your contract. In this tutorial, the path is <http://localhost:55555/explorer/contracts/AssetTokenized>
.
This will also display the contract address in the Deployed at
line.
Test the contract by calling:
supply()
— to check the remaining supply of tokens on the contract.check()
— to check the amount of tokens owned by the Ethereum address you are using to call the contract.pricePerEth()
— to check the token price in wei.supply()
and check()
after a few seconds to see a change in values returned.