Skip to content

Commit

Permalink
Move to src (#13)
Browse files Browse the repository at this point in the history
* move config to src dir

* add --accept for bridge register

* move to outputs dir

* include rpcnode

* use helixconf

* fix types for helixconf

* test safe

* Bump helixconf and disable fill rpc for configure

* fix issue

* make decimal for deposit

* Update scroll gas

* update gas for gnosis

* update gas for gnosis

* make zero gas for gnosis

* different symbol for register

* default safeTxGas 0

* fix token issue

* std lock name

* fix float to bigint

* fix float to bigint

* enable feature for all register

* write lock

* fix ensure lock

* fix ensure lock
  • Loading branch information
fewensa authored Sep 25, 2024
1 parent 8c07858 commit 7c1dc35
Show file tree
Hide file tree
Showing 32 changed files with 776 additions and 2,358 deletions.
83 changes: 0 additions & 83 deletions examples/bridges.testnet.yml

This file was deleted.

This file was deleted.

This file was deleted.

19 changes: 0 additions & 19 deletions examples/lock/lnv3__usdc__arbitrum-sepolia_sepolia.lock.json

This file was deleted.

19 changes: 0 additions & 19 deletions examples/lock/lnv3__usdc__sepolia_arbitrum-sepolia.lock.json

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
"relayGasLimit": 600000,
"rpcnodes": [
{
"name": "sepolia",
"name": "arbitrum-sepolia",
"fixedGasPrice": 10,
"rpc": "https://ethereum-sepolia-rpc.publicnode.com"
"rpc": "https://public.stackup.sh/api/v1/node/arbitrum-sepolia"
},
{
"name": "arbitrum-sepolia",
"rpc": "https://arbitrum-sepolia.blockpi.network/v1/rpc/public"
"name": "sepolia",
"fixedGasPrice": 10,
"rpc": "https://ethereum-sepolia-rpc.publicnode.com"
}
],
"bridges": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"register": {
"bridge": "sepolia->arbitrum-sepolia",
"symbol": "usdc",
"type": "lnv2-default",
"baseFee": 10,
"liquidityFeeRate": 0.1,
"deposit": 1000,
"approve": 10000000000000,
"safeWalletAddress": "0x086962e147c82C037872fa87523faa139D38ee61",
"sourceSafeWalletUrl": "https://safe-transaction-sepolia.safe.global/api",
"targetSafeWalletUrl": "https://safe-transaction-arbitrum-sepolia.safe.global/api"
},
"hash": {
"origin": "1000000000000010sepolia->arbitrum-sepolia10000.10x086962e147c82c037872fa87523faa139d38ee61https://safe-transaction-sepolia.safe.global/apiusdchttps://safe-transaction-arbitrum-sepolia.safe.global/apilnv2-default",
"hash": "8e5b37ff70987ed881d121f9b0d9049d58cbf0c82fb2ec39aad68f1970931767"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"register": {
"bridge": "arbitrum-sepolia->sepolia",
"symbol": "usdc",
"type": "lnv2-opposite",
"baseFee": 10,
"liquidityFeeRate": 0.1,
"deposit": 1000,
"approve": 10000000000000
},
"hash": {
"origin": "1000000000000010arbitrum-sepolia->sepolia10000.1usdclnv2-opposite",
"hash": "ac8ccf6837bc742cdd84269ecf0d81ab66c58db681a8db2e266d084238898f4d"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"register": {
"bridge": "arbitrum-sepolia->sepolia",
"symbol": "usdc",
"type": "lnv3",
"baseFee": 10,
"liquidityFeeRate": 0.2,
"transferLimit": 1000,
"deposit": 1000,
"approve": 10000000000000
},
"hash": {
"origin": "1000000000000010arbitrum-sepolia->sepolia10000.2usdc1000lnv3",
"hash": "b2269ba0eb15e3e3e41a34b55b8a2205a20e67fee023d3c1ea9f567ab490a0ab"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"register": {
"bridge": "sepolia->arbitrum-sepolia",
"symbol": "usdc",
"type": "lnv3",
"baseFee": 10,
"liquidityFeeRate": 0.1,
"transferLimit": 100000,
"deposit": 1000,
"approve": 10000000000000,
"safeWalletAddress": "0x086962e147c82C037872fa87523faa139D38ee61",
"sourceSafeWalletUrl": "https://safe-transaction-sepolia.safe.global/api"
},
"hash": {
"origin": "1000000000000010sepolia->arbitrum-sepolia10000.10x086962e147c82c037872fa87523faa139d38ee61https://safe-transaction-sepolia.safe.global/apiusdc100000lnv3",
"hash": "e6496d5df4045a2809709d2ccfc773526c51eb3ff94baf4f5e8b864af417e848"
}
}
18 changes: 18 additions & 0 deletions examples/outputs/lock/lnv3__usdt__arbitrum_polygon.lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"register": {
"bridge": "arbitrum->polygon",
"symbol": "usdt",
"type": "lnv3",
"baseFee": 0.1,
"liquidityFeeRate": 0.1,
"transferLimit": 2000,
"deposit": 30,
"approve": 10000000000000,
"safeWalletAddress": "0x000000000Bb6a011dB294ce3F3423f00EAc4959e",
"sourceSafeWalletUrl": "https://safe-transaction-arbitrum.safe.global/api"
},
"hash": {
"origin": "100000000000000.1arbitrum->polygon300.10x000000000bb6a011db294ce3f3423f00eac4959ehttps://safe-transaction-arbitrum.safe.global/apiusdt2000lnv3",
"hash": "6b1dc3e9f088ff0d17fbd2a2767b7290b9e4a68425bf30ae4f751a31d0cd33b5"
}
}
18 changes: 18 additions & 0 deletions examples/outputs/lock/lnv3__usdt__polygon_arbitrum.lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"register": {
"bridge": "polygon->arbitrum",
"symbol": "usdt",
"type": "lnv3",
"baseFee": 0.1,
"liquidityFeeRate": 0.1,
"transferLimit": 2000,
"deposit": 30,
"approve": 10000000000000,
"safeWalletAddress": "0x000000000Bb6a011dB294ce3F3423f00EAc4959e",
"sourceSafeWalletUrl": "https://safe-transaction-polygon.safe.global/api"
},
"hash": {
"origin": "100000000000000.1polygon->arbitrum300.10x000000000bb6a011db294ce3f3423f00eac4959ehttps://safe-transaction-polygon.safe.global/apiusdt2000lnv3",
"hash": "b2e491c71badc73d4855b8a9d977bde0287cfe955b0d1bf27364640e8e952960"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ registers:
- bridge: polygon->arbitrum
symbol: usdt
type: lnv3
contract: '0xbA5D580B18b6436411562981e02c8A9aA1776D10'
sourceTokenAddress: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f'
targetTokenAddress: '0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9'
baseFee: 0.1
liquidityFeeRate: 0.1
transferLimit: 2000
Expand All @@ -21,9 +18,7 @@ configure:
indexer: https://apollo.helixbridge.app/graphql
relayGasLimit: 600000
rpcnodes:
- name: arbitrum
rpc: https://arb1.arbitrum.io/rpc
fixedGasPrice: 10
- include: arbitrum.yml
- name: polygon
rpc: https://polygon-rpc.com
bridges:
Expand Down
34 changes: 34 additions & 0 deletions examples/src/bridges.testnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

registers:
- include: arbitrum-sepolia-sepolia.yml
- bridge: sepolia->arbitrum-sepolia
symbol: usdc
type: lnv2-default
baseFee: 10
liquidityFeeRate: 0.1
deposit: 1000
approve: 10000000000000
safeWalletAddress: '0x086962e147c82C037872fa87523faa139D38ee61'
sourceSafeWalletUrl: 'https://safe-transaction-sepolia.safe.global/api'
targetSafeWalletUrl: 'https://safe-transaction-arbitrum-sepolia.safe.global/api'


configure:
indexer: https://apollo.helixbridge.app/graphql
relayGasLimit: 600000
rpcnodes:
- include: arbitrum-sepolia.yml
- name: sepolia
fixedGasPrice: 10
bridges:
- include: arbitrum-sepolia-sepolia.yml
- direction: sepolia->arbitrum-sepolia
feeLimit: 100
reorgThreshold: 10
bridgeType: lnv3
tokens:
- symbol: usdc->usdc
swapRate: 2300
withdrawLiquidityCountThreshold: 10


3 changes: 3 additions & 0 deletions examples/src/includes/mainnet/nodes/arbitrum.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name: arbitrum
rpc: https://arb1.arbitrum.io/rpc
fixedGasPrice: 10
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
- bridge: arbitrum->polygon
symbol: usdt
type: lnv3
contract: '0xbA5D580B18b6436411562981e02c8A9aA1776D10'
sourceTokenAddress: '0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9'
targetTokenAddress: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f'
baseFee: 0.1
liquidityFeeRate: 0.1
transferLimit: 2000
Expand Down
11 changes: 11 additions & 0 deletions examples/src/includes/testnet/bridges/arbitrum-sepolia-sepolia.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- direction: arbitrum-sepolia->sepolia
feeLimit: 100
reorgThreshold: 10
bridgeType: lnv3
safeWalletAddress: '0x086962e147c82C037872fa87523faa139D38ee61'
safeWalletUrl: 'https://safe-transaction-sepolia.safe.global/api'
encryptedPrivateKey: aabbccddee
tokens:
- symbol: usdc->usdc
swapRate: 2000
withdrawLiquidityCountThreshold: 10
3 changes: 3 additions & 0 deletions examples/src/includes/testnet/nodes/arbitrum-sepolia.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

name: arbitrum-sepolia
fixedGasPrice: 10
Loading

0 comments on commit 7c1dc35

Please sign in to comment.