Skip to content

Commit

Permalink
Deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
0xIryna committed Feb 3, 2023
1 parent c5066d5 commit eee51d8
Show file tree
Hide file tree
Showing 31 changed files with 6,851 additions and 158 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,5 @@ package-lock.json
.idea
cache/
artifacts/
deployments/
.openzeppelin/

17 changes: 2 additions & 15 deletions constants/chainIds.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
{
"ethereum": 101,
"bsc": 102,
"avalanche": 106,
"polygon": 109,
"arbitrum": 110,
"optimism": 111,
"fantom": 112,

"goerli": 10121,
"bsc-testnet": 10102,
"fuji": 10106,
"mumbai": 10109,
"arbitrum-goerli": 10143,
"optimism-goerli": 10132,
"fantom-testnet": 10112
"ethereum": 101,
"goerli-mainnet": 154
}
20 changes: 0 additions & 20 deletions constants/environments.json

This file was deleted.

15 changes: 1 addition & 14 deletions constants/layerzeroEndpoints.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
{
"ethereum": "0x66A71Dcef29A0fFBDBE3c6a460a3B5BC225Cd675",
"bsc": "0x3c2269811836af69497E5F486A85D7316753cf62",
"avalanche": "0x3c2269811836af69497E5F486A85D7316753cf62",
"polygon": "0x3c2269811836af69497E5F486A85D7316753cf62",
"arbitrum": "0x3c2269811836af69497E5F486A85D7316753cf62",
"optimism": "0x3c2269811836af69497E5F486A85D7316753cf62",
"fantom": "0xb6319cC6c8c27A8F5dAF0dD3DF91EA35C4720dd7",

"goerli": "0xbfD2135BFfbb0B5378b56643c2Df8a87552Bfa23",
"bsc-testnet": "0x6Fcb97553D41516Cb228ac03FdC8B9a0a9df04A1",
"fuji": "0x93f54D755A063cE7bB9e6Ac47Eccc8e33411d706",
"mumbai": "0xf69186dfBa60DdB133E91E9A4B5673624293d8F8",
"arbitrum-goerli": "0x6aB5Ae6822647046626e83ee6dB8187151E1d5ab",
"optimism-goerli": "0xae92d5aD7583AD66E49A0c67BAd18F6ba52dDDc1",
"fantom-testnet": "0x7dcAD72640F835B0FA36EFD3D6d3ec902C7E5acf"
"goerli-mainnet": "0x9740FF91F1985D8d2B71494aE1A2f723bb3Ed9E4"
}
20 changes: 10 additions & 10 deletions constants/nativeOftArgs.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"goerli": {
"name": "Native OFT",
"symbol": "NOFT",
"minAmount": "0.001",
"useMinAmount": true,
"contractName": "MinSendAmountNativeOFT"
},
"bsc-testnet": {
"name": "Native OFT",
"symbol": "NOFT",
"ethereum": {
"name": "Native ETH",
"symbol": "ETH",
"useMinAmount": false,
"contractName": "NativeOFT"
},
"goerli-mainnet": {
"name": "Native Goerli ETH",
"symbol": "GETH",
"minAmount": "1",
"useMinAmount": true,
"contractName": "MinSendAmountNativeOFT"
}
}
22 changes: 11 additions & 11 deletions constants/oftArgs.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"goerli": {
"name": "OFT",
"symbol": "OFT",
"minAmount": "0.001",
"useMinAmount": true,
"contractName": "MinSendAmountOFT"
},
"bsc-testnet": {
"name": "OFT",
"symbol": "OFT",
"ethereum": {
"name": "Goerli ETH",
"symbol": "GETH",
"useMinAmount": false,
"contractName": "OFT"
}
},
"goerli-mainnet": {
"name": "Mainnet ETH",
"symbol": "METH",
"minAmount": "0.0001",
"useMinAmount": true,
"contractName": "MinSendAmountOFT"
}
}
4 changes: 2 additions & 2 deletions constants/pools.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"goerli": "0x1D146E9f8b3196e207F8e9f052e1C12B4a02716F",
"bsc-testnet": "0x14f20d80cfe1c1334e4abcb07c0f9c7a95232159"
"ethereum": "0x4B1e9A9dE809CE968c7dFB0e66F91bB7D794f3ED",
"goerli-mainnet": "0x88124Ef4A9EC47e691F254F2E8e348fd1e341e9B"
}
4 changes: 2 additions & 2 deletions constants/uniswapRoutes.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"goerli": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
"bsc-testnet": "0x9Ac64Cc6e4415144C455BD8E4837Fea55603e5c3"
"ethereum": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
"goerli-mainnet": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D"
}
4 changes: 2 additions & 2 deletions constants/weths.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"goerli": "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",
"bsc-testnet": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd"
"ethereum": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"goerli-mainnet": "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6"
}
4 changes: 2 additions & 2 deletions contracts/SwappableBridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ contract SwappableBridge {

function swapAndBridge(uint amountIn, uint amountOutMin, uint16 dstChainId, address to, address payable refundAddress, address zroPaymentAddress, bytes calldata adapterParams) external payable {
require(to != address(0), "SwappableBridge: invalid to address");
require(msg.value > amountIn, "SwappableBridge: not enough value sent");
require(msg.value >= amountIn, "SwappableBridge: not enough value sent");

address[] memory path = new address[](2);
path[0] = uniswapRouter.WETH();
Expand All @@ -34,7 +34,7 @@ contract SwappableBridge {

function bridge(uint amountIn, uint16 dstChainId, address to, address payable refundAddress, address zroPaymentAddress, bytes calldata adapterParams) external payable {
require(to != address(0), "SwappableBridge: invalid to address");
require(msg.value > amountIn, "SwappableBridge: not enough value sent");
require(msg.value >= amountIn, "SwappableBridge: not enough value sent");

nativeOft.deposit{value: amountIn}();
nativeOft.sendFrom{value: msg.value - amountIn}(address(this), dstChainId, abi.encodePacked(to), amountIn, refundAddress, zroPaymentAddress, adapterParams);
Expand Down
1 change: 1 addition & 0 deletions deployments/ethereum/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
Loading

0 comments on commit eee51d8

Please sign in to comment.