-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6880ddd
commit 0bbf24c
Showing
9 changed files
with
1,451 additions
and
61 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
387 changes: 387 additions & 0 deletions
387
packages/rest-api/src/constants/abis/fastBridgeRouter.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,387 @@ | ||
[ | ||
{ | ||
"type": "constructor", | ||
"inputs": [ | ||
{ | ||
"name": "owner_", | ||
"type": "address", | ||
"internalType": "address" | ||
} | ||
], | ||
"stateMutability": "nonpayable" | ||
}, | ||
{ | ||
"type": "receive", | ||
"stateMutability": "payable" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "GAS_REBATE_FLAG", | ||
"inputs": [], | ||
"outputs": [ | ||
{ | ||
"name": "", | ||
"type": "bytes1", | ||
"internalType": "bytes1" | ||
} | ||
], | ||
"stateMutability": "view" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "adapterSwap", | ||
"inputs": [ | ||
{ | ||
"name": "recipient", | ||
"type": "address", | ||
"internalType": "address" | ||
}, | ||
{ | ||
"name": "tokenIn", | ||
"type": "address", | ||
"internalType": "address" | ||
}, | ||
{ | ||
"name": "amountIn", | ||
"type": "uint256", | ||
"internalType": "uint256" | ||
}, | ||
{ | ||
"name": "tokenOut", | ||
"type": "address", | ||
"internalType": "address" | ||
}, | ||
{ | ||
"name": "rawParams", | ||
"type": "bytes", | ||
"internalType": "bytes" | ||
} | ||
], | ||
"outputs": [ | ||
{ | ||
"name": "amountOut", | ||
"type": "uint256", | ||
"internalType": "uint256" | ||
} | ||
], | ||
"stateMutability": "payable" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "bridge", | ||
"inputs": [ | ||
{ | ||
"name": "recipient", | ||
"type": "address", | ||
"internalType": "address" | ||
}, | ||
{ | ||
"name": "chainId", | ||
"type": "uint256", | ||
"internalType": "uint256" | ||
}, | ||
{ | ||
"name": "token", | ||
"type": "address", | ||
"internalType": "address" | ||
}, | ||
{ | ||
"name": "amount", | ||
"type": "uint256", | ||
"internalType": "uint256" | ||
}, | ||
{ | ||
"name": "originQuery", | ||
"type": "tuple", | ||
"internalType": "struct SwapQuery", | ||
"components": [ | ||
{ | ||
"name": "routerAdapter", | ||
"type": "address", | ||
"internalType": "address" | ||
}, | ||
{ | ||
"name": "tokenOut", | ||
"type": "address", | ||
"internalType": "address" | ||
}, | ||
{ | ||
"name": "minAmountOut", | ||
"type": "uint256", | ||
"internalType": "uint256" | ||
}, | ||
{ | ||
"name": "deadline", | ||
"type": "uint256", | ||
"internalType": "uint256" | ||
}, | ||
{ | ||
"name": "rawParams", | ||
"type": "bytes", | ||
"internalType": "bytes" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "destQuery", | ||
"type": "tuple", | ||
"internalType": "struct SwapQuery", | ||
"components": [ | ||
{ | ||
"name": "routerAdapter", | ||
"type": "address", | ||
"internalType": "address" | ||
}, | ||
{ | ||
"name": "tokenOut", | ||
"type": "address", | ||
"internalType": "address" | ||
}, | ||
{ | ||
"name": "minAmountOut", | ||
"type": "uint256", | ||
"internalType": "uint256" | ||
}, | ||
{ | ||
"name": "deadline", | ||
"type": "uint256", | ||
"internalType": "uint256" | ||
}, | ||
{ | ||
"name": "rawParams", | ||
"type": "bytes", | ||
"internalType": "bytes" | ||
} | ||
] | ||
} | ||
], | ||
"outputs": [], | ||
"stateMutability": "payable" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "fastBridge", | ||
"inputs": [], | ||
"outputs": [ | ||
{ | ||
"name": "", | ||
"type": "address", | ||
"internalType": "address" | ||
} | ||
], | ||
"stateMutability": "view" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "getOriginAmountOut", | ||
"inputs": [ | ||
{ | ||
"name": "tokenIn", | ||
"type": "address", | ||
"internalType": "address" | ||
}, | ||
{ | ||
"name": "rfqTokens", | ||
"type": "address[]", | ||
"internalType": "address[]" | ||
}, | ||
{ | ||
"name": "amountIn", | ||
"type": "uint256", | ||
"internalType": "uint256" | ||
} | ||
], | ||
"outputs": [ | ||
{ | ||
"name": "originQueries", | ||
"type": "tuple[]", | ||
"internalType": "struct SwapQuery[]", | ||
"components": [ | ||
{ | ||
"name": "routerAdapter", | ||
"type": "address", | ||
"internalType": "address" | ||
}, | ||
{ | ||
"name": "tokenOut", | ||
"type": "address", | ||
"internalType": "address" | ||
}, | ||
{ | ||
"name": "minAmountOut", | ||
"type": "uint256", | ||
"internalType": "uint256" | ||
}, | ||
{ | ||
"name": "deadline", | ||
"type": "uint256", | ||
"internalType": "uint256" | ||
}, | ||
{ | ||
"name": "rawParams", | ||
"type": "bytes", | ||
"internalType": "bytes" | ||
} | ||
] | ||
} | ||
], | ||
"stateMutability": "view" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "owner", | ||
"inputs": [], | ||
"outputs": [ | ||
{ | ||
"name": "", | ||
"type": "address", | ||
"internalType": "address" | ||
} | ||
], | ||
"stateMutability": "view" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "renounceOwnership", | ||
"inputs": [], | ||
"outputs": [], | ||
"stateMutability": "nonpayable" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "setFastBridge", | ||
"inputs": [ | ||
{ | ||
"name": "fastBridge_", | ||
"type": "address", | ||
"internalType": "address" | ||
} | ||
], | ||
"outputs": [], | ||
"stateMutability": "nonpayable" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "setSwapQuoter", | ||
"inputs": [ | ||
{ | ||
"name": "swapQuoter_", | ||
"type": "address", | ||
"internalType": "address" | ||
} | ||
], | ||
"outputs": [], | ||
"stateMutability": "nonpayable" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "swapQuoter", | ||
"inputs": [], | ||
"outputs": [ | ||
{ | ||
"name": "", | ||
"type": "address", | ||
"internalType": "address" | ||
} | ||
], | ||
"stateMutability": "view" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "transferOwnership", | ||
"inputs": [ | ||
{ | ||
"name": "newOwner", | ||
"type": "address", | ||
"internalType": "address" | ||
} | ||
], | ||
"outputs": [], | ||
"stateMutability": "nonpayable" | ||
}, | ||
{ | ||
"type": "event", | ||
"name": "FastBridgeSet", | ||
"inputs": [ | ||
{ | ||
"name": "newFastBridge", | ||
"type": "address", | ||
"indexed": false, | ||
"internalType": "address" | ||
} | ||
], | ||
"anonymous": false | ||
}, | ||
{ | ||
"type": "event", | ||
"name": "OwnershipTransferred", | ||
"inputs": [ | ||
{ | ||
"name": "previousOwner", | ||
"type": "address", | ||
"indexed": true, | ||
"internalType": "address" | ||
}, | ||
{ | ||
"name": "newOwner", | ||
"type": "address", | ||
"indexed": true, | ||
"internalType": "address" | ||
} | ||
], | ||
"anonymous": false | ||
}, | ||
{ | ||
"type": "event", | ||
"name": "SwapQuoterSet", | ||
"inputs": [ | ||
{ | ||
"name": "newSwapQuoter", | ||
"type": "address", | ||
"indexed": false, | ||
"internalType": "address" | ||
} | ||
], | ||
"anonymous": false | ||
}, | ||
{ | ||
"type": "error", | ||
"name": "DeadlineExceeded", | ||
"inputs": [] | ||
}, | ||
{ | ||
"type": "error", | ||
"name": "InsufficientOutputAmount", | ||
"inputs": [] | ||
}, | ||
{ | ||
"type": "error", | ||
"name": "MsgValueIncorrect", | ||
"inputs": [] | ||
}, | ||
{ | ||
"type": "error", | ||
"name": "PoolNotFound", | ||
"inputs": [] | ||
}, | ||
{ | ||
"type": "error", | ||
"name": "TokenAddressMismatch", | ||
"inputs": [] | ||
}, | ||
{ | ||
"type": "error", | ||
"name": "TokenNotContract", | ||
"inputs": [] | ||
}, | ||
{ | ||
"type": "error", | ||
"name": "TokenNotETH", | ||
"inputs": [] | ||
}, | ||
{ | ||
"type": "error", | ||
"name": "TokensIdentical", | ||
"inputs": [] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export enum BridgeStatus { | ||
NULL, | ||
REQUESTED, | ||
RELAYER_PROVED, | ||
RELAYER_CLAIMED, | ||
REFUNDED, | ||
} |
Oops, something went wrong.