Skip to content

Commit

Permalink
feat: add Magic Sea on IOTA
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff-CCH committed Jul 17, 2024
1 parent b9334c4 commit 4c7fae6
Show file tree
Hide file tree
Showing 26 changed files with 7,177 additions and 15 deletions.
5 changes: 5 additions & 0 deletions .changeset/serious-snails-drive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@protocolink/logics': minor
---

add Magic Sea on IOTA
3 changes: 3 additions & 0 deletions .env.iota.pb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CHAIN_ID=8822
BLOCK_NUMBER=292100
HTTP_RPC_URL=https://json-rpc.evm.iotaledger.net
24 changes: 24 additions & 0 deletions .github/workflows/e2e-test-iota-pb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: E2E Iota Pinned Block

on:
push:
pull_request:

jobs:
run-e2e-test:
name: iota pb
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install dependencies
run: yarn install

- name: Run e2e test
run: yarn test:e2e:iota:pb
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,17 @@
"test:e2e:mainnet": "env-cmd -f .env.mainnet hardhat test --grep 'mainnet:'",
"test:e2e:mainnet:pb": "env-cmd -f .env.mainnet.pb hardhat test --grep 'mainnet-pb:'",
"test:e2e:optimism:pb": "env-cmd -f .env.optimism.pb hardhat test --grep 'optimism-pb:'",
"test:e2e:iota:pb": "env-cmd -f .env.iota.pb hardhat test --grep 'iota-pb:'",
"test:e2e:metis": "env-cmd -f .env.metis hardhat test --grep 'metis:'",
"test:unit": "mocha --recursive src"
},
"dependencies": {
"@paraswap/sdk": "^6.6.0",
"@protocolink/common": "^0.3.11",
"@protocolink/core": "^0.4.13",
"@protocolink/common": "^0.4.1",
"@protocolink/core": "^0.5.0",
"@protocolink/smart-accounts": "^0.1.3",
"@types/lodash": "^4.14.195",
"@uniswap/sdk": "^3.0.3",
"@uniswap/sdk-core": "^3.2.6",
"@uniswap/token-lists": "^1.0.0-beta.31",
"@uniswap/v3-sdk": "^3.9.0",
Expand All @@ -48,7 +50,7 @@
"@nomicfoundation/hardhat-chai-matchers": "^1.0.6",
"@nomicfoundation/hardhat-network-helpers": "^1.0.8",
"@nomiclabs/hardhat-ethers": "^2.2.3",
"@protocolink/test-helpers": "^0.3.8",
"@protocolink/test-helpers": "^0.4.0",
"@typechain/ethers-v5": "^11.0.0",
"@types/chai": "^4.3.5",
"@types/fs-extra": "^11.0.1",
Expand Down
1 change: 1 addition & 0 deletions src/logics/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export * as aavev3 from './aave-v3';
export * as balancerv2 from './balancer-v2';
export * as compoundv2 from './compound-v2';
export * as compoundv3 from './compound-v3';
export * as magicsea from './magicsea';
export * as morphoblue from './morphoblue';
export * as openoceanv2 from './openocean-v2';
export * as paraswapv5 from './paraswap-v5';
Expand Down
241 changes: 241 additions & 0 deletions src/logics/magicsea/abis/MagicSeaFactory.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,241 @@
[
{
"inputs": [
{
"internalType": "address",
"name": "_feeToSetter",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "token0",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "token1",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "pair",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "PairCreated",
"type": "event"
},
{
"inputs": [],
"name": "FEE_DENOMINATOR",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "INIT_CODE_PAIR_HASH",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "OWNER_FEE_SHARE_MAX",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "allPairs",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "allPairsLength",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "tokenA",
"type": "address"
},
{
"internalType": "address",
"name": "tokenB",
"type": "address"
}
],
"name": "createPair",
"outputs": [
{
"internalType": "address",
"name": "pair",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "feeTo",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "feeToSetter",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "getPair",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "ownerFeeShare",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_feeTo",
"type": "address"
}
],
"name": "setFeeTo",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_feeToSetter",
"type": "address"
}
],
"name": "setFeeToSetter",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "newOwnerFeeShare",
"type": "uint256"
}
],
"name": "setOwnerFeeShare",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
Loading

0 comments on commit 4c7fae6

Please sign in to comment.