Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy Arbitrum goerli for usdc native #778

Merged
merged 69 commits into from
Jul 18, 2023

Conversation

cwang25
Copy link
Contributor

@cwang25 cwang25 commented Jul 12, 2023

This PR introduces the deployment for USDC Native on Arbitrum goerli as well as the proposal to initialize the market there.
This PR also rename existing usdc to usdc.e to distinguish from bridged usdc and native usdc

Put target chain to be hans/arbitrum-usdc/native since there are some relayMessage shared changes to interact with CCTP.

TODO:

  • deploy arbitrum native USDC instance
  • run market initialization proposal

README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@kevincheng96 kevincheng96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Let's deploy tomorrow 🚀

function getForkEnv(env: HardhatRuntimeEnvironment): HardhatRuntimeEnvironment {
const base = env.config.scenario.bases.find(b => b.name == env.network.name);
function getForkEnv(env: HardhatRuntimeEnvironment, deployment: string): HardhatRuntimeEnvironment {
const base = env.config.scenario.bases.find(b => b.network == env.network.name && b.deployment == deployment);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

cwang25 and others added 3 commits July 18, 2023 10:48
* migration scripts commits

* set supply and borrow speeds to be non zero

* add diff check

* add diff checker

* added comments on checks

* now scenario run is passing, but with the cost of removing linea's contract addresses from goerli/roots.json

* add linea back, but scenario run will fail. But it's not related to arbitrum-goerli

* Upgrade git action to use new seacrest (#782)

* upgrade git action to use new seacrest

* Fix unverified Linea Goerli contract issue (#787)

* addressed comments

* first initial working version of CCTP attestation script to help check with circle attestation status to mint native USDC to destination

* attestation script with sending txn on user behalf

* fix lint

* fix lint

* Modified migration from GitHub Actions

---------

Co-authored-by: Kevin Cheng <kevincheng96@hotmail.com>
Co-authored-by: GitHub Actions Bot <>
@cwang25 cwang25 changed the base branch from hans/arbitrum-usdc-native to main July 18, 2023 21:29
@cwang25 cwang25 changed the base branch from main to hans/arbitrum-usdc-native July 18, 2023 21:29
@cwang25 cwang25 merged commit 2bbbdab into hans/arbitrum-usdc-native Jul 18, 2023
28 of 37 checks passed
cwang25 added a commit that referenced this pull request Jul 20, 2023
* initial gen

* remove files

* rename directory

* add scenario

* upadte deploy script

* renamde to usdc.n

* added relations for scenario test

* add scenario test to CI

* add migration scrtips, but just changed the USDC reference address

* update migration script

* since it's native, we shouldn't need usdc bridge things in migration

* try to fix the liquidator scenario errors

* intent

* change those to be 0 initially

* FINALLY scneario passed :D

* don't re-deploy bulker

* set a number in configuration to make bulker tests pass

* set configuration to 0 supply cap for initialization, although it will fail the bulker test

* update liquidity pool to use the one with better liquidity

* after new pool use better liquidity, now able to bump up the volume

* remove v2 rewards config step, crank down borrowMin

* update migration description

* remove trailing newline

* ok need to referencing existing rewards in deploy script to share the rewards'

* naming changes

* added cctp contracts address to roots and update relayArbitrummessage

* add l2 cctp

* depositForBurn() to use CCTP to send native USDC to arbitrum comet

* finally relayArbitrum works with CCTP

* format

* update to turn off bridge market's reward speed

* fix scenarios and slightly reduced volume in liquidator scenarios (somehow during testing the pool the bot uses to flashloan have been withdrew and don't have full liquidity to cover tests

* now it has just enough liquidity to pass the test, reverted the liquidation scenario back to usual amount

* address comments: remove network prefixes, move contract import from deploy to migration scripts, move relay specific contracts to relay script

* remove network prefixes, and rename bridgeComet to usdceComet

* rename/refactor usdc -> usdc.e, and usdc.n -> usdc. Also rename deplyoment name for  to  and  to

* luckily by the time of testing now Jul 6th 1:40PM PST, we have enough liquidity in the uniswap USDC.e:USDC pool to cover the unchanged volume liquidation scenarios test

* rename usdc.n to usdc

* make yarn lint happy

* rename bridged version to .e to match with mainnet

* ported changes to testnet

* update on workflow

* hmm the error is gone

* change default supply reward speed on new comet to be 0

* move migration steps out of this branch

* add readme.md to corner cases when deploy new market on the chain with an existing market already

* add line

* removed USDC in relations

* update version to unblock deploy workerflow for now

* use dummy requested_network id

* try arbitrum goerli network id right away

* change a bit on how it locates the hardhat config base

* remove hardcoded network chain-id

* no more manual wallet project id input

* use env.GOV_NETWORK

* GOV_NETWORK got some errors :[

* try this seacrest with fixes

* try new seacrest :D

* Modified deployment roots from GitHub Actions

* Migrate Arbitrum Goerli Native usdc (#779)

* migration scripts commits

* set supply and borrow speeds to be non zero

* add diff check

* add diff checker

* added comments on checks

* now scenario run is passing, but with the cost of removing linea's contract addresses from goerli/roots.json

* add linea back, but scenario run will fail. But it's not related to arbitrum-goerli

* Upgrade git action to use new seacrest (#782)

* upgrade git action to use new seacrest

* Fix unverified Linea Goerli contract issue (#787)

* addressed comments

* first initial working version of CCTP attestation script to help check with circle attestation status to mint native USDC to destination

* attestation script with sending txn on user behalf

* fix lint

* fix lint

* Modified migration from GitHub Actions

---------

Co-authored-by: Kevin Cheng <kevincheng96@hotmail.com>
Co-authored-by: GitHub Actions Bot <>

* removed asdf config file that should've been ignored

* add native usdc whale for arbitrum goerli

---------

Co-authored-by: GitHub Actions Bot <>
Co-authored-by: Kevin Cheng <kevincheng96@hotmail.com>
kevincheng96 added a commit that referenced this pull request Jul 21, 2023
* Deploy Arbitrum goerli for usdc native (#778)

* initial gen

* remove files

* rename directory

* add scenario

* upadte deploy script

* renamde to usdc.n

* added relations for scenario test

* add scenario test to CI

* add migration scrtips, but just changed the USDC reference address

* update migration script

* since it's native, we shouldn't need usdc bridge things in migration

* try to fix the liquidator scenario errors

* intent

* change those to be 0 initially

* FINALLY scneario passed :D

* don't re-deploy bulker

* set a number in configuration to make bulker tests pass

* set configuration to 0 supply cap for initialization, although it will fail the bulker test

* update liquidity pool to use the one with better liquidity

* after new pool use better liquidity, now able to bump up the volume

* remove v2 rewards config step, crank down borrowMin

* update migration description

* remove trailing newline

* ok need to referencing existing rewards in deploy script to share the rewards'

* naming changes

* added cctp contracts address to roots and update relayArbitrummessage

* add l2 cctp

* depositForBurn() to use CCTP to send native USDC to arbitrum comet

* finally relayArbitrum works with CCTP

* format

* update to turn off bridge market's reward speed

* fix scenarios and slightly reduced volume in liquidator scenarios (somehow during testing the pool the bot uses to flashloan have been withdrew and don't have full liquidity to cover tests

* now it has just enough liquidity to pass the test, reverted the liquidation scenario back to usual amount

* address comments: remove network prefixes, move contract import from deploy to migration scripts, move relay specific contracts to relay script

* remove network prefixes, and rename bridgeComet to usdceComet

* rename/refactor usdc -> usdc.e, and usdc.n -> usdc. Also rename deplyoment name for  to  and  to

* luckily by the time of testing now Jul 6th 1:40PM PST, we have enough liquidity in the uniswap USDC.e:USDC pool to cover the unchanged volume liquidation scenarios test

* rename usdc.n to usdc

* make yarn lint happy

* rename bridged version to .e to match with mainnet

* ported changes to testnet

* update on workflow

* hmm the error is gone

* change default supply reward speed on new comet to be 0

* move migration steps out of this branch

* add readme.md to corner cases when deploy new market on the chain with an existing market already

* add line

* removed USDC in relations

* update version to unblock deploy workerflow for now

* use dummy requested_network id

* try arbitrum goerli network id right away

* change a bit on how it locates the hardhat config base

* remove hardcoded network chain-id

* no more manual wallet project id input

* use env.GOV_NETWORK

* GOV_NETWORK got some errors :[

* try this seacrest with fixes

* try new seacrest :D

* Modified deployment roots from GitHub Actions

* Migrate Arbitrum Goerli Native usdc (#779)

* migration scripts commits

* set supply and borrow speeds to be non zero

* add diff check

* add diff checker

* added comments on checks

* now scenario run is passing, but with the cost of removing linea's contract addresses from goerli/roots.json

* add linea back, but scenario run will fail. But it's not related to arbitrum-goerli

* Upgrade git action to use new seacrest (#782)

* upgrade git action to use new seacrest

* Fix unverified Linea Goerli contract issue (#787)

* addressed comments

* first initial working version of CCTP attestation script to help check with circle attestation status to mint native USDC to destination

* attestation script with sending txn on user behalf

* fix lint

* fix lint

* Modified migration from GitHub Actions

---------

Co-authored-by: Kevin Cheng <kevincheng96@hotmail.com>
Co-authored-by: GitHub Actions Bot <>

* removed asdf config file that should've been ignored

* add native usdc whale for arbitrum goerli

---------

Co-authored-by: GitHub Actions Bot <>
Co-authored-by: Kevin Cheng <kevincheng96@hotmail.com>

* revert some mixed up changes when extracted from #769

* fix name

* update reference path

* fix lint

* Update hardhat.config.ts

Co-authored-by: Kevin Cheng <kevincheng96@hotmail.com>

* Update hardhat.config.ts

Co-authored-by: Kevin Cheng <kevincheng96@hotmail.com>

* fix error

---------

Co-authored-by: Kevin Cheng <kevincheng96@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants