Skip to content

Change rate

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

If the tier in the crowdsale campaign, created by Token Wizard, is updatable and crowdsale is not started yet, you are able to change the rate of it.

Change rate from the Manage crowdsale page

  1. Go to the manage crowdsale page for your crowdsales (see instructions here)

  2. If the tier you want to modify is updatable, you'll be able to modify the input with the rate.

  3. After changing the rate, click the Save button and confirm the transaction.

Change rate 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 a pricing strategy contract data (i.e. its address and ABI) to your tier. The pricing strategy contract address and ABI are taken from the file downloaded at Step 4 of Token Wizard:

    • The address of the pricing strategy contract for the tier is at this line: Pricing strategy contract address for [tier name] in the file.
    • ABI of the pricing strategy contract is under this line: Pricing strategy contract ABI: in the file.

    Then click Access button.

  1. In Select a function combo choose updateRate method

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

  1. Fill newOneTokenInWei input with the price of one token in wei. For example, if you need to set rate = 1000 (1000 tokens per 1 ETH), then price for 1 token = 10^15 wei = 1000000000000000

  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.

Change rate from MetaMask 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 have sufficient balance in this network too.

  4. Send transaction to the address of the pricingStrategy contract with the data = 0x69ea1771 + hex(one_token_in_wei).

    where hex(one_token_in_wei) - hexademical representation of 1 token price in wei, normalized to 32 bytes (required number of zeros before hex).

    For example, if you need to set rate = 1000 (1000 tokens per 1 ETH), then price for 1 token = 10^15 wei = 1000000000000000. Hex from it will be 38d7ea4c68000, and normalized to bytes32: 00000000000000000000000000000000000000000000000000038d7ea4c68000. Finally, the data should be: 0x69ea177100000000000000000000000000000000000000000000000000038d7ea4c68000. Amount to send should be 0.

Clone this wiki locally