def deployUSDTFaucet(w3, contracts): account = w3.eth.defaultAccount if not os.path.isfile('args.json'): print('No args file') return with open('args.json', 'r') as f: args = json.load(f) usdt_faucet = deploy_contract(w3, contracts['USDTFaucet'], *args['USDTFaucet']) print(f'USDT faucet deployed at address: {usdt_faucet.address}') return usdt_faucet.address # setup w3, admin = connect('bsc-mainnet', 'admin') contracts = get_contracts(w3) deployed_contract_address = deployUSDTFaucet(w3, contracts) print(deployed_contract_address) # coin address on bsc-mainnet coin = connect_contract(w3, contracts['Coin'], '0x6e71C530bAdEB04b95C64a8ca61fe0b946A94525') set_token_whitelist(w3, coin, deployed_contract_address["USDTFaucet"], True)
# This is a helper file to test breach functionality on Python console from mettalex_contract_setup import connect, deploy, full_setup, deposit, earn, BalanceReporter, connect_deployed, withdraw, deploy_contract, get_contracts, whitelist_vault # from setup_testnet_pool import get_spot_price import os import sys os.chdir('price-leveraged-token/market-maker/on-chain') sys.path.append(os.getcwd()) w3, admin = connect('local', 'admin') contracts = get_contracts(w3, 2) deployed_contracts = deploy(w3, contracts) w3, acc, deployed_contracts = full_setup(w3, admin, deployed_contracts=deployed_contracts, price=2500) # w3, contracts = connect_deployed() y_vault = deployed_contracts['YVault'] coin = deployed_contracts['Coin'] ltk = deployed_contracts['Long'] stk = deployed_contracts['Short'] # Existing Flow reporter = BalanceReporter(w3, coin, ltk, stk, y_vault) balancer = deployed_contracts['BPool'] strategy = deployed_contracts['PoolController'] y_controller = deployed_contracts['YController'] deposit(w3, y_vault, coin, 200000) earn(w3, y_vault)