Skip to content

Set finalize agent

Victor Baranov edited this page Feb 2, 2018 · 10 revisions

What are we doing:

Sets finalizeAgent contract address as a finalize agent of the tier contract.

When should we do it:

You need to do this, if finalizeAgent property of the tier contract is empty.

Set finalize agent from MyEtherWallet

  1. Go to https://www.myetherwallet.com/#contracts

  2. Choose the network. For example, (ETH) Etherscan.io, if your contract is in mainnet.

  1. Attach to your crowdsale/tier contract: crowdsale/tier contract address and its ABI are taken from the file downloaded at step 4 of Token Wizard.

    • ABI of the contract is under the line ****Crowdsale contract ABI****

    Then click Access button.

  1. In Select a function combo choose setFinalizeAgent method

  1. In How would you like to access your wallet? choose any preferable option. If you chose MetaMask/Mist, click "Connect to Metamask".

  1. Fill addr input with the address of the finalize agent contract, that can be found in the file downloaded at step 4 of Token Wizard.

  2. Click Write.

  3. Choose 0 in Amount to Send. The Gas Limit will be calculated automatically. Click "Generate transaction".

  1. You'll see the transaction data. Click Yes, I am sure. Make transaction..

  1. Confirm transaction in MetaMask popup.

Set finalize agent by method signature

  1. Open MetaMask Chrome plugin

  2. Connect to the network, where the crowdsale contract is deployed. For example, mainnet.

  3. Choose an account, which is the owner of crowdsale. This account should has sufficient balance in this network too.

  4. Send transaction to the address of the crowdsale contract with the data = 0x19b667da + address_of_the_finalize_agent_contract, where

    • 0x19b667da - the method's signature
    • address_of_the_finalize_agent_contract - address of the finalize agent contract, normalized to 32 bytes (required number of zeros before address).

    For example, if you need to set finalize agent address 0x1be7505450bcd62b2001db8eefb9be1706db45c6 for tier, the data should be: 0x19b667da0000000000000000000000001be7505450bcd62b2001db8eefb9be1706db45c6. Amount to send should be 0.

Clone this wiki locally