def test_init(chain, token, beneficiary): sale = deploy_contract(chain, 'ViewlySeedSale', args=[token.address, beneficiary]) assert is_same_address(sale.call().viewToken(), token.address) assert sale.call().beneficiary() == beneficiary
def instance(chain: BaseChain, token: Contract) -> Contract: contract = deploy_contract(chain, contract_name, args=[token.address]) token.transact().setOwner(contract.address) return contract
def token(chain: BaseChain) -> Contract: """ The VIEW ERC-20 Token contract. """ return deploy_contract(chain, 'DSToken', args=['VIEW'])
def sale(chain: BaseChain, token: Contract, beneficiary) -> Contract: """ A blank ViewlySeedSale contract. """ args = [token.address, beneficiary] seed_sale = deploy_contract(chain, 'ViewlySeedSale', args=args) token.transact().setOwner(seed_sale.address) return seed_sale