This post is from a low-reputation account and contains an unverified outbound link. Be cautious before clicking external links.

Ethercraft your own corn helmet

Words
372
Reading
2 min
Listen
Play
9y

helmet.png

This process is needed only for betatest and probably after crafting will be released that article will not make much sense, but before it happen there’s a lot of similar questions on a Discord channel and I hope this guide will help.

It is two step process, first one — approval, should be done only once per account, the second is actual crafting.

Approval

You should go to a https://www.myetherwallet.com/#contracts, and see something like this.
Screen Shot 2018-02-03 at 21.17.25.png

Contract Address should be set to a corn contract: 0xac21cccde31280257784f02f7201465754e96b0b and ABI to a copy of that: https://raw.githubusercontent.com/district0x/district0x-network-token/master/resources/public/contracts/build/ERC20.abi.

[{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"who","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"value","type":"uint256"},{"name":"extraData","type":"bytes"}],"name":"approveAndCall","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"}]

After this changes our browser window should look like this:
Screen Shot 2018-02-03 at 21.22.12.png

Push the Access! We should see a new panel below:
Screen Shot 2018-02-03 at 21.23.33.png

Selecting approve function in a selectbox:
Screen Shot 2018-02-03 at 21.28.17.png

Now we should set arguments for approve function call, spender to a 0xabf9027e49ab11fbd9f749371386c44cf322f803 (crafting contract) and value to 999999999000000000000000000.
Screen Shot 2018-02-03 at 21.33.59.png

After we fill a form and we are not logged in to a MEW we will see a new panel:
Screen Shot 2018-02-03 at 21.35.16.png

We have to choose MetaMask and then we will see:
Screen Shot 2018-02-03 at 21.37.47.png

Clicking Connect to MetaMask and then WRITE! Our next step is:
Screen Shot 2018-02-03 at 21.39.28.png

After we press Generate Transcation we will see:
Screen Shot 2018-02-03 at 21.40.25.png

Yes, we are sure! After we confirm, MetaMask should appear.
Screen Shot 2018-02-03 at 21.41.24.png

After we submit we have to wait until our transaction is processed.
Screen Shot 2018-02-03 at 21.43.34.png

By pushing on this record we will go to etherscan.io, my looks like this:
Screen Shot 2018-02-03 at 21.47.10.png

Important part here is TxReceipt Status should be Success.

When it is done, we finally can start crafting!

Crafting

For a second step we are going to https://www.myetherwallet.com/#contracts again, but this time we enter 0xabf9027e49ab11fbd9f749371386c44cf322f803 to a Contract Address and

  [
    {
      "constant": false,
      "inputs": [
        {
          "name": "count",
          "type": "uint256"
        }
      ],
      "name": "craftCraftable",
      "outputs": [],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ]

to ABI.
Screen Shot 2018-02-03 at 21.49.45.png

Hit the Access.
Screen Shot 2018-02-03 at 21.50.31.png

  • select craftCraftable in selectbox
  • put amount of corn helmets you wish to craft, remember each helmet takes 3 corns
  • choose MetaMask
  • press Connect To MetaMask
  • press WRITE
  • press Generate Transcation
  • Yes, we are sure!
  • Confirm transaction in MetaMask

We just have to wait when transaction is processes and we are done! For now helmet will not be visible on a website in inventory but we can check it on ethplorer.io, you just have to enter you wallet address there and it will show you all tokens you have:
Screen Shot 2018-02-03 at 21.57.07.png

We can clearly see that there were 3 corns withdraw and 1 helmet added.

If you found that guide helpful you can tip me some ETH: 0x78084D2e1999936e36344DFfCDe30457b5333eE8.

Ethercraft your own corn helmet | Ecency