-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from 0xPolygon/gas-porter
Gas porter
- Loading branch information
Showing
16 changed files
with
372 additions
and
7 deletions.
There are no files selected for viewing
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
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 @@ | ||
export default [{ "inputs": [{ "internalType": "address", "name": "lxlyBridge_", "type": "address" }, { "internalType": "address", "name": "dex_", "type": "address" }, { "internalType": "address", "name": "settlementToken_", "type": "address" }], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "CannotDetermineConversionBecauseWrappedTokenDoesNotExist", "type": "error" }, { "inputs": [], "name": "CannotDetermineGassetBecauseWrappedTokenDoesNotExist", "type": "error" }, { "inputs": [], "name": "CannotDetermineGassetMakeSureDestinationNetworkParametersAreCorrect", "type": "error" }, { "inputs": [], "name": "CannotRefuelGas", "type": "error" }, { "inputs": [], "name": "CannotReturnExcessiveMessageValueToYou", "type": "error" }, { "inputs": [], "name": "DestinationAddressCannotBeAddressZero", "type": "error" }, { "inputs": [], "name": "DestinationNetworkCannotBeCurrentNetwork", "type": "error" }, { "inputs": [], "name": "ECDSAInvalidSignature", "type": "error" }, { "inputs": [{ "internalType": "uint256", "name": "length", "type": "uint256" }], "name": "ECDSAInvalidSignatureLength", "type": "error" }, { "inputs": [{ "internalType": "bytes32", "name": "s", "type": "bytes32" }], "name": "ECDSAInvalidSignatureS", "type": "error" }, { "inputs": [], "name": "GasPorterOnCurrentNetworkDoesNotSupportDexSwapAsGassetSourceYet", "type": "error" }, { "inputs": [], "name": "GasPorterOnCurrentNetworkDoesNotSupportGassetConversionYet", "type": "error" }, { "inputs": [], "name": "GasPorterOnDestinationNetworkDoesNotSupportGassetConversionYet", "type": "error" }, { "inputs": [], "name": "GassetAmountCannotBeZero", "type": "error" }, { "inputs": [], "name": "GassetCannotBeDolphinAddressDidYouMeanAddressZero", "type": "error" }, { "inputs": [], "name": "GassetPermitDataMustBeEmptyWhenGassetIsNativeToken", "type": "error" }, { "inputs": [], "name": "GassetTypeCannotBeERC20TokenWhenNativeTokensAreTheSame", "type": "error" }, { "inputs": [], "name": "GassetTypeCannotBeNativeTokenWhenNativeTokensAreDifferent", "type": "error" }, { "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256", "name": "minimumAmount", "type": "uint256" }], "name": "InsufficientAmountInERC20Permit", "type": "error" }, { "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256", "name": "minimumAmount", "type": "uint256" }], "name": "InsufficientMessageValue", "type": "error" }, { "inputs": [], "name": "InvalidConversionNonce", "type": "error" }, { "inputs": [], "name": "InvalidGassetTypeAndGassetSourceCombination", "type": "error" }, { "inputs": [], "name": "InvalidInitialization", "type": "error" }, { "inputs": [], "name": "InvalidToken", "type": "error" }, { "inputs": [], "name": "NotInitializing", "type": "error" }, { "inputs": [], "name": "OriginNetworkCannotBeCurrentNetwork", "type": "error" }, { "inputs": [], "name": "SwapCalldataCannotBeEmptyWhenGassetSourceIsDexSwap", "type": "error" }, { "inputs": [], "name": "SwapCalldataMustBeEmptyWhenGassetSourceIsNotDexSwap", "type": "error" }, { "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], "name": "SwapFailedBecauseDexGaveInsufficientAmount", "type": "error" }, { "inputs": [{ "internalType": "bytes", "name": "reason", "type": "bytes" }], "name": "SwapFailedBecauseDexReverted", "type": "error" }, { "inputs": [], "name": "SwapFailedBecauseDexRevertedWithoutExplanation", "type": "error" }, { "inputs": [], "name": "ThisFunctionIsOnlyCallableByGasPorter", "type": "error" }, { "inputs": [], "name": "TokenAmountCannotBeZero", "type": "error" }, { "inputs": [], "name": "TokenPermitDataMustBeEmptyWhenAssetAndGassetAreTheSameAndGassetPermitDataIsProvided", "type": "error" }, { "inputs": [], "name": "TokenPermitDataMustBeEmptyWhenAssetIsNativeToken", "type": "error" }, { "inputs": [], "name": "UnknownFunctionSelectorInERC20Permit", "type": "error" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "uint32", "name": "originNetworkID", "type": "uint32" }, { "indexed": true, "internalType": "bytes32", "name": "originNetworkTxHash", "type": "bytes32" }, { "indexed": false, "internalType": "address", "name": "signer", "type": "address" }, { "indexed": true, "internalType": "address", "name": "msgSender", "type": "address" }, { "indexed": false, "internalType": "bytes", "name": "reason", "type": "bytes" }], "name": "ConversionFailed", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint32", "name": "destinationNetwork", "type": "uint32" }, { "indexed": false, "internalType": "address", "name": "destinationAddress", "type": "address" }, { "indexed": false, "internalType": "address", "name": "gasset", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "bridgedGassetAmount", "type": "uint256" }], "name": "ConversionRequested", "type": "event" }, { "anonymous": false, "inputs": [], "name": "EIP712DomainChanged", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "uint32", "name": "originNetworkID", "type": "uint32" }, { "indexed": true, "internalType": "bytes32", "name": "originNetworkTxHash", "type": "bytes32" }, { "indexed": true, "internalType": "address", "name": "signer", "type": "address" }], "name": "GassetConverted", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint64", "name": "version", "type": "uint64" }], "name": "Initialized", "type": "event" }, { "inputs": [], "name": "WETHToken", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bool", "name": "requestConversion", "type": "bool" }, { "internalType": "bool", "name": "forceUpdateGlobalExitRoot", "type": "bool" }, { "internalType": "uint32", "name": "destinationNetwork", "type": "uint32" }, { "internalType": "address", "name": "destinationAddress", "type": "address" }, { "internalType": "address", "name": "gasset", "type": "address" }, { "internalType": "enum GasPorter.GassetSource", "name": "gassetSource", "type": "uint8" }, { "internalType": "bytes", "name": "gassetPermitData", "type": "bytes" }, { "internalType": "uint256", "name": "gassetAmount", "type": "uint256" }, { "internalType": "bytes", "name": "swapCalldata", "type": "bytes" }, { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "tokenAmount", "type": "uint256" }, { "internalType": "bytes", "name": "tokenPermitData", "type": "bytes" }], "name": "bridgeAssetAndGas", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "uint32", "name": "originNetworkID", "type": "uint32" }], "name": "conversionNonce", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "uint32", "name": "originNetworkID", "type": "uint32" }, { "internalType": "bytes32", "name": "originNetworkTxHash", "type": "bytes32" }, { "internalType": "uint256", "name": "conversionNonce", "type": "uint256" }, { "internalType": "address", "name": "settlementTokenDestinationAddress", "type": "address" }, { "internalType": "bytes", "name": "settlementTokenDestinationPermitData", "type": "bytes" }, { "internalType": "uint256", "name": "settlementTokenDestinationAmount", "type": "uint256" }, { "internalType": "bytes", "name": "destinationSwapCalldata", "type": "bytes" }, { "internalType": "uint256", "name": "destinationNativeTokenMinimumAmount", "type": "uint256" }], "internalType": "struct GasPorter.ConversionAuthorizationData", "name": "authorizationData", "type": "tuple" }, { "internalType": "address", "name": "signer", "type": "address" }], "name": "convertGasset", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "components": [{ "components": [{ "internalType": "uint32", "name": "originNetworkID", "type": "uint32" }, { "internalType": "bytes32", "name": "originNetworkTxHash", "type": "bytes32" }, { "internalType": "uint256", "name": "conversionNonce", "type": "uint256" }, { "internalType": "address", "name": "settlementTokenDestinationAddress", "type": "address" }, { "internalType": "bytes", "name": "settlementTokenDestinationPermitData", "type": "bytes" }, { "internalType": "uint256", "name": "settlementTokenDestinationAmount", "type": "uint256" }, { "internalType": "bytes", "name": "destinationSwapCalldata", "type": "bytes" }, { "internalType": "uint256", "name": "destinationNativeTokenMinimumAmount", "type": "uint256" }], "internalType": "struct GasPorter.ConversionAuthorizationData", "name": "data", "type": "tuple" }, { "internalType": "bytes", "name": "signature", "type": "bytes" }], "internalType": "struct GasPorter.ConversionAuthorization", "name": "authorization", "type": "tuple" }], "name": "convertGasset", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint32", "name": "destinationNetworkGasTokenNetwork", "type": "uint32" }, { "internalType": "address", "name": "destinationNetworkGasTokenAddress", "type": "address" }, { "internalType": "address", "name": "gasset", "type": "address" }], "name": "determineConversion", "outputs": [{ "internalType": "bool", "name": "conversionRequired", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint32", "name": "destinationNetworkGasTokenNetwork", "type": "uint32" }, { "internalType": "address", "name": "destinationNetworkGasTokenAddress", "type": "address" }, { "internalType": "enum GasPorter.GassetType", "name": "gassetType", "type": "uint8" }], "name": "determineGasset", "outputs": [{ "internalType": "address", "name": "gasset", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "dex", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "eip712Domain", "outputs": [{ "internalType": "bytes1", "name": "fields", "type": "bytes1" }, { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "string", "name": "version", "type": "string" }, { "internalType": "uint256", "name": "chainId", "type": "uint256" }, { "internalType": "address", "name": "verifyingContract", "type": "address" }, { "internalType": "bytes32", "name": "salt", "type": "bytes32" }, { "internalType": "uint256[]", "name": "extensions", "type": "uint256[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "gasTokenAddress", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "gasTokenNetwork", "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "lxlyBridge", "outputs": [{ "internalType": "contract ILxlyBridge", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "networkID", "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "uint256", "name": "msgValue", "type": "uint256" }, { "internalType": "uint32", "name": "destinationNetwork", "type": "uint32" }, { "internalType": "uint32", "name": "destinationNetworkGasTokenNetwork", "type": "uint32" }, { "internalType": "address", "name": "destinationNetworkGasTokenAddress", "type": "address" }, { "internalType": "address", "name": "destinationAddress", "type": "address" }, { "internalType": "address", "name": "destinationGasPorterDex", "type": "address" }, { "internalType": "enum GasPorter.GassetType", "name": "gassetType", "type": "uint8" }, { "internalType": "enum GasPorter.GassetSource", "name": "gassetSource", "type": "uint8" }, { "internalType": "uint256", "name": "gassetAmount", "type": "uint256" }, { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "tokenAmount", "type": "uint256" }, { "internalType": "bytes", "name": "gassetPermitData", "type": "bytes" }, { "internalType": "bytes", "name": "swapCalldata", "type": "bytes" }, { "internalType": "bytes", "name": "tokenPermitData", "type": "bytes" }, { "internalType": "bool", "name": "forceUpdateGlobalExitRoot", "type": "bool" }], "internalType": "struct GasPorter.Cargo", "name": "cargo", "type": "tuple" }], "name": "plotRoute", "outputs": [{ "internalType": "uint256", "name": "msgValue", "type": "uint256" }, { "internalType": "bytes", "name": "callData", "type": "bytes" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "settlementToken", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "settlementTokenIsNativeToken", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "version", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "pure", "type": "function" }, { "stateMutability": "payable", "type": "receive" }] |
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
Oops, something went wrong.