Contract code for CryptoToons.
To run code locally, you need truffle
and ganache
. First start ganache:
ganache-cli --gasLimit 7000000
And then run truffle migrations that will publish contracts:
truffle migrate --compile-all --network dev --reset
Over here you can find nice tutorial how to publish contract to the Rinkeby network.
First of all, you need geth
installed. Secondly, truffle is configured to run transactions from 0x329fE1d35FFE409bA2E0DFFF99D57555CA656EB4
address. To change it modify truffle.js
file.
To run migrations, start geth
and unlock configured address:
geth --rinkeby --rpc --rpcapi db,eth,net,web3,personal --unlock="0x329fE1d35FFE409bA2E0DFFF99D57555CA656EB4"
Then, run migrations:
truffle migrate --network rinkeby
The least pro way to upload the contract, but the fastest if you don't have the environment setup on your computer.
- Got to https://remix.ethereum.org/
- Add the all the code in one file (
dl
directory). - Compile using the compiler version from the code.
- Log in to the injected Web3 provider (MetaMask)
- Deploy
CryptoToon.sol
contract to the main network as visible on the screenshot. The null address it0x0000000000000000000000000000000000000000
. - Verify the contract code. If the code is unchanged etherscan seems to auto-verify the contract based on previously existing toons contracts.
- Use
addToonContract
to register newly created toon on the auction contract (0xaaa688ac2755cb6a27d123a0300bcf793c9ed019) - 🎉 Earn money 💰