Skip to content

Commit

Permalink
Merge 27f8791 into 2a0dff3
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiTimesChi authored Dec 18, 2024
2 parents 2a0dff3 + 27f8791 commit d111c00
Show file tree
Hide file tree
Showing 42 changed files with 7,276 additions and 58 deletions.
1,203 changes: 1,203 additions & 0 deletions packages/sdk-router/src/abi/FastBridgeV2.json

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions packages/sdk-router/src/abi/IDefaultActions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
[
{
"type": "function",
"name": "addLiquidity",
"inputs": [
{ "name": "amounts", "type": "uint256[]", "internalType": "uint256[]" },
{ "name": "minToMint", "type": "uint256", "internalType": "uint256" },
{ "name": "deadline", "type": "uint256", "internalType": "uint256" }
],
"outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "deposit",
"inputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }],
"outputs": [],
"stateMutability": "payable"
},
{
"type": "function",
"name": "removeLiquidityOneToken",
"inputs": [
{ "name": "tokenAmount", "type": "uint256", "internalType": "uint256" },
{ "name": "tokenIndex", "type": "uint8", "internalType": "uint8" },
{ "name": "minAmount", "type": "uint256", "internalType": "uint256" },
{ "name": "deadline", "type": "uint256", "internalType": "uint256" }
],
"outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "swap",
"inputs": [
{ "name": "tokenIndexFrom", "type": "uint8", "internalType": "uint8" },
{ "name": "tokenIndexTo", "type": "uint8", "internalType": "uint8" },
{ "name": "dx", "type": "uint256", "internalType": "uint256" },
{ "name": "minDy", "type": "uint256", "internalType": "uint256" },
{ "name": "deadline", "type": "uint256", "internalType": "uint256" }
],
"outputs": [
{ "name": "amountOut", "type": "uint256", "internalType": "uint256" }
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "withdraw",
"inputs": [
{ "name": "amount", "type": "uint256", "internalType": "uint256" }
],
"outputs": [],
"stateMutability": "nonpayable"
}
]
130 changes: 130 additions & 0 deletions packages/sdk-router/src/abi/IERC20Metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
[
{
"type": "function",
"name": "allowance",
"inputs": [
{ "name": "owner", "type": "address", "internalType": "address" },
{ "name": "spender", "type": "address", "internalType": "address" }
],
"outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }],
"stateMutability": "view"
},
{
"type": "function",
"name": "approve",
"inputs": [
{ "name": "spender", "type": "address", "internalType": "address" },
{ "name": "value", "type": "uint256", "internalType": "uint256" }
],
"outputs": [{ "name": "", "type": "bool", "internalType": "bool" }],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "balanceOf",
"inputs": [
{ "name": "account", "type": "address", "internalType": "address" }
],
"outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }],
"stateMutability": "view"
},
{
"type": "function",
"name": "decimals",
"inputs": [],
"outputs": [{ "name": "", "type": "uint8", "internalType": "uint8" }],
"stateMutability": "view"
},
{
"type": "function",
"name": "name",
"inputs": [],
"outputs": [{ "name": "", "type": "string", "internalType": "string" }],
"stateMutability": "view"
},
{
"type": "function",
"name": "symbol",
"inputs": [],
"outputs": [{ "name": "", "type": "string", "internalType": "string" }],
"stateMutability": "view"
},
{
"type": "function",
"name": "totalSupply",
"inputs": [],
"outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }],
"stateMutability": "view"
},
{
"type": "function",
"name": "transfer",
"inputs": [
{ "name": "to", "type": "address", "internalType": "address" },
{ "name": "value", "type": "uint256", "internalType": "uint256" }
],
"outputs": [{ "name": "", "type": "bool", "internalType": "bool" }],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "transferFrom",
"inputs": [
{ "name": "from", "type": "address", "internalType": "address" },
{ "name": "to", "type": "address", "internalType": "address" },
{ "name": "value", "type": "uint256", "internalType": "uint256" }
],
"outputs": [{ "name": "", "type": "bool", "internalType": "bool" }],
"stateMutability": "nonpayable"
},
{
"type": "event",
"name": "Approval",
"inputs": [
{
"name": "owner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "spender",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "value",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Transfer",
"inputs": [
{
"name": "from",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "to",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "value",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
}
]
47 changes: 47 additions & 0 deletions packages/sdk-router/src/abi/SynapseIntentPreviewer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[
{
"type": "function",
"name": "NATIVE_GAS_TOKEN",
"inputs": [],
"outputs": [{ "name": "", "type": "address", "internalType": "address" }],
"stateMutability": "view"
},
{
"type": "function",
"name": "previewIntent",
"inputs": [
{ "name": "swapQuoter", "type": "address", "internalType": "address" },
{ "name": "forwardTo", "type": "address", "internalType": "address" },
{ "name": "strictOut", "type": "bool", "internalType": "bool" },
{ "name": "tokenIn", "type": "address", "internalType": "address" },
{ "name": "tokenOut", "type": "address", "internalType": "address" },
{ "name": "amountIn", "type": "uint256", "internalType": "uint256" }
],
"outputs": [
{ "name": "amountOut", "type": "uint256", "internalType": "uint256" },
{
"name": "steps",
"type": "tuple[]",
"internalType": "struct ISynapseIntentRouter.StepParams[]",
"components": [
{ "name": "token", "type": "address", "internalType": "address" },
{ "name": "amount", "type": "uint256", "internalType": "uint256" },
{
"name": "msgValue",
"type": "uint256",
"internalType": "uint256"
},
{ "name": "zapData", "type": "bytes", "internalType": "bytes" }
]
}
],
"stateMutability": "view"
},
{ "type": "error", "name": "SIP__NoOpForwardNotSupported", "inputs": [] },
{ "type": "error", "name": "SIP__PoolTokenMismatch", "inputs": [] },
{ "type": "error", "name": "SIP__PoolZeroAddress", "inputs": [] },
{ "type": "error", "name": "SIP__RawParamsEmpty", "inputs": [] },
{ "type": "error", "name": "SIP__TokenNotNative", "inputs": [] },
{ "type": "error", "name": "ZapDataV1__InvalidEncoding", "inputs": [] },
{ "type": "error", "name": "ZapDataV1__TargetZeroAddress", "inputs": [] }
]
109 changes: 109 additions & 0 deletions packages/sdk-router/src/abi/SynapseIntentRouter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
[
{
"type": "function",
"name": "NATIVE_GAS_TOKEN",
"inputs": [],
"outputs": [{ "name": "", "type": "address", "internalType": "address" }],
"stateMutability": "view"
},
{
"type": "function",
"name": "completeIntent",
"inputs": [
{
"name": "zapRecipient",
"type": "address",
"internalType": "address"
},
{ "name": "amountIn", "type": "uint256", "internalType": "uint256" },
{
"name": "minLastStepAmountIn",
"type": "uint256",
"internalType": "uint256"
},
{ "name": "deadline", "type": "uint256", "internalType": "uint256" },
{
"name": "steps",
"type": "tuple[]",
"internalType": "struct ISynapseIntentRouter.StepParams[]",
"components": [
{ "name": "token", "type": "address", "internalType": "address" },
{ "name": "amount", "type": "uint256", "internalType": "uint256" },
{
"name": "msgValue",
"type": "uint256",
"internalType": "uint256"
},
{ "name": "zapData", "type": "bytes", "internalType": "bytes" }
]
}
],
"outputs": [],
"stateMutability": "payable"
},
{
"type": "function",
"name": "completeIntentWithBalanceChecks",
"inputs": [
{
"name": "zapRecipient",
"type": "address",
"internalType": "address"
},
{ "name": "amountIn", "type": "uint256", "internalType": "uint256" },
{
"name": "minLastStepAmountIn",
"type": "uint256",
"internalType": "uint256"
},
{ "name": "deadline", "type": "uint256", "internalType": "uint256" },
{
"name": "steps",
"type": "tuple[]",
"internalType": "struct ISynapseIntentRouter.StepParams[]",
"components": [
{ "name": "token", "type": "address", "internalType": "address" },
{ "name": "amount", "type": "uint256", "internalType": "uint256" },
{
"name": "msgValue",
"type": "uint256",
"internalType": "uint256"
},
{ "name": "zapData", "type": "bytes", "internalType": "bytes" }
]
}
],
"outputs": [],
"stateMutability": "payable"
},
{
"type": "error",
"name": "AddressEmptyCode",
"inputs": [
{ "name": "target", "type": "address", "internalType": "address" }
]
},
{
"type": "error",
"name": "AddressInsufficientBalance",
"inputs": [
{ "name": "account", "type": "address", "internalType": "address" }
]
},
{ "type": "error", "name": "FailedInnerCall", "inputs": [] },
{ "type": "error", "name": "SIR__AmountInsufficient", "inputs": [] },
{ "type": "error", "name": "SIR__DeadlineExceeded", "inputs": [] },
{ "type": "error", "name": "SIR__MsgValueIncorrect", "inputs": [] },
{ "type": "error", "name": "SIR__StepsNotProvided", "inputs": [] },
{ "type": "error", "name": "SIR__TokenNotContract", "inputs": [] },
{ "type": "error", "name": "SIR__UnspentFunds", "inputs": [] },
{ "type": "error", "name": "SIR__ZapIncorrectReturnValue", "inputs": [] },
{ "type": "error", "name": "SIR__ZapNoReturnValue", "inputs": [] },
{
"type": "error",
"name": "SafeERC20FailedOperation",
"inputs": [
{ "name": "token", "type": "address", "internalType": "address" }
]
}
]
Loading

0 comments on commit d111c00

Please sign in to comment.