---
# System prepended metadata

title: Deploying a Cross Chain Application

---

# Deploying a Cross Chain Application

Instructions below for deploying all the components, if you want to do it manually:
### Components

- XChainHub:
    - (R) Src 
    - (R) Dest

- XChainStrategy?
    - (R) Src
    - Dest

- Vault:
    - (R) Src
    - (R) Dst

- Vault Auth:
    - (R) Src
    - (R) Src

- Token:
    - (R) Src
    - (R) Src

- Dependencies (these must be present on the src and dst chains):
    - Stargate
    - LayerZero

Ordering:
- (Factory)
- Auth
- Vault
- XHub
- XStrategy

# Order of Execution
1. Deploy the contracts & link them
2. Trust:
    2.1 The strategy on the Vault `trustStrategy`
    2.2 Vault on the hub `setTrustedVault`

3. MerkleRoot
    3.1 Open (No permissions)
    3.2 Restricted
    4.
4. Set trustedRemote for the LayerZero Application on the dst chainId
5. User deposit into origin (src) vault
6. (As Admin) call deposit into Strategy
7. (As XChainStrategy manager or strategist) call deposit assets to Chain, `hub::depositToChain`
8. (Call swap) - tokens should appear on target/dst chain (query the USDC balance of the strategy)


# Test #1 Params

> **These are Test Net Addresses**
 

Source chain: **Optimism Kovan**
Faucet: https://faucet.paradigm.xyz/
Add network: https://chainlist.org/chain/69
Blockexplorer: https://testnet.ftmscan.com/
LayerZero ChainId: 10011
LzEndpoint: 0x72aB53a133b27Fa428ca7Dc263080807AfEc91b5
Stargate: 0xCC68641528B948642bDE1729805d6cf1DECB0B00
USDC: 0x567f39d9e6d02078F357658f498F80eF087059aa

Destination chain: **Arbitrum Rinkeby**
Faucet: n/a
Add network: https://chainlist.org/chain/421611
BlockExplorer: https://testnet.arbiscan.io/
LayerZero ChainId: 10010
LzEndpoint: 0x4D747149A57923Beb89f22E6B7B97f7D8c087A00
Stargate: 0x6701D9802aDF674E524053bd44AA83ef253efc41
USDC: 0x1EA8Fb2F671620767f41559b663b86B1365BBc3d

Mumbai
USDC: 0x742DfA5Aa70a8212857966D491D67B09Ce7D6ec7
Stargate: 0x817436a076060D158204d955E5403b6Ed0A5fac0
LayerZero: 0xf69186dfBa60DdB133E91E9A4B5673624293d8F8

Fantom Test:
LayerZero: 0x7dcAD72640F835B0FA36EFD3D6d3ec902C7E5acf
Stargate: 0xa73b0a56B29aD790595763e71505FCa2c1abb77f
USDC: 0x076488D244A73DA4Fa843f5A8Cd91F655CA81a1e

Factory:0xFA0299ef90F0351918eCdc8f091053335DCfb8c9
Implementation: 0x69b8C988b17BD77Bb56BEe902b7aB7E64F262F35
Auth: 0x1869691b28756Ad1556de08b82Fd56339248F03b
Vault Proxy: 0x5545720918e64e86c03a691c056afdc727922fe5
    
Hub: 0xe6489a6a6d85e5bcc2ce0f64bf76ca073892e344
Strat: 0xf1ba69aae1405f2d5f562fc9e9f5e4b5fb887ab8





## Deployed Contracts 2022-07-13

Address of the governor: 0x63BCe354DBA7d6270Cb34dAA46B869892AbB3A79

Gov -> Vault: 0xf2c520adcaac89d853521746d3e7906e8e049bf6f68da952523ee2ad9d54a795

Vault -> Strat: 0x02484e85581f02184a8c760d1f090953e5285218acc935dee646330a444eb890

Trust on Arb: 
0x4b7663dee45362845364e5d69aa144c7ec9638f1a22a106d10f710a6773bec81

**Arbitrum Rinkeby**

VaultFactory: 0x316b07B6d104dd06857B3A4D7C8B0b4C5774EFBa
Auth: 0x999C7c3dA9d2aA6427C81E82570B5382E3bC0b29
Vault Impl: 0x7CC220f764BE18A4b1ecFF78305a386ED400344B
Vault Proxy: 0x9053dfb5f286ef3f885f1f55cdec8eb85834655c 
XChainHub: 0x20dc84d2f4add06031a728f73e8adda04082ab73
XChainStrategy: 0x0eb222c4e1af1894dc46b816313aee379f53be79

**Kovan Optimism**
VaultFactory: 
Auth 
Vault Impl 
Vault Proxy 
XChainHub: 
XChainStrategy: 

**FTM TEST**
XChainHub: 0xbb7c441447a615b290547aa5036cc463a5c8146b
XChainStrategy: 


Logs:
https://pastebin.com/xYPqD5rD







Tx ID for 12:51 EST Optimism => Aribtrum Tx:
0x7aa67d6299ee1d5147bf61934c34e52fa4acbe257c477151eab3493b46ef4719



#######################################################################
OLD Deployed Contracts:

Address of the governor: 0x63BCe354DBA7d6270Cb34dAA46B869892AbB3A79

**Kovan Optimism**
VaultFactory: 0x38733E49727839a06e1Ef37B67b24beF82Ef906a
Auth 0x55be265EF1C89867724228522E75c7eb72eCf969
Vault Impl 0x4fCC9951BB19AaCd34a8dbC1eDF616E297e52228
Vault Proxy 0xaf29ba76af7ef547b867eba712a776c61b40ed02
XChainHub: 0x68d5e0e257541180f60273c5e44a179c12ae9280
XChainStrategy: 0xbe053dd370fab739485d82ddd616e8f40d8f605a

13 Jul
XChainHub: 0x348a6f9c19e381b3ae9b6f4e1e91b10995b773d2
XChainStrategy: 0x7bb5b6ea2d37034f6e88048b4670f6c9cf497347


**Aribtrum Rinkeby**
VaultFactory: 0xB3B3b80828b4f30DdB338D768D19191e918D730C
VaultImpl: 0xBa384B4E92952061612436e39E0871D26605413c
Auth: 0x999C7c3dA9d2aA6427C81E82570B5382E3bC0b29
VaultProxy: 0x2e05590c1b24469eaef2b29c6c7109b507ec2544
XChainHub: 0xfa0299ef90f0351918ecdc8f091053335dcfb8c9
XChainStrategy: 0x69b8c988b17bd77bb56bee902b7ab7e64f262f35

13 Jul
XChainHub: 0x1869691b28756ad1556de08b82fd56339248f03b
XChainStrategy: 0xcc2604910241b2f9caab85d3cb19ffc5422979de




# Random notes

Add network to brownie
`brownie networks add Optimism koptimism host=https://kovan.optimism.io/ chainid=69`


Whenever we deploy via factory we need to manually verify on Etherscan with "Is this a proxy?"


## New
Optimist XChainHub:: 0x5417b42215921b129aa13a2a54661b6b0e4f87fe
Optimist XChainStrategy: 0xdE3D13189F8ea601868402E9071d21c6544B8be3

I think we should make a registry for chains