Skip to content

Commit

Permalink
Added upgradeMaster reset instructions.
Browse files Browse the repository at this point in the history
  • Loading branch information
miohtama committed Sep 2, 2017
1 parent 0d9e9ca commit aafd292
Showing 1 changed file with 68 additions and 3 deletions.
71 changes: 68 additions & 3 deletions docs/source/interact.rst
Original file line number Diff line number Diff line change
Expand Up @@ -750,9 +750,6 @@ Example:
print("OK")
Reset token name and symbol
===========================

Reset token name and symbol
===========================

Expand Down Expand Up @@ -807,6 +804,74 @@ Example:
print(crowdsale.call().weiRaised() / (10**18))
Reset token name and symbol
===========================

Update name and symbol info of a token. There are several reasons why this information might not be immutable, like trademark rules.

Example:

.. code-block:: python
import populus
from populus.utils.cli import request_account_unlock
from populus.utils.accounts import is_account_locked
from ico.utils import check_succesful_tx
from ico.utils import get_contract_by_name
p = populus.Project()
account = "0x" # Our controller account
with p.get_chain("mainnet") as chain:
web3 = chain.web3
Token = get_contract_by_name(chain, "CrowdsaleToken")
token = Token(address="0x")
if is_account_locked(web3, account):
request_account_unlock(chain, account, None)
txid = token.transact({"from": account}).setTokenInformation("Tokenizer", "TOKE")
print("TXID is", txid)
check_succesful_tx(web3, txid)
print("OK")
Reset upgrade master
====================

``upgradeMaster`` is the address who is allowed to set the upgrade path for the token. Originally it may be the deployment account, but you must likely want to move it to be the team multisig wallet.

Example:

.. code-block:: python
import populus
from populus.utils.cli import request_account_unlock
from populus.utils.accounts import is_account_locked
from ico.utils import check_succesful_tx
from ico.utils import get_contract_by_name
p = populus.Project()
account = "0x" # Our deployment account
team_multisig = "0x" # Gnosis wallet address
token_address = "0x" # Token contract address
with p.get_chain("mainnet") as chain:
web3 = chain.web3
Token = get_contract_by_name(chain, "CrowdsaleToken")
token = Token(address=token_address)
if is_account_locked(web3, account):
request_account_unlock(chain, account, None)
txid = token.transact({"from": account}).setUpgradeMaster(team_multisig)
print("TXID is", txid)
check_succesful_tx(web3, txid)
print("OK")
Participating presale
=====================

Expand Down

0 comments on commit aafd292

Please sign in to comment.