/tdl-tolopry

Primary LanguageSolidity

tdl-tolopry

Remix

Upload the repository code into a new Remix Workspace.

Deploy the ToLoPryCoin contract with some ether/gwei/wei (1 ether, for example)

Deploy the NFTPrize

Deploy the Blackjack contract with both ToLoPryCoin and NFTPrize addresses as parameters

Call ToLoPryCoin.setOperator with the address of the Blackjack contract, to allow the Blackjack claiming tokens.

Call NFTPrize.setAllowedMinter with the address of the Blackjack contractm to allow the Blackjack contract minting NFTs.

Note: Keep the same account for all the deployments/transactions, since it will be the owner of the contracts.

Truffle+Ganache (In progress...)

Install Node.js

npm install -g truffle

chmod a+x ganache-2.7.1-x86_64.AppImage

./ganache-2.7.1-x86_64.AppImage

Deploying locally

  • ./ganache-2.7.1-linux-x86_64.AppImage (on the folder where downloaded)
  • truffle compile
  • trufle migrate (keep the ToLoPry coin contract address at hand)

Interacting with the contracts

  • with Ganache running and the contracts deployed:
  • truffle console
  • let instance = await ToLoPryCoin.deployed()
  • let accounts = await web3.eth.getAccounts()
  • instance.name()
  • instance.balanceOf(accounts[0])

Reference: