Skip to content

Commit

Permalink
chore: add deployment usdt
Browse files Browse the repository at this point in the history
  • Loading branch information
albert-llimos committed Mar 5, 2024
1 parent 8da820c commit 9f3fc99
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/deploy_contracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
StateChainGateway,
FLIP,
MockUSDC,
MockUSDT,
DeployerContract,
AddressChecker,
CFTester,
Expand All @@ -21,6 +22,7 @@
from deploy import (
deploy_Chainflip_contracts,
deploy_usdc_contract,
deploy_usdt_contract,
deploy_new_cfReceiver,
deploy_contracts_secondary_evm,
)
Expand Down Expand Up @@ -179,6 +181,11 @@ def deploy_optional_contracts(cf, addressDump):
cf.cfTester = deploy_new_cfReceiver(deployer, CFTester, cf.vault.address)
addressDump["CF_TESTER"] = cf.cfTester.address

# Keeping the order to not change the final addresses
if chain.id in [arb_localnet, eth_localnet, hardhat]:
cf.mockUSDT = deploy_usdt_contract(deployer, MockUSDT, cf_accs[0:10])
addressDump["USDT_ADDRESS"] = cf.mockUSDT.address


def display_common_deployment_params(chain_id, deployer, govKey, commKey, aggKey):
print(f" Chain: {chain_id}")
Expand Down Expand Up @@ -218,6 +225,8 @@ def display_deployed_contracts(cf):
# Contracts dependant on localnet/testnet/mainnet
if hasattr(cf, "mockUSDC"):
print(f" USDC: {cf.mockUSDC.address}")
if hasattr(cf, "mockUSDC"):
print(f" USDT: {cf.mockUSDT.address}")
if hasattr(cf, "cfTester"):
print(f" CFTester: {cf.cfTester.address}")

Expand Down
19 changes: 19 additions & 0 deletions tests/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,25 @@ def deploy_usdc_contract(deployer, MockUSDC, accounts):
return mockUsdc


# Deploy USDCT mock token
def deploy_usdt_contract(deployer, MockUSDT, accounts):
# Set the priority fee for all transactions and the required number of confirmations.
required_confs = transaction_params()

mockUsdt = MockUSDT.deploy(
"Tether USD",
"USDT",
INIT_USDC_SUPPLY,
{"from": deployer, "required_confs": required_confs},
)
# Distribute tokens to other accounts
for account in accounts:
if account != deployer and mockUsdt.balanceOf(deployer) >= INIT_USDC_ACCOUNT:
mockUsdt.transfer(account, INIT_USDC_ACCOUNT, {"from": deployer})

return mockUsdt


def deploy_addressHolder(
deployer,
AddressHolder,
Expand Down

0 comments on commit 9f3fc99

Please sign in to comment.