npm i -g truffle
///npm install
truffle test
truffle compile
node scripts/generateKeypair.js --dest=<fileLocation> --mnemonicdest=<fileLocation>
This stores encrypted wallets at the destination
Replace these lines:
owner1 = 0x1111222233334444555566667777888899991111;
owner2 = 0x1111222233334444555566667777888899992222;
owner3 = 0x1111222233334444555566667777888899993333;
truffle migrate --network=ropsten --reset
Note the contracts address. Upon completion, this will save the contract's ABIs to the deployments directory.
https://etherscan.io/address/<tokenaddress>
and
https://etherscan.io/token/<tokenaddress>
git add deployments/<networkid>-<tokenaddress> // location given above after deployment/migration script
git commit
git push
truffle exec scripts/getMintingNonce.js --network=ropsten --tokenaddr=<tokenaddress>
node scripts/signMintingMessage.js --keyfile=<fileLocation> --nonce=0 --amount=1000000
node scripts/signMintingMessage.js --keyfile=<fileLocation> --nonce=0 --amount=1000000
node scripts/signMintingMessage.js --keyfile=<fileLocation> --nonce=0 --amount=1000000
truffle exec scripts/getETHNonce.js --network=ropsten --addr=<address>
truffle exec scripts/mint.js --ethnonce=0 --network=ropsten --keyfile=<fileLocation> --tokenaddr=<tokenaddress> --message=00000000000000000000000000000000000000000000000000000000001e8492 --sig1=68da7fa5f00a9f2773ccce59f080d2938a72d71811119ed33bd9afcba05976d3619a8356ab59c1fbb147faf1e77b42831a772b767ff57e71079a7dc45eacf5d71c --sig2=a1b21dce1cde8ab2384a0943d610712baa33a51b9a153df7452962ffa691922021eb0c77993fc901577c5b0dcb57576890bf063dcbb8a0b0d9cbdd90a51b6d7f1b --sig3=6f4fdc2ca9c160e3585f8f850ea0fa2ada1604d6bb984fe41a522b01bd49dcfb5435fc74e70e8e19f7005b8caee4f80e8296c942ade66002d6c20e089d0dcc3c1b
truffle exec scripts/getABI.js --network=ropsten --tokenaddr=<tokenaddress> | xclip -selection clipboard -i
truffle exec scripts/transferToken.js --network=ropsten --keyfile=<fileLocation> --tokenaddr=<tokenaddress> --to=<destination> --amount=<amount> --gasprice=<gaspriceinwei>
truffle exec scripts/transferEth.js --network=ropsten --keyfile=<fileLocation> --tokenaddr=<tokenaddress> --to=<destination> --amount=<amount> --gasprice=<gaspriceinwei>
truffle exec scripts/getBalance.js --network=ropsten --tokenaddr=<tokenaddress> --addr=<holderaddress>
node scripts/mintRaw.js --network=ropsten --gasprice=3000000000 --ethnonce=42 --keyfile=<fileLocation> --tokenaddr=<tokenaddress> --message=00000000000000000000000000000002000000000000d3c21bcecceda1000000 --sig1=4b1f413c0d979508a59848f1559feddd051ab5fb5f50253c0d11cf317e85fb4732e8a2c62b52c70f53fd7469f14192dd7bc4f25f5635a00adc7626b6e22cf2b11c --sig2=28243920df7e5f0674cf092fcc70afbcad2502d498c3e867be74ec0ff3ec03526dc1976ec14ef1d8fb1dd99d247fcfdc37103a0da3faae3743dc7b662b2b54d61b --sig3=689ff414ce044ee4c4a58a5e0880b2ec3c9bc66ffd9fdde89c7f9a1cd031119f733349da5727949c3f5bda958b7f20dae236f6d829b74093535551a4f5dfa1431b
Then
truffle exec scripts/sendRaw.js --network=ropsten --serializedtx='{"type":"Buffer","data":[249,1,171,41,133,4,169,228,203,16,131,12,53,0,148,209,59,190,172,99,229,165,228,41,156,220,168,52,50,100,210
,97,233,234,39,128,185,1,68,14,118,199,160,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,84,180,11,31,133,43,218,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,43,255,133,44,38,250,51,238,60,109,244,105,24,225,80,139,108,84,12,29,23
2,142,208,52,226,127,138,160,64,144,205,0,9,165,126,114,30,141,58,62,7,75,183,32,248,254,206,173,37,145,130,161,90,232,105,235,214,238,80,123,131,87,60,102,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,156,232,57,7,183,162,179,241,68,5
1,233,13,3,131,11,238,171,37,173,184,63,221,37,162,16,67,36,80,115,1,150,73,45,227,177,87,154,22,241,78,8,200,47,194,143,123,11,72,96,244,59,131,18,28,9,57,187,72,164,149,134,116,146,149,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,12
9,108,8,192,78,37,6,117,98,176,14,163,11,95,138,24,174,213,89,182,130,242,9,144,55,186,25,226,155,7,213,237,41,221,131,231,67,185,119,60,153,87,144,111,96,61,17,174,12,1,235,52,166,83,54,228,181,21,121,191,104,241,201,99,41,160,196,167,86,89,253,124,23,1
16,169,127,31,131,74,84,8,216,130,157,54,62,218,94,49,41,90,78,193,234,146,103,37,242,160,112,91,51,202,248,192,25,203,164,183,210,42,171,136,126,93,0,50,255,122,247,242,114,196,204,158,113,91,162,146,104,11]}'
Truffle creates addresses for your use for each network. Account 1 will need to be funded before deploying on mainnet.
truffle exec scripts/getTruffleAccount.js --network=ropsten
(you could also just cat the file)
node scripts/getAddress.js --keyfile=<fileLocation>
Can also take a private key, useful for development/testing:
node scripts/getAddress.js --privkey=<key>
node scripts/getPrivateKey.js --keyfile=<fileLocation>
or, to get keys from truffle account[0],
truffle exec scripts/getTrufflePrivateKey.js --network=ropsten
truffle exec scripts/getTotalSupply.js --network=ropsten --tokenaddr=d13Bbeac63E5A5E4299CdCa8343264D261E9eA27