def main(): """ $ brownie run deploy.py --network rinkeby :return: """ acct = accounts.load('flyer') Token.deploy("My Real Token", "RLT", 18, 1e28, {'from': acct})
def main(): deployer = accounts.load('deployer') lp_token = Token.deploy("Ellipsis.finance BUSD/USDC/USDT", "3EPS", 0, {"from": deployer}) fee_converter = FeeConverter.deploy({"from": deployer}) airdrop_distro = MerkleDistributor.deploy( deployer, "0x7EeAC6CDdbd1D0B8aF061742D41877D7F707289a", {'from': deployer}) coins = [ "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56", # busd "0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d", # usdc "0x55d398326f99059fF775485246999027B3197955" # usdt ] swap = StableSwap.deploy( deployer, coins, # coins, lp_token, 1500, # A 4000000, # fee 5000000000, # admin fee fee_converter, {"from": deployer}, ) lp_token.set_minter(swap, {"from": deployer}) initial_supply = TOTAL_SUPPLY // 5 + (5000 * 10**18) eps = Token.deploy("Ellipsis", "EPS", initial_supply, {"from": deployer}) cake = Contract('0x05ff2b0db69458a0750badebc4f9e13add608c7f') tx = cake.addLiquidityETH(eps, 5000 * 10**18, 5000 * 10**18, 10**18, deployer, 2000000000, {'from': deployer}) cakelp = tx.events['PairCreated']['pair'] per_period = [ int(i * 100000) * TOTAL_SUPPLY // 100000 for i in REWARD_AMOUNTS ] durations = [ REWARD_OFFSETS[i + 1] - REWARD_OFFSETS[i] for i in range(len(REWARD_OFFSETS) - 1) ] rewards_per_block = [ per_period[i] // durations[i] for i in range(len(durations)) ] + [0] offsets = [i + LAUNCH_OFFSET for i in REWARD_OFFSETS] lp_staker = LpTokenStaker.deploy(offsets, rewards_per_block, cakelp, {"from": deployer}) lp_staker.addPool(lp_token, 0, {'from': deployer}) eps_staker = MultiFeeDistribution.deploy(eps, [lp_staker, airdrop_distro], {"from": deployer}) eps_staker.addReward(coins[0], fee_converter, {'from': deployer}) lp_staker.setMinter(eps_staker, {"from": deployer}) eps.set_minter(eps_staker, {'from': deployer}) fee_converter.setFeeDistributor(eps_staker, {"from": deployer}) airdrop_distro.setMinter(eps_staker, {'from': deployer})
def main(): acct = accounts.load("AAVE") A = Token.deploy("Token A", "TOKA", 18, 0, {'from': acct}) B = Token.deploy("Token B", "TOKB", 18, 0, {'from': acct}) Stable = Token.deploy("Dai Stablecoin", "Dai", 18, 10000000000, {'from': acct}) man = Manager.deploy(A, B, Stable, 10, 0, {'from': acct}) A.transferPower(man, {'from': acct}) B.transferPower(man, {'from': acct})
def main(): A = Token.deploy("Token A", "TOKA", 18, 1e21, {'from': accounts[0]}) B = Token.deploy("Token B", "TOKB", 18, 1e21, {'from': accounts[0]}) man = Manager.deploy(A, B, 10, 0, {'from': accounts[0]}) # A=Token.deploy("Token A", "TOKA", 18, 1e21, {'from': accounts[0]}) # B=Token.deploy("Token B", "TOKB", 18, 1e21, {'from': accounts[0]}) # man=Manager.deploy(A, B, 10, 0,{'from': accounts[0]})
def test_transfer_adjusts_sender_balance(): token = Token.deploy("Test Token", "TST", 18, 10**21, {'from': accounts[0]}) balance = token.balanceOf(accounts[0]) token.transfer(accounts[1], 10**18, {'from': accounts[0]}) assert token.balanceOf(accounts[0]) == balance - 10**18
def main(): token = Token.deploy({'from': accounts[0]}) dao = Dao.deploy(token, {'from': accounts[0]}) for account in accounts: token.transfer(account, Wei('1 ether')) token.approve(dao.address, Wei('0.1 ether'), {'from': account}) dao.deposit(Wei('0.01 ether'), {'from': account}) print(len(Dao))
def main(): acct = accounts[0] token = Token.deploy("My Real Token", "RLT", 18, 1e28, {'from': acct}) curve = '0x93054188d876f558f4a66B2EF1d97d16eDf0895B' registry = '0xe80d347df1209a76dd9d2319d62912ba98c54ddd' wbtc = '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599' adapter = CurveExchangeAdapter.deploy(curve, registry, wbtc, acct, token, {'from': acct})
def main(): tk = Token.deploy("Test Token", "TST", 18, 1e21, {'from': accounts[0]}) ac0 = accounts[0] ac1 = accounts[1] ac2 = accounts[2] print(tk.balanceOf(ac0)) print(tk.balanceOf(ac1)) tk.transfer(ac1, 5000, {'from': ac0}) print(tk.balanceOf(ac0)) print(tk.balanceOf(ac1))
def main(): token = Token.deploy("Test Token", "TST", 18, 1e20, {'from': accounts[1]}) transfer = Transfer.deploy({"from": accounts[0]}) print(f"Gas used to deploy the contract {transfer.tx.gas_used}") print(f"------------------------------------------------------") t = accounts[0].transfer(transfer.address, 10**18) print(f"Gas used to pay ETH {t.gas_used}") print(f"------------------------------------------------------") t = transfer.transfer(ZERO_ADDRESS, accounts[1], 10**17, {'from': accounts[0]}) print(f"Gas used to pay ETH using the contract contract {t.gas_used}") print(f"------------------------------------------------------") t = transfer.transferAndDestruct(ZERO_ADDRESS, accounts[1], 10**17, {'from': accounts[0]}) print(f"Gas used to pay ETH by destoying the contract {t.gas_used}") print(f"------------------------------------------------------") # Token gas usage transfer = Transfer.deploy({"from": accounts[0]}) t = token.transfer(transfer.address, 10**18, {'from': accounts[1]}) print(f"Gas used to send ERC20 to a contract {t.gas_used}") print(f"------------------------------------------------------") t = transfer.transfer(token.address, accounts[1], 10**17, {'from': accounts[0]}) print(f"Gas used to send ERC20 using the contract {t.gas_used}") print(f"------------------------------------------------------") t = transfer.transferAndDestruct(token.address, accounts[1], 10**17, {'from': accounts[0]}) print(f"Gas used to send ERC20 by destoying the contract {t.gas_used}") print(f"------------------------------------------------------")
def token(): return Token.deploy("Test Token", "TST", 18, 10**21, {'from': accounts[0]})
def main(): acct = accounts.load('stg') return Token.deploy("Stegos", "STG", 6, 1e15, {'from': acct})
def test_transfer_fails_from_insufficient_balance(): token = Token.deploy("Test Token", "TST", 18, 10**21, {'from': accounts[0]}) with brownie.reverts("Insufficient balance"): token.transfer(accounts[2], 10**18, {'from': accounts[1]})
def main(): # return Token.deploy("Test Token", "TST", 18, 1e21, {'from': accounts[0]}) return Token.deploy("Test Token", "TST", 18, 100, {'from': accounts[0]})
def main(): acct = accounts.load("AAVE") return Token.deploy("Token A", "TOKA", 18, 1e21, {'from': acct})
def main(): return Token.deploy("Token B", "TOKB", 18, 1e21, {'from': accounts[0]})
def main(): accounts.load('metamask') return Token.deploy("Test Token", "TST", 18, 1e21, {'from': accounts[0]})
def main(): acct = accounts.load("metamask") return Token.deploy("Test Token", "TST", 18, 1e21, {'from': acct})
def main(): t = Token.deploy("Test Token", "TST", 18, 1e21, {'from': accounts[0]}) print('owner balance: ', t.balanceOf(accounts[0])) return t