diff --git a/package.json b/package.json index 22e530e..48d3f6a 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "enquirer": "^2.4.1", "express": "^4.19.2", "tsc-watch": "^6.0.4", - "viem": "^1.16.6", + "viem": "^2.17.4", "yup": "^1.3.2" }, "devDependencies": { diff --git a/services/decoder/fallbacks/approval-for-all/abis/approval-for-all.abi.json b/services/decoder/fallbacks/approval-for-all/abis/approval-for-all.abi.json deleted file mode 100644 index 89bf6be..0000000 --- a/services/decoder/fallbacks/approval-for-all/abis/approval-for-all.abi.json +++ /dev/null @@ -1,27 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - } -] diff --git a/services/decoder/fallbacks/approval-for-all/abis/approval-for-all.abi.ts b/services/decoder/fallbacks/approval-for-all/abis/approval-for-all.abi.ts new file mode 100644 index 0000000..cd42ed0 --- /dev/null +++ b/services/decoder/fallbacks/approval-for-all/abis/approval-for-all.abi.ts @@ -0,0 +1,27 @@ +export const approvalForAllABI = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "operator", + type: "address", + }, + { + indexed: false, + internalType: "bool", + name: "approved", + type: "bool", + }, + ], + name: "ApprovalForAll", + type: "event", + }, +] as const; diff --git a/services/decoder/fallbacks/approval-for-all/approval-for-all.fallback.ts b/services/decoder/fallbacks/approval-for-all/approval-for-all.fallback.ts index c3db46f..1e7d590 100644 --- a/services/decoder/fallbacks/approval-for-all/approval-for-all.fallback.ts +++ b/services/decoder/fallbacks/approval-for-all/approval-for-all.fallback.ts @@ -1,15 +1,15 @@ +import { decodeEventLog, type Abi } from "viem"; import { GoldRushDecoder } from "../../decoder"; -import { type EventType } from "../../decoder.types"; import { DECODED_ACTION, DECODED_EVENT_CATEGORY, } from "../../decoder.constants"; -import { decodeEventLog, type Abi } from "viem"; -import ABI from "./abis/approval-for-all.abi.json"; +import { type EventType } from "../../decoder.types"; +import { approvalForAllABI } from "./abis/approval-for-all.abi"; GoldRushDecoder.fallback( "ApprovalForAll", - ABI as Abi, + approvalForAllABI as Abi, async ( log_event, tx, @@ -21,18 +21,11 @@ GoldRushDecoder.fallback( log_event; const { args: decoded } = decodeEventLog({ - abi: ABI, + abi: approvalForAllABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "ApprovalForAll", - }) as { - eventName: "ApprovalForAll"; - args: { - owner: string; - operator: string; - approved: boolean; - }; - }; + }); return { action: DECODED_ACTION.APPROVAL, diff --git a/services/decoder/fallbacks/approval/abis/approval-erc20.abi.json b/services/decoder/fallbacks/approval/abis/approval-erc20.abi.json deleted file mode 100644 index 2b438af..0000000 --- a/services/decoder/fallbacks/approval/abis/approval-erc20.abi.json +++ /dev/null @@ -1,24 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - } -] diff --git a/services/decoder/fallbacks/approval/abis/approval-erc20.abi.ts b/services/decoder/fallbacks/approval/abis/approval-erc20.abi.ts new file mode 100644 index 0000000..bfc7117 --- /dev/null +++ b/services/decoder/fallbacks/approval/abis/approval-erc20.abi.ts @@ -0,0 +1,24 @@ +export const approvalERC20ABI = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "owner", + type: "address", + }, + { + indexed: true, + name: "spender", + type: "address", + }, + { + indexed: false, + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, +] as const; diff --git a/services/decoder/fallbacks/approval/abis/approval-erc721.abi.json b/services/decoder/fallbacks/approval/abis/approval-erc721.abi.json deleted file mode 100644 index 3eb0626..0000000 --- a/services/decoder/fallbacks/approval/abis/approval-erc721.abi.json +++ /dev/null @@ -1,24 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "name": "spender", - "type": "address" - }, - { - "indexed": true, - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - } -] diff --git a/services/decoder/fallbacks/approval/abis/approval-erc721.abi.ts b/services/decoder/fallbacks/approval/abis/approval-erc721.abi.ts new file mode 100644 index 0000000..bbe8976 --- /dev/null +++ b/services/decoder/fallbacks/approval/abis/approval-erc721.abi.ts @@ -0,0 +1,24 @@ +export const approvalERC721ABI = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "owner", + type: "address", + }, + { + indexed: true, + name: "spender", + type: "address", + }, + { + indexed: true, + name: "tokenId", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, +] as const; diff --git a/services/decoder/fallbacks/approval/approval.fallback.ts b/services/decoder/fallbacks/approval/approval.fallback.ts index af8abef..6b7bee9 100644 --- a/services/decoder/fallbacks/approval/approval.fallback.ts +++ b/services/decoder/fallbacks/approval/approval.fallback.ts @@ -1,18 +1,18 @@ +import { prettifyCurrency } from "@covalenthq/client-sdk"; +import { decodeEventLog, type Abi } from "viem"; +import { currencyToNumber, timestampParser } from "../../../../utils/functions"; import { GoldRushDecoder } from "../../decoder"; -import { type EventDetails, type EventType } from "../../decoder.types"; import { DECODED_ACTION, DECODED_EVENT_CATEGORY, } from "../../decoder.constants"; -import { decodeEventLog, type Abi } from "viem"; -import ERC20ABI from "./abis/approval-erc20.abi.json"; -import ERC721ABI from "./abis/approval-erc721.abi.json"; -import { currencyToNumber, timestampParser } from "../../../../utils/functions"; -import { prettifyCurrency } from "@covalenthq/client-sdk"; +import { type EventDetails, type EventType } from "../../decoder.types"; +import { approvalERC20ABI } from "./abis/approval-erc20.abi"; +import { approvalERC721ABI } from "./abis/approval-erc721.abi"; GoldRushDecoder.fallback( "Approval", - ERC20ABI as Abi, + approvalERC20ABI as Abi, async ( log_event, tx, @@ -47,33 +47,19 @@ GoldRushDecoder.fallback( try { const { args } = decodeEventLog({ - abi: ERC20ABI, + abi: approvalERC20ABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "Approval", - }) as { - eventName: "Approval"; - args: { - owner: string; - spender: string; - value: bigint; - }; - }; + }); decoded = args; } catch (error) { const { args } = decodeEventLog({ - abi: ERC721ABI, + abi: approvalERC721ABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "Approval", - }) as { - eventName: "Approval"; - args: { - owner: string; - spender: string; - tokenId: bigint; - }; - }; + }); decoded = args; } diff --git a/services/decoder/fallbacks/transfer/abis/transfer-erc20.abi.json b/services/decoder/fallbacks/transfer/abis/transfer-erc20.abi.json deleted file mode 100644 index 7db23da..0000000 --- a/services/decoder/fallbacks/transfer/abis/transfer-erc20.abi.json +++ /dev/null @@ -1,27 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - } -] diff --git a/services/decoder/fallbacks/transfer/abis/transfer-erc20.abi.ts b/services/decoder/fallbacks/transfer/abis/transfer-erc20.abi.ts new file mode 100644 index 0000000..8635a79 --- /dev/null +++ b/services/decoder/fallbacks/transfer/abis/transfer-erc20.abi.ts @@ -0,0 +1,27 @@ +export const transferERC20ABI = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, +] as const; diff --git a/services/decoder/fallbacks/transfer/abis/transfer-erc721.abi.json b/services/decoder/fallbacks/transfer/abis/transfer-erc721.abi.json deleted file mode 100644 index 5a8dd10..0000000 --- a/services/decoder/fallbacks/transfer/abis/transfer-erc721.abi.json +++ /dev/null @@ -1,27 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - } -] diff --git a/services/decoder/fallbacks/transfer/abis/transfer-erc721.abi.ts b/services/decoder/fallbacks/transfer/abis/transfer-erc721.abi.ts new file mode 100644 index 0000000..29e4434 --- /dev/null +++ b/services/decoder/fallbacks/transfer/abis/transfer-erc721.abi.ts @@ -0,0 +1,27 @@ +export const transferERC721ABI = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, +] as const; diff --git a/services/decoder/fallbacks/transfer/transfer.fallback.ts b/services/decoder/fallbacks/transfer/transfer.fallback.ts index e3fb015..af2102e 100644 --- a/services/decoder/fallbacks/transfer/transfer.fallback.ts +++ b/services/decoder/fallbacks/transfer/transfer.fallback.ts @@ -1,18 +1,18 @@ +import { prettifyCurrency } from "@covalenthq/client-sdk"; +import { decodeEventLog, type Abi } from "viem"; +import { currencyToNumber, timestampParser } from "../../../../utils/functions"; import { GoldRushDecoder } from "../../decoder"; -import { type EventDetails, type EventType } from "../../decoder.types"; import { DECODED_ACTION, DECODED_EVENT_CATEGORY, } from "../../decoder.constants"; -import { decodeEventLog, type Abi } from "viem"; -import ERC20ABI from "./abis/transfer-erc20.abi.json"; -import ERC721ABI from "./abis/transfer-erc721.abi.json"; -import { currencyToNumber, timestampParser } from "../../../../utils/functions"; -import { prettifyCurrency } from "@covalenthq/client-sdk"; +import { type EventDetails, type EventType } from "../../decoder.types"; +import { transferERC20ABI } from "./abis/transfer-erc20.abi"; +import { transferERC721ABI } from "./abis/transfer-erc721.abi"; GoldRushDecoder.fallback( "Transfer", - ERC20ABI as Abi, + transferERC20ABI as Abi, async ( log_event, tx, @@ -38,33 +38,19 @@ GoldRushDecoder.fallback( try { const { args } = decodeEventLog({ - abi: ERC20ABI, + abi: transferERC20ABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "Transfer", - }) as { - eventName: "Transfer"; - args: { - from: string; - to: string; - value: bigint; - }; - }; + }); decoded = args; } catch (error) { const { args } = decodeEventLog({ - abi: ERC721ABI, + abi: transferERC721ABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "Transfer", - }) as { - eventName: "Transfer"; - args: { - from: string; - to: string; - tokenId: bigint; - }; - }; + }); decoded = args; } diff --git a/services/decoder/protocols/4337-entry-point/4337-entry-point.decoders.ts b/services/decoder/protocols/4337-entry-point/4337-entry-point.decoders.ts index 0f436b7..68e48ac 100644 --- a/services/decoder/protocols/4337-entry-point/4337-entry-point.decoders.ts +++ b/services/decoder/protocols/4337-entry-point/4337-entry-point.decoders.ts @@ -1,16 +1,16 @@ +import { decodeEventLog, type Abi } from "viem"; import { GoldRushDecoder } from "../../decoder"; -import { type EventType } from "../../decoder.types"; import { DECODED_ACTION, DECODED_EVENT_CATEGORY, } from "../../decoder.constants"; -import { decodeEventLog, type Abi } from "viem"; -import ABI from "./abis/4337-entry-point.abi.json"; +import { type EventType } from "../../decoder.types"; +import { entryPointABI } from "./abis/entry-point.abi"; GoldRushDecoder.on( "4337-entry-point:UserOperationEvent", ["matic-mainnet", "avalanche-mainnet"], - ABI as Abi, + entryPointABI as Abi, async ( log_event, tx, @@ -22,22 +22,11 @@ GoldRushDecoder.on( log_event; const { args: decoded } = decodeEventLog({ - abi: ABI, + abi: entryPointABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "UserOperationEvent", - }) as { - eventName: "UserOperationEvent"; - args: { - userOpHash: string; - sender: string; - paymaster: string; - nonce: bigint; - success: boolean; - actualGasCost: bigint; - actualGasUsed: bigint; - }; - }; + }); return { action: DECODED_ACTION.ACCOUNT_ABSTRACTION, diff --git a/services/decoder/protocols/4337-entry-point/abis/4337-entry-point.abi.json b/services/decoder/protocols/4337-entry-point/abis/4337-entry-point.abi.json deleted file mode 100644 index f9dbc01..0000000 --- a/services/decoder/protocols/4337-entry-point/abis/4337-entry-point.abi.json +++ /dev/null @@ -1,1190 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "uint256", - "name": "preOpGas", - "type": "uint256" - }, - { "internalType": "uint256", "name": "paid", "type": "uint256" }, - { - "internalType": "uint48", - "name": "validAfter", - "type": "uint48" - }, - { - "internalType": "uint48", - "name": "validUntil", - "type": "uint48" - }, - { "internalType": "bool", "name": "targetSuccess", "type": "bool" }, - { "internalType": "bytes", "name": "targetResult", "type": "bytes" } - ], - "name": "ExecutionResult", - "type": "error" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "opIndex", "type": "uint256" }, - { "internalType": "string", "name": "reason", "type": "string" } - ], - "name": "FailedOp", - "type": "error" - }, - { - "inputs": [ - { "internalType": "address", "name": "sender", "type": "address" } - ], - "name": "SenderAddressResult", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "aggregator", - "type": "address" - } - ], - "name": "SignatureValidationFailed", - "type": "error" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "preOpGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "prefund", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "sigFailed", - "type": "bool" - }, - { - "internalType": "uint48", - "name": "validAfter", - "type": "uint48" - }, - { - "internalType": "uint48", - "name": "validUntil", - "type": "uint48" - }, - { - "internalType": "bytes", - "name": "paymasterContext", - "type": "bytes" - } - ], - "internalType": "struct IEntryPoint.ReturnInfo", - "name": "returnInfo", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "stake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "unstakeDelaySec", - "type": "uint256" - } - ], - "internalType": "struct IStakeManager.StakeInfo", - "name": "senderInfo", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "stake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "unstakeDelaySec", - "type": "uint256" - } - ], - "internalType": "struct IStakeManager.StakeInfo", - "name": "factoryInfo", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "stake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "unstakeDelaySec", - "type": "uint256" - } - ], - "internalType": "struct IStakeManager.StakeInfo", - "name": "paymasterInfo", - "type": "tuple" - } - ], - "name": "ValidationResult", - "type": "error" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "preOpGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "prefund", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "sigFailed", - "type": "bool" - }, - { - "internalType": "uint48", - "name": "validAfter", - "type": "uint48" - }, - { - "internalType": "uint48", - "name": "validUntil", - "type": "uint48" - }, - { - "internalType": "bytes", - "name": "paymasterContext", - "type": "bytes" - } - ], - "internalType": "struct IEntryPoint.ReturnInfo", - "name": "returnInfo", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "stake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "unstakeDelaySec", - "type": "uint256" - } - ], - "internalType": "struct IStakeManager.StakeInfo", - "name": "senderInfo", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "stake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "unstakeDelaySec", - "type": "uint256" - } - ], - "internalType": "struct IStakeManager.StakeInfo", - "name": "factoryInfo", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "stake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "unstakeDelaySec", - "type": "uint256" - } - ], - "internalType": "struct IStakeManager.StakeInfo", - "name": "paymasterInfo", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "aggregator", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "stake", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "unstakeDelaySec", - "type": "uint256" - } - ], - "internalType": "struct IStakeManager.StakeInfo", - "name": "stakeInfo", - "type": "tuple" - } - ], - "internalType": "struct IEntryPoint.AggregatorStakeInfo", - "name": "aggregatorInfo", - "type": "tuple" - } - ], - "name": "ValidationResultWithAggregation", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "userOpHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "factory", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "paymaster", - "type": "address" - } - ], - "name": "AccountDeployed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "BeforeExecution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalDeposit", - "type": "uint256" - } - ], - "name": "Deposited", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "aggregator", - "type": "address" - } - ], - "name": "SignatureAggregatorChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalStaked", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "unstakeDelaySec", - "type": "uint256" - } - ], - "name": "StakeLocked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "withdrawTime", - "type": "uint256" - } - ], - "name": "StakeUnlocked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "withdrawAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "StakeWithdrawn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "userOpHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "paymaster", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "success", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "actualGasCost", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "actualGasUsed", - "type": "uint256" - } - ], - "name": "UserOperationEvent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "userOpHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "revertReason", - "type": "bytes" - } - ], - "name": "UserOperationRevertReason", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "withdrawAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Withdrawn", - "type": "event" - }, - { - "inputs": [], - "name": "SIG_VALIDATION_FAILED", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "initCode", "type": "bytes" }, - { "internalType": "address", "name": "sender", "type": "address" }, - { - "internalType": "bytes", - "name": "paymasterAndData", - "type": "bytes" - } - ], - "name": "_validateSenderAndPaymaster", - "outputs": [], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "unstakeDelaySec", - "type": "uint32" - } - ], - "name": "addStake", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "balanceOf", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "depositTo", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "name": "deposits", - "outputs": [ - { "internalType": "uint112", "name": "deposit", "type": "uint112" }, - { "internalType": "bool", "name": "staked", "type": "bool" }, - { "internalType": "uint112", "name": "stake", "type": "uint112" }, - { - "internalType": "uint32", - "name": "unstakeDelaySec", - "type": "uint32" - }, - { - "internalType": "uint48", - "name": "withdrawTime", - "type": "uint48" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "getDepositInfo", - "outputs": [ - { - "components": [ - { - "internalType": "uint112", - "name": "deposit", - "type": "uint112" - }, - { - "internalType": "bool", - "name": "staked", - "type": "bool" - }, - { - "internalType": "uint112", - "name": "stake", - "type": "uint112" - }, - { - "internalType": "uint32", - "name": "unstakeDelaySec", - "type": "uint32" - }, - { - "internalType": "uint48", - "name": "withdrawTime", - "type": "uint48" - } - ], - "internalType": "struct IStakeManager.DepositInfo", - "name": "info", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "sender", "type": "address" }, - { "internalType": "uint192", "name": "key", "type": "uint192" } - ], - "name": "getNonce", - "outputs": [ - { "internalType": "uint256", "name": "nonce", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "initCode", "type": "bytes" } - ], - "name": "getSenderAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "initCode", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "callData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "callGasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "verificationGasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "preVerificationGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxFeePerGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxPriorityFeePerGas", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "paymasterAndData", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - } - ], - "internalType": "struct UserOperation", - "name": "userOp", - "type": "tuple" - } - ], - "name": "getUserOpHash", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "initCode", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "callData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "callGasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "verificationGasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "preVerificationGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxFeePerGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxPriorityFeePerGas", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "paymasterAndData", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - } - ], - "internalType": "struct UserOperation[]", - "name": "userOps", - "type": "tuple[]" - }, - { - "internalType": "contract IAggregator", - "name": "aggregator", - "type": "address" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - } - ], - "internalType": "struct IEntryPoint.UserOpsPerAggregator[]", - "name": "opsPerAggregator", - "type": "tuple[]" - }, - { - "internalType": "address payable", - "name": "beneficiary", - "type": "address" - } - ], - "name": "handleAggregatedOps", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "initCode", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "callData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "callGasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "verificationGasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "preVerificationGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxFeePerGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxPriorityFeePerGas", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "paymasterAndData", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - } - ], - "internalType": "struct UserOperation[]", - "name": "ops", - "type": "tuple[]" - }, - { - "internalType": "address payable", - "name": "beneficiary", - "type": "address" - } - ], - "name": "handleOps", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint192", "name": "key", "type": "uint192" } - ], - "name": "incrementNonce", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "callData", "type": "bytes" }, - { - "components": [ - { - "components": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "callGasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "verificationGasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "preVerificationGas", - "type": "uint256" - }, - { - "internalType": "address", - "name": "paymaster", - "type": "address" - }, - { - "internalType": "uint256", - "name": "maxFeePerGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxPriorityFeePerGas", - "type": "uint256" - } - ], - "internalType": "struct EntryPoint.MemoryUserOp", - "name": "mUserOp", - "type": "tuple" - }, - { - "internalType": "bytes32", - "name": "userOpHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "prefund", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "contextOffset", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "preOpGas", - "type": "uint256" - } - ], - "internalType": "struct EntryPoint.UserOpInfo", - "name": "opInfo", - "type": "tuple" - }, - { "internalType": "bytes", "name": "context", "type": "bytes" } - ], - "name": "innerHandleOp", - "outputs": [ - { - "internalType": "uint256", - "name": "actualGasCost", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "uint192", "name": "", "type": "uint192" } - ], - "name": "nonceSequenceNumber", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "initCode", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "callData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "callGasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "verificationGasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "preVerificationGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxFeePerGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxPriorityFeePerGas", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "paymasterAndData", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - } - ], - "internalType": "struct UserOperation", - "name": "op", - "type": "tuple" - }, - { "internalType": "address", "name": "target", "type": "address" }, - { - "internalType": "bytes", - "name": "targetCallData", - "type": "bytes" - } - ], - "name": "simulateHandleOp", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "initCode", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "callData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "callGasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "verificationGasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "preVerificationGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxFeePerGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxPriorityFeePerGas", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "paymasterAndData", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - } - ], - "internalType": "struct UserOperation", - "name": "userOp", - "type": "tuple" - } - ], - "name": "simulateValidation", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unlockStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "withdrawAddress", - "type": "address" - } - ], - "name": "withdrawStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "withdrawAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "withdrawAmount", - "type": "uint256" - } - ], - "name": "withdrawTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { "stateMutability": "payable", "type": "receive" } -] diff --git a/services/decoder/protocols/4337-entry-point/abis/entry-point.abi.ts b/services/decoder/protocols/4337-entry-point/abis/entry-point.abi.ts new file mode 100644 index 0000000..41fbc23 --- /dev/null +++ b/services/decoder/protocols/4337-entry-point/abis/entry-point.abi.ts @@ -0,0 +1,1166 @@ +export const entryPointABI = [ + { + inputs: [ + { + internalType: "uint256", + name: "preOpGas", + type: "uint256", + }, + { internalType: "uint256", name: "paid", type: "uint256" }, + { + internalType: "uint48", + name: "validAfter", + type: "uint48", + }, + { + internalType: "uint48", + name: "validUntil", + type: "uint48", + }, + { internalType: "bool", name: "targetSuccess", type: "bool" }, + { internalType: "bytes", name: "targetResult", type: "bytes" }, + ], + name: "ExecutionResult", + type: "error", + }, + { + inputs: [ + { internalType: "uint256", name: "opIndex", type: "uint256" }, + { internalType: "string", name: "reason", type: "string" }, + ], + name: "FailedOp", + type: "error", + }, + { + inputs: [{ internalType: "address", name: "sender", type: "address" }], + name: "SenderAddressResult", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "aggregator", + type: "address", + }, + ], + name: "SignatureValidationFailed", + type: "error", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint256", + name: "preOpGas", + type: "uint256", + }, + { + internalType: "uint256", + name: "prefund", + type: "uint256", + }, + { + internalType: "bool", + name: "sigFailed", + type: "bool", + }, + { + internalType: "uint48", + name: "validAfter", + type: "uint48", + }, + { + internalType: "uint48", + name: "validUntil", + type: "uint48", + }, + { + internalType: "bytes", + name: "paymasterContext", + type: "bytes", + }, + ], + internalType: "struct IEntryPoint.ReturnInfo", + name: "returnInfo", + type: "tuple", + }, + { + components: [ + { + internalType: "uint256", + name: "stake", + type: "uint256", + }, + { + internalType: "uint256", + name: "unstakeDelaySec", + type: "uint256", + }, + ], + internalType: "struct IStakeManager.StakeInfo", + name: "senderInfo", + type: "tuple", + }, + { + components: [ + { + internalType: "uint256", + name: "stake", + type: "uint256", + }, + { + internalType: "uint256", + name: "unstakeDelaySec", + type: "uint256", + }, + ], + internalType: "struct IStakeManager.StakeInfo", + name: "factoryInfo", + type: "tuple", + }, + { + components: [ + { + internalType: "uint256", + name: "stake", + type: "uint256", + }, + { + internalType: "uint256", + name: "unstakeDelaySec", + type: "uint256", + }, + ], + internalType: "struct IStakeManager.StakeInfo", + name: "paymasterInfo", + type: "tuple", + }, + ], + name: "ValidationResult", + type: "error", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint256", + name: "preOpGas", + type: "uint256", + }, + { + internalType: "uint256", + name: "prefund", + type: "uint256", + }, + { + internalType: "bool", + name: "sigFailed", + type: "bool", + }, + { + internalType: "uint48", + name: "validAfter", + type: "uint48", + }, + { + internalType: "uint48", + name: "validUntil", + type: "uint48", + }, + { + internalType: "bytes", + name: "paymasterContext", + type: "bytes", + }, + ], + internalType: "struct IEntryPoint.ReturnInfo", + name: "returnInfo", + type: "tuple", + }, + { + components: [ + { + internalType: "uint256", + name: "stake", + type: "uint256", + }, + { + internalType: "uint256", + name: "unstakeDelaySec", + type: "uint256", + }, + ], + internalType: "struct IStakeManager.StakeInfo", + name: "senderInfo", + type: "tuple", + }, + { + components: [ + { + internalType: "uint256", + name: "stake", + type: "uint256", + }, + { + internalType: "uint256", + name: "unstakeDelaySec", + type: "uint256", + }, + ], + internalType: "struct IStakeManager.StakeInfo", + name: "factoryInfo", + type: "tuple", + }, + { + components: [ + { + internalType: "uint256", + name: "stake", + type: "uint256", + }, + { + internalType: "uint256", + name: "unstakeDelaySec", + type: "uint256", + }, + ], + internalType: "struct IStakeManager.StakeInfo", + name: "paymasterInfo", + type: "tuple", + }, + { + components: [ + { + internalType: "address", + name: "aggregator", + type: "address", + }, + { + components: [ + { + internalType: "uint256", + name: "stake", + type: "uint256", + }, + { + internalType: "uint256", + name: "unstakeDelaySec", + type: "uint256", + }, + ], + internalType: "struct IStakeManager.StakeInfo", + name: "stakeInfo", + type: "tuple", + }, + ], + internalType: "struct IEntryPoint.AggregatorStakeInfo", + name: "aggregatorInfo", + type: "tuple", + }, + ], + name: "ValidationResultWithAggregation", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "userOpHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "factory", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "paymaster", + type: "address", + }, + ], + name: "AccountDeployed", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "BeforeExecution", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "totalDeposit", + type: "uint256", + }, + ], + name: "Deposited", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "aggregator", + type: "address", + }, + ], + name: "SignatureAggregatorChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "totalStaked", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "unstakeDelaySec", + type: "uint256", + }, + ], + name: "StakeLocked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "withdrawTime", + type: "uint256", + }, + ], + name: "StakeUnlocked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "withdrawAddress", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "StakeWithdrawn", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "userOpHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "paymaster", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + indexed: false, + internalType: "bool", + name: "success", + type: "bool", + }, + { + indexed: false, + internalType: "uint256", + name: "actualGasCost", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "actualGasUsed", + type: "uint256", + }, + ], + name: "UserOperationEvent", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "userOpHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "revertReason", + type: "bytes", + }, + ], + name: "UserOperationRevertReason", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "withdrawAddress", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "Withdrawn", + type: "event", + }, + { + inputs: [], + name: "SIG_VALIDATION_FAILED", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "bytes", name: "initCode", type: "bytes" }, + { internalType: "address", name: "sender", type: "address" }, + { + internalType: "bytes", + name: "paymasterAndData", + type: "bytes", + }, + ], + name: "_validateSenderAndPaymaster", + outputs: [], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint32", + name: "unstakeDelaySec", + type: "uint32", + }, + ], + name: "addStake", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "account", type: "address" }], + name: "balanceOf", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "account", type: "address" }], + name: "depositTo", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "", type: "address" }], + name: "deposits", + outputs: [ + { internalType: "uint112", name: "deposit", type: "uint112" }, + { internalType: "bool", name: "staked", type: "bool" }, + { internalType: "uint112", name: "stake", type: "uint112" }, + { + internalType: "uint32", + name: "unstakeDelaySec", + type: "uint32", + }, + { + internalType: "uint48", + name: "withdrawTime", + type: "uint48", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "account", type: "address" }], + name: "getDepositInfo", + outputs: [ + { + components: [ + { + internalType: "uint112", + name: "deposit", + type: "uint112", + }, + { + internalType: "bool", + name: "staked", + type: "bool", + }, + { + internalType: "uint112", + name: "stake", + type: "uint112", + }, + { + internalType: "uint32", + name: "unstakeDelaySec", + type: "uint32", + }, + { + internalType: "uint48", + name: "withdrawTime", + type: "uint48", + }, + ], + internalType: "struct IStakeManager.DepositInfo", + name: "info", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "sender", type: "address" }, + { internalType: "uint192", name: "key", type: "uint192" }, + ], + name: "getNonce", + outputs: [{ internalType: "uint256", name: "nonce", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "bytes", name: "initCode", type: "bytes" }], + name: "getSenderAddress", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "bytes", + name: "initCode", + type: "bytes", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + { + internalType: "uint256", + name: "callGasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "verificationGasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "preVerificationGas", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxFeePerGas", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxPriorityFeePerGas", + type: "uint256", + }, + { + internalType: "bytes", + name: "paymasterAndData", + type: "bytes", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + internalType: "struct UserOperation", + name: "userOp", + type: "tuple", + }, + ], + name: "getUserOpHash", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + components: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "bytes", + name: "initCode", + type: "bytes", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + { + internalType: "uint256", + name: "callGasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "verificationGasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "preVerificationGas", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxFeePerGas", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxPriorityFeePerGas", + type: "uint256", + }, + { + internalType: "bytes", + name: "paymasterAndData", + type: "bytes", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + internalType: "struct UserOperation[]", + name: "userOps", + type: "tuple[]", + }, + { + internalType: "contract IAggregator", + name: "aggregator", + type: "address", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + internalType: "struct IEntryPoint.UserOpsPerAggregator[]", + name: "opsPerAggregator", + type: "tuple[]", + }, + { + internalType: "address payable", + name: "beneficiary", + type: "address", + }, + ], + name: "handleAggregatedOps", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "bytes", + name: "initCode", + type: "bytes", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + { + internalType: "uint256", + name: "callGasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "verificationGasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "preVerificationGas", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxFeePerGas", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxPriorityFeePerGas", + type: "uint256", + }, + { + internalType: "bytes", + name: "paymasterAndData", + type: "bytes", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + internalType: "struct UserOperation[]", + name: "ops", + type: "tuple[]", + }, + { + internalType: "address payable", + name: "beneficiary", + type: "address", + }, + ], + name: "handleOps", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "uint192", name: "key", type: "uint192" }], + name: "incrementNonce", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "bytes", name: "callData", type: "bytes" }, + { + components: [ + { + components: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "uint256", + name: "callGasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "verificationGasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "preVerificationGas", + type: "uint256", + }, + { + internalType: "address", + name: "paymaster", + type: "address", + }, + { + internalType: "uint256", + name: "maxFeePerGas", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxPriorityFeePerGas", + type: "uint256", + }, + ], + internalType: "struct EntryPoint.MemoryUserOp", + name: "mUserOp", + type: "tuple", + }, + { + internalType: "bytes32", + name: "userOpHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "prefund", + type: "uint256", + }, + { + internalType: "uint256", + name: "contextOffset", + type: "uint256", + }, + { + internalType: "uint256", + name: "preOpGas", + type: "uint256", + }, + ], + internalType: "struct EntryPoint.UserOpInfo", + name: "opInfo", + type: "tuple", + }, + { internalType: "bytes", name: "context", type: "bytes" }, + ], + name: "innerHandleOp", + outputs: [ + { + internalType: "uint256", + name: "actualGasCost", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "", type: "address" }, + { internalType: "uint192", name: "", type: "uint192" }, + ], + name: "nonceSequenceNumber", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "bytes", + name: "initCode", + type: "bytes", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + { + internalType: "uint256", + name: "callGasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "verificationGasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "preVerificationGas", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxFeePerGas", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxPriorityFeePerGas", + type: "uint256", + }, + { + internalType: "bytes", + name: "paymasterAndData", + type: "bytes", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + internalType: "struct UserOperation", + name: "op", + type: "tuple", + }, + { internalType: "address", name: "target", type: "address" }, + { + internalType: "bytes", + name: "targetCallData", + type: "bytes", + }, + ], + name: "simulateHandleOp", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "bytes", + name: "initCode", + type: "bytes", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + { + internalType: "uint256", + name: "callGasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "verificationGasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "preVerificationGas", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxFeePerGas", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxPriorityFeePerGas", + type: "uint256", + }, + { + internalType: "bytes", + name: "paymasterAndData", + type: "bytes", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + internalType: "struct UserOperation", + name: "userOp", + type: "tuple", + }, + ], + name: "simulateValidation", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "unlockStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address payable", + name: "withdrawAddress", + type: "address", + }, + ], + name: "withdrawStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address payable", + name: "withdrawAddress", + type: "address", + }, + { + internalType: "uint256", + name: "withdrawAmount", + type: "uint256", + }, + ], + name: "withdrawTo", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { stateMutability: "payable", type: "receive" }, +] as const; diff --git a/services/decoder/protocols/aave-v3/aave-v3.decoders.ts b/services/decoder/protocols/aave-v3/aave-v3.decoders.ts index 8d916e0..b96b185 100644 --- a/services/decoder/protocols/aave-v3/aave-v3.decoders.ts +++ b/services/decoder/protocols/aave-v3/aave-v3.decoders.ts @@ -1,13 +1,13 @@ +import { prettifyCurrency } from "@covalenthq/client-sdk"; +import { decodeEventLog, type Abi } from "viem"; +import { timestampParser } from "../../../../utils/functions"; import { GoldRushDecoder } from "../../decoder"; -import type { EventDetails, EventTokens, EventType } from "../../decoder.types"; import { DECODED_ACTION, DECODED_EVENT_CATEGORY, } from "../../decoder.constants"; -import { decodeEventLog, type Abi } from "viem"; -import ABI from "./abis/aave-v3.abi.json"; -import { prettifyCurrency } from "@covalenthq/client-sdk"; -import { timestampParser } from "../../../../utils/functions"; +import type { EventDetails, EventTokens, EventType } from "../../decoder.types"; +import { aaveV3ABI } from "./abis/aave-v3.abi"; enum INTEREST_RATE_MODE { "None" = 0, @@ -27,7 +27,7 @@ GoldRushDecoder.on( "base-mainnet", "bsc-mainnet", ], - ABI as Abi, + aaveV3ABI as Abi, async ( log_event, tx, @@ -38,22 +38,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: ABI, + abi: aaveV3ABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "Borrow", - }) as { - eventName: "Borrow"; - args: { - reserve: string; - user: string; - onBehalfOf: string; - amount: bigint; - interestRateMode: INTEREST_RATE_MODE; - borrowRate: bigint; - referralCode: bigint; - }; - }; + }); const details: EventDetails = [ { @@ -149,7 +138,7 @@ GoldRushDecoder.on( "base-mainnet", "bsc-mainnet", ], - ABI as Abi, + aaveV3ABI as Abi, async ( log_event, tx, @@ -160,22 +149,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: ABI, + abi: aaveV3ABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "FlashLoan", - }) as { - eventName: "FlashLoan"; - args: { - target: string; - initiator: string; - asset: string; - amount: bigint; - interestRateMode: INTEREST_RATE_MODE; - premium: bigint; - referralCode: bigint; - }; - }; + }); const date = timestampParser(tx.block_signed_at, "YYYY-MM-DD"); @@ -273,7 +251,7 @@ GoldRushDecoder.on( "base-mainnet", "bsc-mainnet", ], - ABI as Abi, + aaveV3ABI as Abi, async ( log_event, tx, @@ -284,22 +262,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: ABI, + abi: aaveV3ABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "LiquidationCall", - }) as { - eventName: "LiquidationCall"; - args: { - collateralAsset: string; - debtAsset: string; - user: string; - debtToCover: bigint; - liquidatedCollateralAmount: bigint; - liquidator: string; - receiveAToken: boolean; - }; - }; + }); const details: EventDetails = [ { @@ -407,7 +374,7 @@ GoldRushDecoder.on( "base-mainnet", "bsc-mainnet", ], - ABI as Abi, + aaveV3ABI as Abi, async ( log_event, tx, @@ -418,20 +385,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: ABI, + abi: aaveV3ABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "Repay", - }) as { - eventName: "Repay"; - args: { - reserve: string; - user: string; - repayer: string; - amount: bigint; - useATokens: boolean; - }; - }; + }); const details: EventDetails = [ { @@ -514,7 +472,7 @@ GoldRushDecoder.on( "base-mainnet", "bsc-mainnet", ], - ABI as Abi, + aaveV3ABI as Abi, async ( log_event, tx, @@ -525,20 +483,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: ABI, + abi: aaveV3ABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "Supply", - }) as { - eventName: "Supply"; - args: { - reserve: string; - user: string; - onBehalfOf: string; - amount: bigint; - referralCode: bigint; - }; - }; + }); const details: EventDetails = [ { @@ -618,7 +567,7 @@ GoldRushDecoder.on( "base-mainnet", "bsc-mainnet", ], - ABI as Abi, + aaveV3ABI as Abi, async ( log_event, tx, @@ -629,19 +578,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: ABI, + abi: aaveV3ABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "Withdraw", - }) as { - eventName: "Withdraw"; - args: { - reserve: string; - user: string; - to: string; - amount: bigint; - }; - }; + }); const details: EventDetails = [ { diff --git a/services/decoder/protocols/aave-v3/abis/aave-v3.abi.json b/services/decoder/protocols/aave-v3/abis/aave-v3.abi.json deleted file mode 100644 index aaa694a..0000000 --- a/services/decoder/protocols/aave-v3/abis/aave-v3.abi.json +++ /dev/null @@ -1,1405 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "contract IPoolAddressesProvider", - "name": "provider", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "backer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - } - ], - "name": "BackUnbacked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "onBehalfOf", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "enum DataTypes.InterestRateMode", - "name": "interestRateMode", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowRate", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint16", - "name": "referralCode", - "type": "uint16" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "initiator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "enum DataTypes.InterestRateMode", - "name": "interestRateMode", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "premium", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint16", - "name": "referralCode", - "type": "uint16" - } - ], - "name": "FlashLoan", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalDebt", - "type": "uint256" - } - ], - "name": "IsolationModeTotalDebtUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "collateralAsset", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "debtAsset", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "debtToCover", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "liquidatedCollateralAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "receiveAToken", - "type": "bool" - } - ], - "name": "LiquidationCall", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "onBehalfOf", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint16", - "name": "referralCode", - "type": "uint16" - } - ], - "name": "MintUnbacked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountMinted", - "type": "uint256" - } - ], - "name": "MintedToTreasury", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "RebalanceStableBorrowRate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "repayer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "useATokens", - "type": "bool" - } - ], - "name": "Repay", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "liquidityRate", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "stableBorrowRate", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "variableBorrowRate", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "liquidityIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "variableBorrowIndex", - "type": "uint256" - } - ], - "name": "ReserveDataUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "ReserveUsedAsCollateralDisabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "ReserveUsedAsCollateralEnabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "onBehalfOf", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint16", - "name": "referralCode", - "type": "uint16" - } - ], - "name": "Supply", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "enum DataTypes.InterestRateMode", - "name": "interestRateMode", - "type": "uint8" - } - ], - "name": "SwapBorrowRateMode", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "categoryId", - "type": "uint8" - } - ], - "name": "UserEModeSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "reserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Withdraw", - "type": "event" - }, - { - "inputs": [], - "name": "ADDRESSES_PROVIDER", - "outputs": [ - { - "internalType": "contract IPoolAddressesProvider", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "BRIDGE_PROTOCOL_FEE", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "FLASHLOAN_PREMIUM_TOTAL", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "FLASHLOAN_PREMIUM_TO_PROTOCOL", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_NUMBER_RESERVES", - "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_STABLE_RATE_BORROW_SIZE_PERCENT", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "POOL_REVISION", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "asset", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { "internalType": "uint256", "name": "fee", "type": "uint256" } - ], - "name": "backUnbacked", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "asset", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { - "internalType": "uint256", - "name": "interestRateMode", - "type": "uint256" - }, - { - "internalType": "uint16", - "name": "referralCode", - "type": "uint16" - }, - { - "internalType": "address", - "name": "onBehalfOf", - "type": "address" - } - ], - "name": "borrow", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint8", "name": "id", "type": "uint8" }, - { - "components": [ - { - "internalType": "uint16", - "name": "ltv", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "liquidationThreshold", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "liquidationBonus", - "type": "uint16" - }, - { - "internalType": "address", - "name": "priceSource", - "type": "address" - }, - { - "internalType": "string", - "name": "label", - "type": "string" - } - ], - "internalType": "struct DataTypes.EModeCategory", - "name": "category", - "type": "tuple" - } - ], - "name": "configureEModeCategory", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "asset", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { - "internalType": "address", - "name": "onBehalfOf", - "type": "address" - }, - { - "internalType": "uint16", - "name": "referralCode", - "type": "uint16" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "asset", "type": "address" } - ], - "name": "dropReserve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "asset", "type": "address" }, - { "internalType": "address", "name": "from", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { - "internalType": "uint256", - "name": "balanceFromBefore", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "balanceToBefore", - "type": "uint256" - } - ], - "name": "finalizeTransfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiverAddress", - "type": "address" - }, - { - "internalType": "address[]", - "name": "assets", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "interestRateModes", - "type": "uint256[]" - }, - { - "internalType": "address", - "name": "onBehalfOf", - "type": "address" - }, - { "internalType": "bytes", "name": "params", "type": "bytes" }, - { - "internalType": "uint16", - "name": "referralCode", - "type": "uint16" - } - ], - "name": "flashLoan", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiverAddress", - "type": "address" - }, - { "internalType": "address", "name": "asset", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { "internalType": "bytes", "name": "params", "type": "bytes" }, - { - "internalType": "uint16", - "name": "referralCode", - "type": "uint16" - } - ], - "name": "flashLoanSimple", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "asset", "type": "address" } - ], - "name": "getConfiguration", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "data", - "type": "uint256" - } - ], - "internalType": "struct DataTypes.ReserveConfigurationMap", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint8", "name": "id", "type": "uint8" }], - "name": "getEModeCategoryData", - "outputs": [ - { - "components": [ - { - "internalType": "uint16", - "name": "ltv", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "liquidationThreshold", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "liquidationBonus", - "type": "uint16" - }, - { - "internalType": "address", - "name": "priceSource", - "type": "address" - }, - { - "internalType": "string", - "name": "label", - "type": "string" - } - ], - "internalType": "struct DataTypes.EModeCategory", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint16", "name": "id", "type": "uint16" } - ], - "name": "getReserveAddressById", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "asset", "type": "address" } - ], - "name": "getReserveData", - "outputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "uint256", - "name": "data", - "type": "uint256" - } - ], - "internalType": "struct DataTypes.ReserveConfigurationMap", - "name": "configuration", - "type": "tuple" - }, - { - "internalType": "uint128", - "name": "liquidityIndex", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "currentLiquidityRate", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "variableBorrowIndex", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "currentVariableBorrowRate", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "currentStableBorrowRate", - "type": "uint128" - }, - { - "internalType": "uint40", - "name": "lastUpdateTimestamp", - "type": "uint40" - }, - { - "internalType": "uint16", - "name": "id", - "type": "uint16" - }, - { - "internalType": "address", - "name": "aTokenAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "stableDebtTokenAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "variableDebtTokenAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "interestRateStrategyAddress", - "type": "address" - }, - { - "internalType": "uint128", - "name": "accruedToTreasury", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "unbacked", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "isolationModeTotalDebt", - "type": "uint128" - } - ], - "internalType": "struct DataTypes.ReserveData", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "asset", "type": "address" } - ], - "name": "getReserveNormalizedIncome", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "asset", "type": "address" } - ], - "name": "getReserveNormalizedVariableDebt", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getReservesList", - "outputs": [ - { "internalType": "address[]", "name": "", "type": "address[]" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "user", "type": "address" } - ], - "name": "getUserAccountData", - "outputs": [ - { - "internalType": "uint256", - "name": "totalCollateralBase", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalDebtBase", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "availableBorrowsBase", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "currentLiquidationThreshold", - "type": "uint256" - }, - { "internalType": "uint256", "name": "ltv", "type": "uint256" }, - { - "internalType": "uint256", - "name": "healthFactor", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "user", "type": "address" } - ], - "name": "getUserConfiguration", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "data", - "type": "uint256" - } - ], - "internalType": "struct DataTypes.UserConfigurationMap", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "user", "type": "address" } - ], - "name": "getUserEMode", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "asset", "type": "address" }, - { - "internalType": "address", - "name": "aTokenAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "stableDebtAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "variableDebtAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "interestRateStrategyAddress", - "type": "address" - } - ], - "name": "initReserve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IPoolAddressesProvider", - "name": "provider", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "collateralAsset", - "type": "address" - }, - { - "internalType": "address", - "name": "debtAsset", - "type": "address" - }, - { "internalType": "address", "name": "user", "type": "address" }, - { - "internalType": "uint256", - "name": "debtToCover", - "type": "uint256" - }, - { "internalType": "bool", "name": "receiveAToken", "type": "bool" } - ], - "name": "liquidationCall", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "assets", - "type": "address[]" - } - ], - "name": "mintToTreasury", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "asset", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { - "internalType": "address", - "name": "onBehalfOf", - "type": "address" - }, - { - "internalType": "uint16", - "name": "referralCode", - "type": "uint16" - } - ], - "name": "mintUnbacked", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "asset", "type": "address" }, - { "internalType": "address", "name": "user", "type": "address" } - ], - "name": "rebalanceStableBorrowRate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "asset", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { - "internalType": "uint256", - "name": "interestRateMode", - "type": "uint256" - }, - { - "internalType": "address", - "name": "onBehalfOf", - "type": "address" - } - ], - "name": "repay", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "asset", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { - "internalType": "uint256", - "name": "interestRateMode", - "type": "uint256" - } - ], - "name": "repayWithATokens", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "asset", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { - "internalType": "uint256", - "name": "interestRateMode", - "type": "uint256" - }, - { - "internalType": "address", - "name": "onBehalfOf", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { "internalType": "uint8", "name": "permitV", "type": "uint8" }, - { "internalType": "bytes32", "name": "permitR", "type": "bytes32" }, - { "internalType": "bytes32", "name": "permitS", "type": "bytes32" } - ], - "name": "repayWithPermit", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "token", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "rescueTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "asset", "type": "address" } - ], - "name": "resetIsolationModeTotalDebt", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "asset", "type": "address" }, - { - "components": [ - { - "internalType": "uint256", - "name": "data", - "type": "uint256" - } - ], - "internalType": "struct DataTypes.ReserveConfigurationMap", - "name": "configuration", - "type": "tuple" - } - ], - "name": "setConfiguration", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "asset", "type": "address" }, - { - "internalType": "address", - "name": "rateStrategyAddress", - "type": "address" - } - ], - "name": "setReserveInterestRateStrategyAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint8", "name": "categoryId", "type": "uint8" } - ], - "name": "setUserEMode", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "asset", "type": "address" }, - { - "internalType": "bool", - "name": "useAsCollateral", - "type": "bool" - } - ], - "name": "setUserUseReserveAsCollateral", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "asset", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { - "internalType": "address", - "name": "onBehalfOf", - "type": "address" - }, - { - "internalType": "uint16", - "name": "referralCode", - "type": "uint16" - } - ], - "name": "supply", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "asset", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { - "internalType": "address", - "name": "onBehalfOf", - "type": "address" - }, - { - "internalType": "uint16", - "name": "referralCode", - "type": "uint16" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { "internalType": "uint8", "name": "permitV", "type": "uint8" }, - { "internalType": "bytes32", "name": "permitR", "type": "bytes32" }, - { "internalType": "bytes32", "name": "permitS", "type": "bytes32" } - ], - "name": "supplyWithPermit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "asset", "type": "address" }, - { - "internalType": "uint256", - "name": "interestRateMode", - "type": "uint256" - } - ], - "name": "swapBorrowRateMode", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "protocolFee", - "type": "uint256" - } - ], - "name": "updateBridgeProtocolFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "flashLoanPremiumTotal", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "flashLoanPremiumToProtocol", - "type": "uint128" - } - ], - "name": "updateFlashloanPremiums", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "asset", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { "internalType": "address", "name": "to", "type": "address" } - ], - "name": "withdraw", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/services/decoder/protocols/aave-v3/abis/aave-v3.abi.ts b/services/decoder/protocols/aave-v3/abis/aave-v3.abi.ts new file mode 100644 index 0000000..eeaea73 --- /dev/null +++ b/services/decoder/protocols/aave-v3/abis/aave-v3.abi.ts @@ -0,0 +1,1586 @@ +export const aaveV3ABI = [ + { + inputs: [ + { + internalType: "contract IPoolAddressesProvider", + name: "provider", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "reserve", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "backer", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "fee", + type: "uint256", + }, + ], + name: "BackUnbacked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "reserve", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "onBehalfOf", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "enum DataTypes.InterestRateMode", + name: "interestRateMode", + type: "uint8", + }, + { + indexed: false, + internalType: "uint256", + name: "borrowRate", + type: "uint256", + }, + { + indexed: true, + internalType: "uint16", + name: "referralCode", + type: "uint16", + }, + ], + name: "Borrow", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "target", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "initiator", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "asset", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "enum DataTypes.InterestRateMode", + name: "interestRateMode", + type: "uint8", + }, + { + indexed: false, + internalType: "uint256", + name: "premium", + type: "uint256", + }, + { + indexed: true, + internalType: "uint16", + name: "referralCode", + type: "uint16", + }, + ], + name: "FlashLoan", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "asset", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "totalDebt", + type: "uint256", + }, + ], + name: "IsolationModeTotalDebtUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "collateralAsset", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "debtAsset", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "debtToCover", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "liquidatedCollateralAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "liquidator", + type: "address", + }, + { + indexed: false, + internalType: "bool", + name: "receiveAToken", + type: "bool", + }, + ], + name: "LiquidationCall", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "reserve", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "onBehalfOf", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: true, + internalType: "uint16", + name: "referralCode", + type: "uint16", + }, + ], + name: "MintUnbacked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "reserve", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amountMinted", + type: "uint256", + }, + ], + name: "MintedToTreasury", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "reserve", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "user", + type: "address", + }, + ], + name: "RebalanceStableBorrowRate", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "reserve", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "repayer", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "bool", + name: "useATokens", + type: "bool", + }, + ], + name: "Repay", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "reserve", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "liquidityRate", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "stableBorrowRate", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "variableBorrowRate", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "liquidityIndex", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "variableBorrowIndex", + type: "uint256", + }, + ], + name: "ReserveDataUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "reserve", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "user", + type: "address", + }, + ], + name: "ReserveUsedAsCollateralDisabled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "reserve", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "user", + type: "address", + }, + ], + name: "ReserveUsedAsCollateralEnabled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "reserve", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "onBehalfOf", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: true, + internalType: "uint16", + name: "referralCode", + type: "uint16", + }, + ], + name: "Supply", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "reserve", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "enum DataTypes.InterestRateMode", + name: "interestRateMode", + type: "uint8", + }, + ], + name: "SwapBorrowRateMode", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "uint8", + name: "categoryId", + type: "uint8", + }, + ], + name: "UserEModeSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "reserve", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "Withdraw", + type: "event", + }, + { + inputs: [], + name: "ADDRESSES_PROVIDER", + outputs: [ + { + internalType: "contract IPoolAddressesProvider", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "BRIDGE_PROTOCOL_FEE", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "FLASHLOAN_PREMIUM_TOTAL", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "FLASHLOAN_PREMIUM_TO_PROTOCOL", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MAX_NUMBER_RESERVES", + outputs: [{ internalType: "uint16", name: "", type: "uint16" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MAX_STABLE_RATE_BORROW_SIZE_PERCENT", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "POOL_REVISION", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "asset", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + { internalType: "uint256", name: "fee", type: "uint256" }, + ], + name: "backUnbacked", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "asset", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + { + internalType: "uint256", + name: "interestRateMode", + type: "uint256", + }, + { + internalType: "uint16", + name: "referralCode", + type: "uint16", + }, + { + internalType: "address", + name: "onBehalfOf", + type: "address", + }, + ], + name: "borrow", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint8", name: "id", type: "uint8" }, + { + components: [ + { + internalType: "uint16", + name: "ltv", + type: "uint16", + }, + { + internalType: "uint16", + name: "liquidationThreshold", + type: "uint16", + }, + { + internalType: "uint16", + name: "liquidationBonus", + type: "uint16", + }, + { + internalType: "address", + name: "priceSource", + type: "address", + }, + { + internalType: "string", + name: "label", + type: "string", + }, + ], + internalType: "struct DataTypes.EModeCategory", + name: "category", + type: "tuple", + }, + ], + name: "configureEModeCategory", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "asset", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + { + internalType: "address", + name: "onBehalfOf", + type: "address", + }, + { + internalType: "uint16", + name: "referralCode", + type: "uint16", + }, + ], + name: "deposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "asset", type: "address" }], + name: "dropReserve", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "asset", type: "address" }, + { internalType: "address", name: "from", type: "address" }, + { internalType: "address", name: "to", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + { + internalType: "uint256", + name: "balanceFromBefore", + type: "uint256", + }, + { + internalType: "uint256", + name: "balanceToBefore", + type: "uint256", + }, + ], + name: "finalizeTransfer", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "receiverAddress", + type: "address", + }, + { + internalType: "address[]", + name: "assets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "amounts", + type: "uint256[]", + }, + { + internalType: "uint256[]", + name: "interestRateModes", + type: "uint256[]", + }, + { + internalType: "address", + name: "onBehalfOf", + type: "address", + }, + { internalType: "bytes", name: "params", type: "bytes" }, + { + internalType: "uint16", + name: "referralCode", + type: "uint16", + }, + ], + name: "flashLoan", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "receiverAddress", + type: "address", + }, + { internalType: "address", name: "asset", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + { internalType: "bytes", name: "params", type: "bytes" }, + { + internalType: "uint16", + name: "referralCode", + type: "uint16", + }, + ], + name: "flashLoanSimple", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "asset", + type: "address", + }, + ], + name: "getConfiguration", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "data", + type: "uint256", + }, + ], + internalType: "struct DataTypes.ReserveConfigurationMap", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint8", + name: "id", + type: "uint8", + }, + ], + name: "getEModeCategoryData", + outputs: [ + { + components: [ + { + internalType: "uint16", + name: "ltv", + type: "uint16", + }, + { + internalType: "uint16", + name: "liquidationThreshold", + type: "uint16", + }, + { + internalType: "uint16", + name: "liquidationBonus", + type: "uint16", + }, + { + internalType: "address", + name: "priceSource", + type: "address", + }, + { + internalType: "string", + name: "label", + type: "string", + }, + ], + internalType: "struct DataTypes.EModeCategory", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint16", + name: "id", + type: "uint16", + }, + ], + name: "getReserveAddressById", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "asset", + type: "address", + }, + ], + name: "getReserveData", + outputs: [ + { + components: [ + { + components: [ + { + internalType: "uint256", + name: "data", + type: "uint256", + }, + ], + internalType: + "struct DataTypes.ReserveConfigurationMap", + name: "configuration", + type: "tuple", + }, + { + internalType: "uint128", + name: "liquidityIndex", + type: "uint128", + }, + { + internalType: "uint128", + name: "currentLiquidityRate", + type: "uint128", + }, + { + internalType: "uint128", + name: "variableBorrowIndex", + type: "uint128", + }, + { + internalType: "uint128", + name: "currentVariableBorrowRate", + type: "uint128", + }, + { + internalType: "uint128", + name: "currentStableBorrowRate", + type: "uint128", + }, + { + internalType: "uint40", + name: "lastUpdateTimestamp", + type: "uint40", + }, + { + internalType: "uint16", + name: "id", + type: "uint16", + }, + { + internalType: "address", + name: "aTokenAddress", + type: "address", + }, + { + internalType: "address", + name: "stableDebtTokenAddress", + type: "address", + }, + { + internalType: "address", + name: "variableDebtTokenAddress", + type: "address", + }, + { + internalType: "address", + name: "interestRateStrategyAddress", + type: "address", + }, + { + internalType: "uint128", + name: "accruedToTreasury", + type: "uint128", + }, + { + internalType: "uint128", + name: "unbacked", + type: "uint128", + }, + { + internalType: "uint128", + name: "isolationModeTotalDebt", + type: "uint128", + }, + ], + internalType: "struct DataTypes.ReserveData", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "asset", + type: "address", + }, + ], + name: "getReserveNormalizedIncome", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "asset", + type: "address", + }, + ], + name: "getReserveNormalizedVariableDebt", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getReservesList", + outputs: [ + { + internalType: "address[]", + name: "", + type: "address[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "user", + type: "address", + }, + ], + name: "getUserAccountData", + outputs: [ + { + internalType: "uint256", + name: "totalCollateralBase", + type: "uint256", + }, + { + internalType: "uint256", + name: "totalDebtBase", + type: "uint256", + }, + { + internalType: "uint256", + name: "availableBorrowsBase", + type: "uint256", + }, + { + internalType: "uint256", + name: "currentLiquidationThreshold", + type: "uint256", + }, + { + internalType: "uint256", + name: "ltv", + type: "uint256", + }, + { + internalType: "uint256", + name: "healthFactor", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "user", + type: "address", + }, + ], + name: "getUserConfiguration", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "data", + type: "uint256", + }, + ], + internalType: "struct DataTypes.UserConfigurationMap", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "user", + type: "address", + }, + ], + name: "getUserEMode", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "asset", + type: "address", + }, + { + internalType: "address", + name: "aTokenAddress", + type: "address", + }, + { + internalType: "address", + name: "stableDebtAddress", + type: "address", + }, + { + internalType: "address", + name: "variableDebtAddress", + type: "address", + }, + { + internalType: "address", + name: "interestRateStrategyAddress", + type: "address", + }, + ], + name: "initReserve", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IPoolAddressesProvider", + name: "provider", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "collateralAsset", + type: "address", + }, + { + internalType: "address", + name: "debtAsset", + type: "address", + }, + { + internalType: "address", + name: "user", + type: "address", + }, + { + internalType: "uint256", + name: "debtToCover", + type: "uint256", + }, + { + internalType: "bool", + name: "receiveAToken", + type: "bool", + }, + ], + name: "liquidationCall", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "assets", + type: "address[]", + }, + ], + name: "mintToTreasury", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "asset", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "onBehalfOf", + type: "address", + }, + { + internalType: "uint16", + name: "referralCode", + type: "uint16", + }, + ], + name: "mintUnbacked", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "asset", + type: "address", + }, + { + internalType: "address", + name: "user", + type: "address", + }, + ], + name: "rebalanceStableBorrowRate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "asset", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "uint256", + name: "interestRateMode", + type: "uint256", + }, + { + internalType: "address", + name: "onBehalfOf", + type: "address", + }, + ], + name: "repay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "asset", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "uint256", + name: "interestRateMode", + type: "uint256", + }, + ], + name: "repayWithATokens", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "asset", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "uint256", + name: "interestRateMode", + type: "uint256", + }, + { + internalType: "address", + name: "onBehalfOf", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "uint8", + name: "permitV", + type: "uint8", + }, + { + internalType: "bytes32", + name: "permitR", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "permitS", + type: "bytes32", + }, + ], + name: "repayWithPermit", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "rescueTokens", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "asset", + type: "address", + }, + ], + name: "resetIsolationModeTotalDebt", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "asset", + type: "address", + }, + { + components: [ + { + internalType: "uint256", + name: "data", + type: "uint256", + }, + ], + internalType: "struct DataTypes.ReserveConfigurationMap", + name: "configuration", + type: "tuple", + }, + ], + name: "setConfiguration", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "asset", + type: "address", + }, + { + internalType: "address", + name: "rateStrategyAddress", + type: "address", + }, + ], + name: "setReserveInterestRateStrategyAddress", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint8", + name: "categoryId", + type: "uint8", + }, + ], + name: "setUserEMode", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "asset", + type: "address", + }, + { + internalType: "bool", + name: "useAsCollateral", + type: "bool", + }, + ], + name: "setUserUseReserveAsCollateral", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "asset", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "onBehalfOf", + type: "address", + }, + { + internalType: "uint16", + name: "referralCode", + type: "uint16", + }, + ], + name: "supply", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "asset", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "onBehalfOf", + type: "address", + }, + { + internalType: "uint16", + name: "referralCode", + type: "uint16", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "uint8", + name: "permitV", + type: "uint8", + }, + { + internalType: "bytes32", + name: "permitR", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "permitS", + type: "bytes32", + }, + ], + name: "supplyWithPermit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "asset", + type: "address", + }, + { + internalType: "uint256", + name: "interestRateMode", + type: "uint256", + }, + ], + name: "swapBorrowRateMode", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "protocolFee", + type: "uint256", + }, + ], + name: "updateBridgeProtocolFee", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "flashLoanPremiumTotal", + type: "uint128", + }, + { + internalType: "uint128", + name: "flashLoanPremiumToProtocol", + type: "uint128", + }, + ], + name: "updateFlashloanPremiums", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "asset", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "withdraw", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +] as const; diff --git a/services/decoder/protocols/blur/abis/blur-exchange.abi.ts b/services/decoder/protocols/blur/abis/blur-exchange.abi.ts new file mode 100644 index 0000000..fc02ab2 --- /dev/null +++ b/services/decoder/protocols/blur/abis/blur-exchange.abi.ts @@ -0,0 +1,1863 @@ +export const blurExchangeABI = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "previousAdmin", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newAdmin", + type: "address", + }, + ], + name: "AdminChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "beacon", + type: "address", + }, + ], + name: "BeaconUpgraded", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "Closed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "version", + type: "uint8", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "blockRange", + type: "uint256", + }, + ], + name: "NewBlockRange", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract IExecutionDelegate", + name: "executionDelegate", + type: "address", + }, + ], + name: "NewExecutionDelegate", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "feeRate", + type: "uint256", + }, + ], + name: "NewFeeRate", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "feeRecipient", + type: "address", + }, + ], + name: "NewFeeRecipient", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "governor", + type: "address", + }, + ], + name: "NewGovernor", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "oracle", + type: "address", + }, + ], + name: "NewOracle", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "contract IPolicyManager", + name: "policyManager", + type: "address", + }, + ], + name: "NewPolicyManager", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "trader", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "newNonce", + type: "uint256", + }, + ], + name: "NonceIncremented", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "Opened", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "hash", + type: "bytes32", + }, + ], + name: "OrderCancelled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "maker", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "taker", + type: "address", + }, + { + components: [ + { + internalType: "address", + name: "trader", + type: "address", + }, + { + internalType: "enum Side", + name: "side", + type: "uint8", + }, + { + internalType: "address", + name: "matchingPolicy", + type: "address", + }, + { + internalType: "address", + name: "collection", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "paymentToken", + type: "address", + }, + { + internalType: "uint256", + name: "price", + type: "uint256", + }, + { + internalType: "uint256", + name: "listingTime", + type: "uint256", + }, + { + internalType: "uint256", + name: "expirationTime", + type: "uint256", + }, + { + components: [ + { + internalType: "uint16", + name: "rate", + type: "uint16", + }, + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + ], + internalType: "struct Fee[]", + name: "fees", + type: "tuple[]", + }, + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "bytes", + name: "extraParams", + type: "bytes", + }, + ], + indexed: false, + internalType: "struct Order", + name: "sell", + type: "tuple", + }, + { + indexed: false, + internalType: "bytes32", + name: "sellHash", + type: "bytes32", + }, + { + components: [ + { + internalType: "address", + name: "trader", + type: "address", + }, + { + internalType: "enum Side", + name: "side", + type: "uint8", + }, + { + internalType: "address", + name: "matchingPolicy", + type: "address", + }, + { + internalType: "address", + name: "collection", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "paymentToken", + type: "address", + }, + { + internalType: "uint256", + name: "price", + type: "uint256", + }, + { + internalType: "uint256", + name: "listingTime", + type: "uint256", + }, + { + internalType: "uint256", + name: "expirationTime", + type: "uint256", + }, + { + components: [ + { + internalType: "uint16", + name: "rate", + type: "uint16", + }, + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + ], + internalType: "struct Fee[]", + name: "fees", + type: "tuple[]", + }, + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "bytes", + name: "extraParams", + type: "bytes", + }, + ], + indexed: false, + internalType: "struct Order", + name: "buy", + type: "tuple", + }, + { + indexed: false, + internalType: "bytes32", + name: "buyHash", + type: "bytes32", + }, + ], + name: "OrdersMatched", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "implementation", + type: "address", + }, + ], + name: "Upgraded", + type: "event", + }, + { + inputs: [], + name: "FEE_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "INVERSE_BASIS_POINT", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "NAME", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "ORACLE_ORDER_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "ORDER_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "POOL", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "ROOT_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "VERSION", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "WETH", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + components: [ + { + internalType: "address", + name: "trader", + type: "address", + }, + { + internalType: "enum Side", + name: "side", + type: "uint8", + }, + { + internalType: "address", + name: "matchingPolicy", + type: "address", + }, + { + internalType: "address", + name: "collection", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "paymentToken", + type: "address", + }, + { + internalType: "uint256", + name: "price", + type: "uint256", + }, + { + internalType: "uint256", + name: "listingTime", + type: "uint256", + }, + { + internalType: "uint256", + name: "expirationTime", + type: "uint256", + }, + { + components: [ + { + internalType: "uint16", + name: "rate", + type: "uint16", + }, + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + ], + internalType: "struct Fee[]", + name: "fees", + type: "tuple[]", + }, + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "bytes", + name: "extraParams", + type: "bytes", + }, + ], + internalType: "struct Order", + name: "order", + type: "tuple", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + { + internalType: "bytes", + name: "extraSignature", + type: "bytes", + }, + { + internalType: "enum SignatureVersion", + name: "signatureVersion", + type: "uint8", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + internalType: "struct Input", + name: "sell", + type: "tuple", + }, + { + components: [ + { + components: [ + { + internalType: "address", + name: "trader", + type: "address", + }, + { + internalType: "enum Side", + name: "side", + type: "uint8", + }, + { + internalType: "address", + name: "matchingPolicy", + type: "address", + }, + { + internalType: "address", + name: "collection", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "paymentToken", + type: "address", + }, + { + internalType: "uint256", + name: "price", + type: "uint256", + }, + { + internalType: "uint256", + name: "listingTime", + type: "uint256", + }, + { + internalType: "uint256", + name: "expirationTime", + type: "uint256", + }, + { + components: [ + { + internalType: "uint16", + name: "rate", + type: "uint16", + }, + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + ], + internalType: "struct Fee[]", + name: "fees", + type: "tuple[]", + }, + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "bytes", + name: "extraParams", + type: "bytes", + }, + ], + internalType: "struct Order", + name: "order", + type: "tuple", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + { + internalType: "bytes", + name: "extraSignature", + type: "bytes", + }, + { + internalType: "enum SignatureVersion", + name: "signatureVersion", + type: "uint8", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + internalType: "struct Input", + name: "buy", + type: "tuple", + }, + ], + name: "_execute", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "blockRange", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + components: [ + { + components: [ + { + internalType: "address", + name: "trader", + type: "address", + }, + { + internalType: "enum Side", + name: "side", + type: "uint8", + }, + { + internalType: "address", + name: "matchingPolicy", + type: "address", + }, + { + internalType: "address", + name: "collection", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "paymentToken", + type: "address", + }, + { + internalType: "uint256", + name: "price", + type: "uint256", + }, + { + internalType: "uint256", + name: "listingTime", + type: "uint256", + }, + { + internalType: "uint256", + name: "expirationTime", + type: "uint256", + }, + { + components: [ + { + internalType: "uint16", + name: "rate", + type: "uint16", + }, + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + ], + internalType: "struct Fee[]", + name: "fees", + type: "tuple[]", + }, + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "bytes", + name: "extraParams", + type: "bytes", + }, + ], + internalType: "struct Order", + name: "order", + type: "tuple", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + { + internalType: "bytes", + name: "extraSignature", + type: "bytes", + }, + { + internalType: "enum SignatureVersion", + name: "signatureVersion", + type: "uint8", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + internalType: "struct Input", + name: "sell", + type: "tuple", + }, + { + components: [ + { + components: [ + { + internalType: "address", + name: "trader", + type: "address", + }, + { + internalType: "enum Side", + name: "side", + type: "uint8", + }, + { + internalType: "address", + name: "matchingPolicy", + type: "address", + }, + { + internalType: "address", + name: "collection", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "paymentToken", + type: "address", + }, + { + internalType: "uint256", + name: "price", + type: "uint256", + }, + { + internalType: "uint256", + name: "listingTime", + type: "uint256", + }, + { + internalType: "uint256", + name: "expirationTime", + type: "uint256", + }, + { + components: [ + { + internalType: "uint16", + name: "rate", + type: "uint16", + }, + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + ], + internalType: "struct Fee[]", + name: "fees", + type: "tuple[]", + }, + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "bytes", + name: "extraParams", + type: "bytes", + }, + ], + internalType: "struct Order", + name: "order", + type: "tuple", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + { + internalType: "bytes", + name: "extraSignature", + type: "bytes", + }, + { + internalType: "enum SignatureVersion", + name: "signatureVersion", + type: "uint8", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + internalType: "struct Input", + name: "buy", + type: "tuple", + }, + ], + internalType: "struct Execution[]", + name: "executions", + type: "tuple[]", + }, + ], + name: "bulkExecute", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "trader", + type: "address", + }, + { + internalType: "enum Side", + name: "side", + type: "uint8", + }, + { + internalType: "address", + name: "matchingPolicy", + type: "address", + }, + { + internalType: "address", + name: "collection", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "paymentToken", + type: "address", + }, + { + internalType: "uint256", + name: "price", + type: "uint256", + }, + { + internalType: "uint256", + name: "listingTime", + type: "uint256", + }, + { + internalType: "uint256", + name: "expirationTime", + type: "uint256", + }, + { + components: [ + { + internalType: "uint16", + name: "rate", + type: "uint16", + }, + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + ], + internalType: "struct Fee[]", + name: "fees", + type: "tuple[]", + }, + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "bytes", + name: "extraParams", + type: "bytes", + }, + ], + internalType: "struct Order", + name: "order", + type: "tuple", + }, + ], + name: "cancelOrder", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "trader", + type: "address", + }, + { + internalType: "enum Side", + name: "side", + type: "uint8", + }, + { + internalType: "address", + name: "matchingPolicy", + type: "address", + }, + { + internalType: "address", + name: "collection", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "paymentToken", + type: "address", + }, + { + internalType: "uint256", + name: "price", + type: "uint256", + }, + { + internalType: "uint256", + name: "listingTime", + type: "uint256", + }, + { + internalType: "uint256", + name: "expirationTime", + type: "uint256", + }, + { + components: [ + { + internalType: "uint16", + name: "rate", + type: "uint16", + }, + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + ], + internalType: "struct Fee[]", + name: "fees", + type: "tuple[]", + }, + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "bytes", + name: "extraParams", + type: "bytes", + }, + ], + internalType: "struct Order[]", + name: "orders", + type: "tuple[]", + }, + ], + name: "cancelOrders", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + name: "cancelledOrFilled", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "close", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + components: [ + { + internalType: "address", + name: "trader", + type: "address", + }, + { + internalType: "enum Side", + name: "side", + type: "uint8", + }, + { + internalType: "address", + name: "matchingPolicy", + type: "address", + }, + { + internalType: "address", + name: "collection", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "paymentToken", + type: "address", + }, + { + internalType: "uint256", + name: "price", + type: "uint256", + }, + { + internalType: "uint256", + name: "listingTime", + type: "uint256", + }, + { + internalType: "uint256", + name: "expirationTime", + type: "uint256", + }, + { + components: [ + { + internalType: "uint16", + name: "rate", + type: "uint16", + }, + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + ], + internalType: "struct Fee[]", + name: "fees", + type: "tuple[]", + }, + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "bytes", + name: "extraParams", + type: "bytes", + }, + ], + internalType: "struct Order", + name: "order", + type: "tuple", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + { + internalType: "bytes", + name: "extraSignature", + type: "bytes", + }, + { + internalType: "enum SignatureVersion", + name: "signatureVersion", + type: "uint8", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + internalType: "struct Input", + name: "sell", + type: "tuple", + }, + { + components: [ + { + components: [ + { + internalType: "address", + name: "trader", + type: "address", + }, + { + internalType: "enum Side", + name: "side", + type: "uint8", + }, + { + internalType: "address", + name: "matchingPolicy", + type: "address", + }, + { + internalType: "address", + name: "collection", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "paymentToken", + type: "address", + }, + { + internalType: "uint256", + name: "price", + type: "uint256", + }, + { + internalType: "uint256", + name: "listingTime", + type: "uint256", + }, + { + internalType: "uint256", + name: "expirationTime", + type: "uint256", + }, + { + components: [ + { + internalType: "uint16", + name: "rate", + type: "uint16", + }, + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + ], + internalType: "struct Fee[]", + name: "fees", + type: "tuple[]", + }, + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "bytes", + name: "extraParams", + type: "bytes", + }, + ], + internalType: "struct Order", + name: "order", + type: "tuple", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + { + internalType: "bytes", + name: "extraSignature", + type: "bytes", + }, + { + internalType: "enum SignatureVersion", + name: "signatureVersion", + type: "uint8", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + internalType: "struct Input", + name: "buy", + type: "tuple", + }, + ], + name: "execute", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "executionDelegate", + outputs: [ + { + internalType: "contract IExecutionDelegate", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "feeRate", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "feeRecipient", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "governor", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "incrementNonce", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IExecutionDelegate", + name: "_executionDelegate", + type: "address", + }, + { + internalType: "contract IPolicyManager", + name: "_policyManager", + type: "address", + }, + { + internalType: "address", + name: "_oracle", + type: "address", + }, + { + internalType: "uint256", + name: "_blockRange", + type: "uint256", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "isInternal", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "isOpen", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "nonces", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "open", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "oracle", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "policyManager", + outputs: [ + { + internalType: "contract IPolicyManager", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "proxiableUUID", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "remainingETH", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_blockRange", + type: "uint256", + }, + ], + name: "setBlockRange", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IExecutionDelegate", + name: "_executionDelegate", + type: "address", + }, + ], + name: "setExecutionDelegate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_feeRate", + type: "uint256", + }, + ], + name: "setFeeRate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_feeRecipient", + type: "address", + }, + ], + name: "setFeeRecipient", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_governor", + type: "address", + }, + ], + name: "setGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_oracle", + type: "address", + }, + ], + name: "setOracle", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IPolicyManager", + name: "_policyManager", + type: "address", + }, + ], + name: "setPolicyManager", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newImplementation", + type: "address", + }, + ], + name: "upgradeTo", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newImplementation", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + type: "function", + }, +] as const; diff --git a/services/decoder/protocols/blur/abis/blur.BlurExchange.abi.json b/services/decoder/protocols/blur/abis/blur.BlurExchange.abi.json deleted file mode 100644 index 56eefe4..0000000 --- a/services/decoder/protocols/blur/abis/blur.BlurExchange.abi.json +++ /dev/null @@ -1,1863 +0,0 @@ -[ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Closed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "blockRange", - "type": "uint256" - } - ], - "name": "NewBlockRange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IExecutionDelegate", - "name": "executionDelegate", - "type": "address" - } - ], - "name": "NewExecutionDelegate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "feeRate", - "type": "uint256" - } - ], - "name": "NewFeeRate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "feeRecipient", - "type": "address" - } - ], - "name": "NewFeeRecipient", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "governor", - "type": "address" - } - ], - "name": "NewGovernor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oracle", - "type": "address" - } - ], - "name": "NewOracle", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract IPolicyManager", - "name": "policyManager", - "type": "address" - } - ], - "name": "NewPolicyManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "trader", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newNonce", - "type": "uint256" - } - ], - "name": "NonceIncremented", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Opened", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" - } - ], - "name": "OrderCancelled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "maker", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "taker", - "type": "address" - }, - { - "components": [ - { - "internalType": "address", - "name": "trader", - "type": "address" - }, - { - "internalType": "enum Side", - "name": "side", - "type": "uint8" - }, - { - "internalType": "address", - "name": "matchingPolicy", - "type": "address" - }, - { - "internalType": "address", - "name": "collection", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "paymentToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "price", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "listingTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expirationTime", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint16", - "name": "rate", - "type": "uint16" - }, - { - "internalType": "address payable", - "name": "recipient", - "type": "address" - } - ], - "internalType": "struct Fee[]", - "name": "fees", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "extraParams", - "type": "bytes" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "sell", - "type": "tuple" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "sellHash", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "address", - "name": "trader", - "type": "address" - }, - { - "internalType": "enum Side", - "name": "side", - "type": "uint8" - }, - { - "internalType": "address", - "name": "matchingPolicy", - "type": "address" - }, - { - "internalType": "address", - "name": "collection", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "paymentToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "price", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "listingTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expirationTime", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint16", - "name": "rate", - "type": "uint16" - }, - { - "internalType": "address payable", - "name": "recipient", - "type": "address" - } - ], - "internalType": "struct Fee[]", - "name": "fees", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "extraParams", - "type": "bytes" - } - ], - "indexed": false, - "internalType": "struct Order", - "name": "buy", - "type": "tuple" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "buyHash", - "type": "bytes32" - } - ], - "name": "OrdersMatched", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [], - "name": "FEE_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "INVERSE_BASIS_POINT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NAME", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ORACLE_ORDER_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ORDER_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "POOL", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ROOT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "VERSION", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WETH", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "address", - "name": "trader", - "type": "address" - }, - { - "internalType": "enum Side", - "name": "side", - "type": "uint8" - }, - { - "internalType": "address", - "name": "matchingPolicy", - "type": "address" - }, - { - "internalType": "address", - "name": "collection", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "paymentToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "price", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "listingTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expirationTime", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint16", - "name": "rate", - "type": "uint16" - }, - { - "internalType": "address payable", - "name": "recipient", - "type": "address" - } - ], - "internalType": "struct Fee[]", - "name": "fees", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "extraParams", - "type": "bytes" - } - ], - "internalType": "struct Order", - "name": "order", - "type": "tuple" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "extraSignature", - "type": "bytes" - }, - { - "internalType": "enum SignatureVersion", - "name": "signatureVersion", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "internalType": "struct Input", - "name": "sell", - "type": "tuple" - }, - { - "components": [ - { - "components": [ - { - "internalType": "address", - "name": "trader", - "type": "address" - }, - { - "internalType": "enum Side", - "name": "side", - "type": "uint8" - }, - { - "internalType": "address", - "name": "matchingPolicy", - "type": "address" - }, - { - "internalType": "address", - "name": "collection", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "paymentToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "price", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "listingTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expirationTime", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint16", - "name": "rate", - "type": "uint16" - }, - { - "internalType": "address payable", - "name": "recipient", - "type": "address" - } - ], - "internalType": "struct Fee[]", - "name": "fees", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "extraParams", - "type": "bytes" - } - ], - "internalType": "struct Order", - "name": "order", - "type": "tuple" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "extraSignature", - "type": "bytes" - }, - { - "internalType": "enum SignatureVersion", - "name": "signatureVersion", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "internalType": "struct Input", - "name": "buy", - "type": "tuple" - } - ], - "name": "_execute", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "blockRange", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "components": [ - { - "components": [ - { - "internalType": "address", - "name": "trader", - "type": "address" - }, - { - "internalType": "enum Side", - "name": "side", - "type": "uint8" - }, - { - "internalType": "address", - "name": "matchingPolicy", - "type": "address" - }, - { - "internalType": "address", - "name": "collection", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "paymentToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "price", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "listingTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expirationTime", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint16", - "name": "rate", - "type": "uint16" - }, - { - "internalType": "address payable", - "name": "recipient", - "type": "address" - } - ], - "internalType": "struct Fee[]", - "name": "fees", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "extraParams", - "type": "bytes" - } - ], - "internalType": "struct Order", - "name": "order", - "type": "tuple" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "extraSignature", - "type": "bytes" - }, - { - "internalType": "enum SignatureVersion", - "name": "signatureVersion", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "internalType": "struct Input", - "name": "sell", - "type": "tuple" - }, - { - "components": [ - { - "components": [ - { - "internalType": "address", - "name": "trader", - "type": "address" - }, - { - "internalType": "enum Side", - "name": "side", - "type": "uint8" - }, - { - "internalType": "address", - "name": "matchingPolicy", - "type": "address" - }, - { - "internalType": "address", - "name": "collection", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "paymentToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "price", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "listingTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expirationTime", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint16", - "name": "rate", - "type": "uint16" - }, - { - "internalType": "address payable", - "name": "recipient", - "type": "address" - } - ], - "internalType": "struct Fee[]", - "name": "fees", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "extraParams", - "type": "bytes" - } - ], - "internalType": "struct Order", - "name": "order", - "type": "tuple" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "extraSignature", - "type": "bytes" - }, - { - "internalType": "enum SignatureVersion", - "name": "signatureVersion", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "internalType": "struct Input", - "name": "buy", - "type": "tuple" - } - ], - "internalType": "struct Execution[]", - "name": "executions", - "type": "tuple[]" - } - ], - "name": "bulkExecute", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "trader", - "type": "address" - }, - { - "internalType": "enum Side", - "name": "side", - "type": "uint8" - }, - { - "internalType": "address", - "name": "matchingPolicy", - "type": "address" - }, - { - "internalType": "address", - "name": "collection", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "paymentToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "price", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "listingTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expirationTime", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint16", - "name": "rate", - "type": "uint16" - }, - { - "internalType": "address payable", - "name": "recipient", - "type": "address" - } - ], - "internalType": "struct Fee[]", - "name": "fees", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "extraParams", - "type": "bytes" - } - ], - "internalType": "struct Order", - "name": "order", - "type": "tuple" - } - ], - "name": "cancelOrder", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "trader", - "type": "address" - }, - { - "internalType": "enum Side", - "name": "side", - "type": "uint8" - }, - { - "internalType": "address", - "name": "matchingPolicy", - "type": "address" - }, - { - "internalType": "address", - "name": "collection", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "paymentToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "price", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "listingTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expirationTime", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint16", - "name": "rate", - "type": "uint16" - }, - { - "internalType": "address payable", - "name": "recipient", - "type": "address" - } - ], - "internalType": "struct Fee[]", - "name": "fees", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "extraParams", - "type": "bytes" - } - ], - "internalType": "struct Order[]", - "name": "orders", - "type": "tuple[]" - } - ], - "name": "cancelOrders", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "cancelledOrFilled", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "close", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "address", - "name": "trader", - "type": "address" - }, - { - "internalType": "enum Side", - "name": "side", - "type": "uint8" - }, - { - "internalType": "address", - "name": "matchingPolicy", - "type": "address" - }, - { - "internalType": "address", - "name": "collection", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "paymentToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "price", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "listingTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expirationTime", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint16", - "name": "rate", - "type": "uint16" - }, - { - "internalType": "address payable", - "name": "recipient", - "type": "address" - } - ], - "internalType": "struct Fee[]", - "name": "fees", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "extraParams", - "type": "bytes" - } - ], - "internalType": "struct Order", - "name": "order", - "type": "tuple" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "extraSignature", - "type": "bytes" - }, - { - "internalType": "enum SignatureVersion", - "name": "signatureVersion", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "internalType": "struct Input", - "name": "sell", - "type": "tuple" - }, - { - "components": [ - { - "components": [ - { - "internalType": "address", - "name": "trader", - "type": "address" - }, - { - "internalType": "enum Side", - "name": "side", - "type": "uint8" - }, - { - "internalType": "address", - "name": "matchingPolicy", - "type": "address" - }, - { - "internalType": "address", - "name": "collection", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "paymentToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "price", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "listingTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expirationTime", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint16", - "name": "rate", - "type": "uint16" - }, - { - "internalType": "address payable", - "name": "recipient", - "type": "address" - } - ], - "internalType": "struct Fee[]", - "name": "fees", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "extraParams", - "type": "bytes" - } - ], - "internalType": "struct Order", - "name": "order", - "type": "tuple" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "extraSignature", - "type": "bytes" - }, - { - "internalType": "enum SignatureVersion", - "name": "signatureVersion", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "internalType": "struct Input", - "name": "buy", - "type": "tuple" - } - ], - "name": "execute", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "executionDelegate", - "outputs": [ - { - "internalType": "contract IExecutionDelegate", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "feeRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "feeRecipient", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "incrementNonce", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IExecutionDelegate", - "name": "_executionDelegate", - "type": "address" - }, - { - "internalType": "contract IPolicyManager", - "name": "_policyManager", - "type": "address" - }, - { - "internalType": "address", - "name": "_oracle", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_blockRange", - "type": "uint256" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "isInternal", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "isOpen", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "open", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "oracle", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "policyManager", - "outputs": [ - { - "internalType": "contract IPolicyManager", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "remainingETH", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_blockRange", - "type": "uint256" - } - ], - "name": "setBlockRange", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IExecutionDelegate", - "name": "_executionDelegate", - "type": "address" - } - ], - "name": "setExecutionDelegate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_feeRate", - "type": "uint256" - } - ], - "name": "setFeeRate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_feeRecipient", - "type": "address" - } - ], - "name": "setFeeRecipient", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_governor", - "type": "address" - } - ], - "name": "setGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_oracle", - "type": "address" - } - ], - "name": "setOracle", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IPolicyManager", - "name": "_policyManager", - "type": "address" - } - ], - "name": "setPolicyManager", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } -] diff --git a/services/decoder/protocols/blur/blur.decoders.ts b/services/decoder/protocols/blur/blur.decoders.ts index f9597f5..c312e7c 100644 --- a/services/decoder/protocols/blur/blur.decoders.ts +++ b/services/decoder/protocols/blur/blur.decoders.ts @@ -1,23 +1,23 @@ +import { prettifyCurrency } from "@covalenthq/client-sdk"; +import { decodeEventLog, type Abi } from "viem"; +import { timestampParser } from "../../../../utils/functions"; import { GoldRushDecoder } from "../../decoder"; +import { + DECODED_ACTION, + DECODED_EVENT_CATEGORY, +} from "../../decoder.constants"; import { type EventDetails, type EventNFTs, type EventTokens, type EventType, } from "../../decoder.types"; -import { - DECODED_ACTION, - DECODED_EVENT_CATEGORY, -} from "../../decoder.constants"; -import { decodeEventLog, type Abi } from "viem"; -import ABI from "./abis/blur.BlurExchange.abi.json"; -import { timestampParser } from "../../../../utils/functions"; -import { prettifyCurrency } from "@covalenthq/client-sdk"; +import { blurExchangeABI } from "./abis/blur-exchange.abi"; GoldRushDecoder.on( "blur:OrdersMatched", ["eth-mainnet"], - ABI as Abi, + blurExchangeABI as Abi, async ( log_event, tx, @@ -27,61 +27,12 @@ GoldRushDecoder.on( ): Promise => { const { block_signed_at, raw_log_data, raw_log_topics } = log_event; - enum SIDE { - "BUY" = 0, - "SELL" = 1, - } - const { args: decoded } = decodeEventLog({ - abi: ABI, + abi: blurExchangeABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "OrdersMatched", - }) as { - eventName: "OrdersMatched"; - args: { - maker: string; - taker: string; - sell: { - trader: string; - side: SIDE; - matchingPolicy: string; - collection: string; - tokenId: bigint; - amount: bigint; - paymentToken: string; - price: bigint; - listingTime: bigint; - expirationTime: bigint; - fees: { - rate: number; - recipient: string; - }[]; - salt: bigint; - extraParams: string; - }; - sellHash: string; - buy: { - trader: string; - side: SIDE; - matchingPolicy: string; - collection: string; - tokenId: bigint; - amount: bigint; - paymentToken: string; - price: bigint; - listingTime: bigint; - expirationTime: bigint; - fees: { - rate: number; - recipient: string; - }[]; - salt: bigint; - extraParams: string; - }; - buyHash: string; - }; - }; + }); const tokens: EventTokens = []; const nfts: EventNFTs = []; diff --git a/services/decoder/protocols/connext/abis/connext-call.abi.json b/services/decoder/protocols/connext/abis/connext-call.abi.json deleted file mode 100644 index 5cf8346..0000000 --- a/services/decoder/protocols/connext/abis/connext-call.abi.json +++ /dev/null @@ -1,1258 +0,0 @@ -[ - { - "inputs": [], - "name": "AssetLogic__getConfig_notRegistered", - "type": "error" - }, - { - "inputs": [], - "name": "AssetLogic__getTokenIndexFromStableSwapPool_notExist", - "type": "error" - }, - { - "inputs": [], - "name": "AssetLogic__handleIncomingAsset_feeOnTransferNotSupported", - "type": "error" - }, - { - "inputs": [], - "name": "AssetLogic__handleIncomingAsset_nativeAssetNotSupported", - "type": "error" - }, - { - "inputs": [], - "name": "AssetLogic__handleOutgoingAsset_notNative", - "type": "error" - }, - { - "inputs": [], - "name": "BaseConnextFacet__getAdoptedAsset_assetNotFound", - "type": "error" - }, - { - "inputs": [], - "name": "BaseConnextFacet__getApprovedCanonicalId_notAllowlisted", - "type": "error" - }, - { - "inputs": [], - "name": "BaseConnextFacet__nonReentrant_reentrantCall", - "type": "error" - }, - { - "inputs": [], - "name": "BaseConnextFacet__nonXCallReentrant_reentrantCall", - "type": "error" - }, - { - "inputs": [], - "name": "BaseConnextFacet__onlyOwnerOrAdmin_notOwnerOrAdmin", - "type": "error" - }, - { - "inputs": [], - "name": "BaseConnextFacet__onlyOwnerOrRouter_notOwnerOrRouter", - "type": "error" - }, - { - "inputs": [], - "name": "BaseConnextFacet__onlyOwnerOrWatcher_notOwnerOrWatcher", - "type": "error" - }, - { - "inputs": [], - "name": "BaseConnextFacet__onlyOwner_notOwner", - "type": "error" - }, - { - "inputs": [], - "name": "BaseConnextFacet__onlyProposed_notProposedOwner", - "type": "error" - }, - { - "inputs": [], - "name": "BaseConnextFacet__whenNotPaused_paused", - "type": "error" - }, - { - "inputs": [], - "name": "BridgeFacet__addRemote_invalidDomain", - "type": "error" - }, - { - "inputs": [], - "name": "BridgeFacet__addRemote_invalidRouter", - "type": "error" - }, - { - "inputs": [], - "name": "BridgeFacet__addSequencer_alreadyApproved", - "type": "error" - }, - { - "inputs": [], - "name": "BridgeFacet__addSequencer_invalidSequencer", - "type": "error" - }, - { - "inputs": [], - "name": "BridgeFacet__bumpTransfer_noRelayerVault", - "type": "error" - }, - { - "inputs": [], - "name": "BridgeFacet__bumpTransfer_valueIsZero", - "type": "error" - }, - { - "inputs": [], - "name": "BridgeFacet__excecute_insufficientGas", - "type": "error" - }, - { - "inputs": [], - "name": "BridgeFacet__executePortalTransfer_insufficientAmountWithdrawn", - "type": "error" - }, - { - "inputs": [], - "name": "BridgeFacet__execute_badFastLiquidityStatus", - "type": "error" - }, - { - "inputs": [], - "name": "BridgeFacet__execute_externalCallFailed", - "type": "error" - }, - { - "inputs": [], - "name": "BridgeFacet__execute_invalidRouterSignature", - "type": "error" - }, - { - "inputs": [], - "name": "BridgeFacet__execute_invalidSequencerSignature", - "type": "error" - }, - { - "inputs": [], - "name": "BridgeFacet__execute_maxRoutersExceeded", - "type": "error" - }, - { - "inputs": [], - "name": "BridgeFacet__execute_notApprovedForPortals", - "type": "error" - }, - { - "inputs": [], - "name": "BridgeFacet__execute_notReconciled", - "type": "error" - }, - { - "inputs": [], - "name": "BridgeFacet__execute_notSupportedRouter", - "type": "error" - }, - { - "inputs": [], - "name": "BridgeFacet__execute_notSupportedSequencer", - "type": "error" - }, - { - "inputs": [], - "name": "BridgeFacet__execute_unapprovedSender", - "type": "error" - }, - { - "inputs": [], - "name": "BridgeFacet__execute_wrongDomain", - "type": "error" - }, - { - "inputs": [], - "name": "BridgeFacet__forceReceiveLocal_notDestination", - "type": "error" - }, - { - "inputs": [], - "name": "BridgeFacet__forceUpdateSlippage_invalidSlippage", - "type": "error" - }, - { - "inputs": [], - "name": "BridgeFacet__forceUpdateSlippage_notDestination", - "type": "error" - }, - { - "inputs": [], - "name": "BridgeFacet__mustHaveRemote_destinationNotSupported", - "type": "error" - }, - { - "inputs": [], - "name": "BridgeFacet__onlyDelegate_notDelegate", - "type": "error" - }, - { - "inputs": [], - "name": "BridgeFacet__removeSequencer_notApproved", - "type": "error" - }, - { - "inputs": [], - "name": "BridgeFacet__setXAppConnectionManager_domainsDontMatch", - "type": "error" - }, - { "inputs": [], "name": "BridgeFacet__xcall_capReached", "type": "error" }, - { "inputs": [], "name": "BridgeFacet__xcall_emptyTo", "type": "error" }, - { - "inputs": [], - "name": "BridgeFacet__xcall_invalidSlippage", - "type": "error" - }, - { - "inputs": [], - "name": "BridgeFacet__xcall_nativeAssetNotSupported", - "type": "error" - }, - { - "inputs": [], - "name": "BridgeFacet_xcall__emptyLocalAsset", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "transferId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "router", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "AavePortalMintUnbacked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "transferId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "components": [ - { - "components": [ - { - "internalType": "uint32", - "name": "originDomain", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "destinationDomain", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "canonicalDomain", - "type": "uint32" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "address", - "name": "delegate", - "type": "address" - }, - { - "internalType": "bool", - "name": "receiveLocal", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "callData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "slippage", - "type": "uint256" - }, - { - "internalType": "address", - "name": "originSender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "bridgedAmt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "normalizedIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "canonicalId", - "type": "bytes32" - } - ], - "internalType": "struct TransferInfo", - "name": "params", - "type": "tuple" - }, - { - "internalType": "address[]", - "name": "routers", - "type": "address[]" - }, - { - "internalType": "bytes[]", - "name": "routerSignatures", - "type": "bytes[]" - }, - { - "internalType": "address", - "name": "sequencer", - "type": "address" - }, - { - "internalType": "bytes", - "name": "sequencerSignature", - "type": "bytes" - } - ], - "indexed": false, - "internalType": "struct ExecuteArgs", - "name": "args", - "type": "tuple" - }, - { - "indexed": false, - "internalType": "address", - "name": "local", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "Executed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "transferId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bool", - "name": "success", - "type": "bool" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "returnData", - "type": "bytes" - } - ], - "name": "ExternalCalldataExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "transferId", - "type": "bytes32" - } - ], - "name": "ForceReceiveLocal", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint32", - "name": "domain", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "address", - "name": "remote", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "RemoteAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "sequencer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "SequencerAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "sequencer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "SequencerRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "transferId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "slippage", - "type": "uint256" - } - ], - "name": "SlippageUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "transferId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "increase", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "TransferRelayerFeesIncreased", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "updated", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "XAppConnectionManagerSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "transferId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "messageHash", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "uint32", - "name": "originDomain", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "destinationDomain", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "canonicalDomain", - "type": "uint32" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "address", - "name": "delegate", - "type": "address" - }, - { - "internalType": "bool", - "name": "receiveLocal", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "callData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "slippage", - "type": "uint256" - }, - { - "internalType": "address", - "name": "originSender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "bridgedAmt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "normalizedIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "canonicalId", - "type": "bytes32" - } - ], - "indexed": false, - "internalType": "struct TransferInfo", - "name": "params", - "type": "tuple" - }, - { - "indexed": false, - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "local", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "messageBody", - "type": "bytes" - } - ], - "name": "XCalled", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_sequencer", - "type": "address" - } - ], - "name": "addSequencer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_sequencer", - "type": "address" - } - ], - "name": "approvedSequencers", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_transferId", - "type": "bytes32" - } - ], - "name": "bumpTransfer", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_transferId", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "_relayerFeeAsset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_relayerFee", - "type": "uint256" - } - ], - "name": "bumpTransfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "domain", - "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint32", "name": "_domain", "type": "uint32" }, - { "internalType": "bytes32", "name": "_router", "type": "bytes32" } - ], - "name": "enrollRemoteRouter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "uint32", - "name": "originDomain", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "destinationDomain", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "canonicalDomain", - "type": "uint32" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "address", - "name": "delegate", - "type": "address" - }, - { - "internalType": "bool", - "name": "receiveLocal", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "callData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "slippage", - "type": "uint256" - }, - { - "internalType": "address", - "name": "originSender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "bridgedAmt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "normalizedIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "canonicalId", - "type": "bytes32" - } - ], - "internalType": "struct TransferInfo", - "name": "params", - "type": "tuple" - }, - { - "internalType": "address[]", - "name": "routers", - "type": "address[]" - }, - { - "internalType": "bytes[]", - "name": "routerSignatures", - "type": "bytes[]" - }, - { - "internalType": "address", - "name": "sequencer", - "type": "address" - }, - { - "internalType": "bytes", - "name": "sequencerSignature", - "type": "bytes" - } - ], - "internalType": "struct ExecuteArgs", - "name": "_args", - "type": "tuple" - } - ], - "name": "execute", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint32", - "name": "originDomain", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "destinationDomain", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "canonicalDomain", - "type": "uint32" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "address", - "name": "delegate", - "type": "address" - }, - { - "internalType": "bool", - "name": "receiveLocal", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "callData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "slippage", - "type": "uint256" - }, - { - "internalType": "address", - "name": "originSender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "bridgedAmt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "normalizedIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "canonicalId", - "type": "bytes32" - } - ], - "internalType": "struct TransferInfo", - "name": "_params", - "type": "tuple" - } - ], - "name": "forceReceiveLocal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint32", - "name": "originDomain", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "destinationDomain", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "canonicalDomain", - "type": "uint32" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "address", - "name": "delegate", - "type": "address" - }, - { - "internalType": "bool", - "name": "receiveLocal", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "callData", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "slippage", - "type": "uint256" - }, - { - "internalType": "address", - "name": "originSender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "bridgedAmt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "normalizedIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "canonicalId", - "type": "bytes32" - } - ], - "internalType": "struct TransferInfo", - "name": "_params", - "type": "tuple" - }, - { - "internalType": "uint256", - "name": "_slippage", - "type": "uint256" - } - ], - "name": "forceUpdateSlippage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "nonce", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint32", "name": "_domain", "type": "uint32" } - ], - "name": "remote", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_sequencer", - "type": "address" - } - ], - "name": "removeSequencer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_transferId", - "type": "bytes32" - } - ], - "name": "routedTransfers", - "outputs": [ - { "internalType": "address[]", "name": "", "type": "address[]" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_xAppConnectionManager", - "type": "address" - } - ], - "name": "setXAppConnectionManager", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_transferId", - "type": "bytes32" - } - ], - "name": "transferStatus", - "outputs": [ - { - "internalType": "enum DestinationTransferStatus", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "xAppConnectionManager", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "_destination", - "type": "uint32" - }, - { "internalType": "address", "name": "_to", "type": "address" }, - { "internalType": "address", "name": "_asset", "type": "address" }, - { - "internalType": "address", - "name": "_delegate", - "type": "address" - }, - { "internalType": "uint256", "name": "_amount", "type": "uint256" }, - { - "internalType": "uint256", - "name": "_slippage", - "type": "uint256" - }, - { "internalType": "bytes", "name": "_callData", "type": "bytes" } - ], - "name": "xcall", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "_destination", - "type": "uint32" - }, - { "internalType": "address", "name": "_to", "type": "address" }, - { "internalType": "address", "name": "_asset", "type": "address" }, - { - "internalType": "address", - "name": "_delegate", - "type": "address" - }, - { "internalType": "uint256", "name": "_amount", "type": "uint256" }, - { - "internalType": "uint256", - "name": "_slippage", - "type": "uint256" - }, - { "internalType": "bytes", "name": "_callData", "type": "bytes" }, - { - "internalType": "uint256", - "name": "_relayerFee", - "type": "uint256" - } - ], - "name": "xcall", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "_destination", - "type": "uint32" - }, - { "internalType": "address", "name": "_to", "type": "address" }, - { "internalType": "address", "name": "_asset", "type": "address" }, - { - "internalType": "address", - "name": "_delegate", - "type": "address" - }, - { "internalType": "uint256", "name": "_amount", "type": "uint256" }, - { - "internalType": "uint256", - "name": "_slippage", - "type": "uint256" - }, - { "internalType": "bytes", "name": "_callData", "type": "bytes" }, - { - "internalType": "uint256", - "name": "_relayerFee", - "type": "uint256" - } - ], - "name": "xcallIntoLocal", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "_destination", - "type": "uint32" - }, - { "internalType": "address", "name": "_to", "type": "address" }, - { "internalType": "address", "name": "_asset", "type": "address" }, - { - "internalType": "address", - "name": "_delegate", - "type": "address" - }, - { "internalType": "uint256", "name": "_amount", "type": "uint256" }, - { - "internalType": "uint256", - "name": "_slippage", - "type": "uint256" - }, - { "internalType": "bytes", "name": "_callData", "type": "bytes" } - ], - "name": "xcallIntoLocal", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "stateMutability": "payable", - "type": "function" - } -] diff --git a/services/decoder/protocols/connext/abis/connext-call.abi.ts b/services/decoder/protocols/connext/abis/connext-call.abi.ts new file mode 100644 index 0000000..e596b6f --- /dev/null +++ b/services/decoder/protocols/connext/abis/connext-call.abi.ts @@ -0,0 +1,1238 @@ +export const connextCallABI = [ + { + inputs: [], + name: "AssetLogic__getConfig_notRegistered", + type: "error", + }, + { + inputs: [], + name: "AssetLogic__getTokenIndexFromStableSwapPool_notExist", + type: "error", + }, + { + inputs: [], + name: "AssetLogic__handleIncomingAsset_feeOnTransferNotSupported", + type: "error", + }, + { + inputs: [], + name: "AssetLogic__handleIncomingAsset_nativeAssetNotSupported", + type: "error", + }, + { + inputs: [], + name: "AssetLogic__handleOutgoingAsset_notNative", + type: "error", + }, + { + inputs: [], + name: "BaseConnextFacet__getAdoptedAsset_assetNotFound", + type: "error", + }, + { + inputs: [], + name: "BaseConnextFacet__getApprovedCanonicalId_notAllowlisted", + type: "error", + }, + { + inputs: [], + name: "BaseConnextFacet__nonReentrant_reentrantCall", + type: "error", + }, + { + inputs: [], + name: "BaseConnextFacet__nonXCallReentrant_reentrantCall", + type: "error", + }, + { + inputs: [], + name: "BaseConnextFacet__onlyOwnerOrAdmin_notOwnerOrAdmin", + type: "error", + }, + { + inputs: [], + name: "BaseConnextFacet__onlyOwnerOrRouter_notOwnerOrRouter", + type: "error", + }, + { + inputs: [], + name: "BaseConnextFacet__onlyOwnerOrWatcher_notOwnerOrWatcher", + type: "error", + }, + { + inputs: [], + name: "BaseConnextFacet__onlyOwner_notOwner", + type: "error", + }, + { + inputs: [], + name: "BaseConnextFacet__onlyProposed_notProposedOwner", + type: "error", + }, + { + inputs: [], + name: "BaseConnextFacet__whenNotPaused_paused", + type: "error", + }, + { + inputs: [], + name: "BridgeFacet__addRemote_invalidDomain", + type: "error", + }, + { + inputs: [], + name: "BridgeFacet__addRemote_invalidRouter", + type: "error", + }, + { + inputs: [], + name: "BridgeFacet__addSequencer_alreadyApproved", + type: "error", + }, + { + inputs: [], + name: "BridgeFacet__addSequencer_invalidSequencer", + type: "error", + }, + { + inputs: [], + name: "BridgeFacet__bumpTransfer_noRelayerVault", + type: "error", + }, + { + inputs: [], + name: "BridgeFacet__bumpTransfer_valueIsZero", + type: "error", + }, + { + inputs: [], + name: "BridgeFacet__excecute_insufficientGas", + type: "error", + }, + { + inputs: [], + name: "BridgeFacet__executePortalTransfer_insufficientAmountWithdrawn", + type: "error", + }, + { + inputs: [], + name: "BridgeFacet__execute_badFastLiquidityStatus", + type: "error", + }, + { + inputs: [], + name: "BridgeFacet__execute_externalCallFailed", + type: "error", + }, + { + inputs: [], + name: "BridgeFacet__execute_invalidRouterSignature", + type: "error", + }, + { + inputs: [], + name: "BridgeFacet__execute_invalidSequencerSignature", + type: "error", + }, + { + inputs: [], + name: "BridgeFacet__execute_maxRoutersExceeded", + type: "error", + }, + { + inputs: [], + name: "BridgeFacet__execute_notApprovedForPortals", + type: "error", + }, + { + inputs: [], + name: "BridgeFacet__execute_notReconciled", + type: "error", + }, + { + inputs: [], + name: "BridgeFacet__execute_notSupportedRouter", + type: "error", + }, + { + inputs: [], + name: "BridgeFacet__execute_notSupportedSequencer", + type: "error", + }, + { + inputs: [], + name: "BridgeFacet__execute_unapprovedSender", + type: "error", + }, + { + inputs: [], + name: "BridgeFacet__execute_wrongDomain", + type: "error", + }, + { + inputs: [], + name: "BridgeFacet__forceReceiveLocal_notDestination", + type: "error", + }, + { + inputs: [], + name: "BridgeFacet__forceUpdateSlippage_invalidSlippage", + type: "error", + }, + { + inputs: [], + name: "BridgeFacet__forceUpdateSlippage_notDestination", + type: "error", + }, + { + inputs: [], + name: "BridgeFacet__mustHaveRemote_destinationNotSupported", + type: "error", + }, + { + inputs: [], + name: "BridgeFacet__onlyDelegate_notDelegate", + type: "error", + }, + { + inputs: [], + name: "BridgeFacet__removeSequencer_notApproved", + type: "error", + }, + { + inputs: [], + name: "BridgeFacet__setXAppConnectionManager_domainsDontMatch", + type: "error", + }, + { inputs: [], name: "BridgeFacet__xcall_capReached", type: "error" }, + { inputs: [], name: "BridgeFacet__xcall_emptyTo", type: "error" }, + { + inputs: [], + name: "BridgeFacet__xcall_invalidSlippage", + type: "error", + }, + { + inputs: [], + name: "BridgeFacet__xcall_nativeAssetNotSupported", + type: "error", + }, + { + inputs: [], + name: "BridgeFacet_xcall__emptyLocalAsset", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "transferId", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "router", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "asset", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "AavePortalMintUnbacked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "transferId", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "asset", + type: "address", + }, + { + components: [ + { + components: [ + { + internalType: "uint32", + name: "originDomain", + type: "uint32", + }, + { + internalType: "uint32", + name: "destinationDomain", + type: "uint32", + }, + { + internalType: "uint32", + name: "canonicalDomain", + type: "uint32", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "address", + name: "delegate", + type: "address", + }, + { + internalType: "bool", + name: "receiveLocal", + type: "bool", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + { + internalType: "uint256", + name: "slippage", + type: "uint256", + }, + { + internalType: "address", + name: "originSender", + type: "address", + }, + { + internalType: "uint256", + name: "bridgedAmt", + type: "uint256", + }, + { + internalType: "uint256", + name: "normalizedIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "bytes32", + name: "canonicalId", + type: "bytes32", + }, + ], + internalType: "struct TransferInfo", + name: "params", + type: "tuple", + }, + { + internalType: "address[]", + name: "routers", + type: "address[]", + }, + { + internalType: "bytes[]", + name: "routerSignatures", + type: "bytes[]", + }, + { + internalType: "address", + name: "sequencer", + type: "address", + }, + { + internalType: "bytes", + name: "sequencerSignature", + type: "bytes", + }, + ], + indexed: false, + internalType: "struct ExecuteArgs", + name: "args", + type: "tuple", + }, + { + indexed: false, + internalType: "address", + name: "local", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "Executed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "transferId", + type: "bytes32", + }, + { + indexed: false, + internalType: "bool", + name: "success", + type: "bool", + }, + { + indexed: false, + internalType: "bytes", + name: "returnData", + type: "bytes", + }, + ], + name: "ExternalCalldataExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "transferId", + type: "bytes32", + }, + ], + name: "ForceReceiveLocal", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint32", + name: "domain", + type: "uint32", + }, + { + indexed: false, + internalType: "address", + name: "remote", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "RemoteAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sequencer", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "SequencerAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sequencer", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "SequencerRemoved", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "transferId", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint256", + name: "slippage", + type: "uint256", + }, + ], + name: "SlippageUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "transferId", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint256", + name: "increase", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "asset", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "TransferRelayerFeesIncreased", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "updated", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "XAppConnectionManagerSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "transferId", + type: "bytes32", + }, + { + indexed: true, + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes32", + name: "messageHash", + type: "bytes32", + }, + { + components: [ + { + internalType: "uint32", + name: "originDomain", + type: "uint32", + }, + { + internalType: "uint32", + name: "destinationDomain", + type: "uint32", + }, + { + internalType: "uint32", + name: "canonicalDomain", + type: "uint32", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "address", + name: "delegate", + type: "address", + }, + { + internalType: "bool", + name: "receiveLocal", + type: "bool", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + { + internalType: "uint256", + name: "slippage", + type: "uint256", + }, + { + internalType: "address", + name: "originSender", + type: "address", + }, + { + internalType: "uint256", + name: "bridgedAmt", + type: "uint256", + }, + { + internalType: "uint256", + name: "normalizedIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "bytes32", + name: "canonicalId", + type: "bytes32", + }, + ], + indexed: false, + internalType: "struct TransferInfo", + name: "params", + type: "tuple", + }, + { + indexed: false, + internalType: "address", + name: "asset", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "local", + type: "address", + }, + { + indexed: false, + internalType: "bytes", + name: "messageBody", + type: "bytes", + }, + ], + name: "XCalled", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "_sequencer", + type: "address", + }, + ], + name: "addSequencer", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_sequencer", + type: "address", + }, + ], + name: "approvedSequencers", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_transferId", + type: "bytes32", + }, + ], + name: "bumpTransfer", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_transferId", + type: "bytes32", + }, + { + internalType: "address", + name: "_relayerFeeAsset", + type: "address", + }, + { + internalType: "uint256", + name: "_relayerFee", + type: "uint256", + }, + ], + name: "bumpTransfer", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "domain", + outputs: [{ internalType: "uint32", name: "", type: "uint32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint32", name: "_domain", type: "uint32" }, + { internalType: "bytes32", name: "_router", type: "bytes32" }, + ], + name: "enrollRemoteRouter", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + components: [ + { + internalType: "uint32", + name: "originDomain", + type: "uint32", + }, + { + internalType: "uint32", + name: "destinationDomain", + type: "uint32", + }, + { + internalType: "uint32", + name: "canonicalDomain", + type: "uint32", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "address", + name: "delegate", + type: "address", + }, + { + internalType: "bool", + name: "receiveLocal", + type: "bool", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + { + internalType: "uint256", + name: "slippage", + type: "uint256", + }, + { + internalType: "address", + name: "originSender", + type: "address", + }, + { + internalType: "uint256", + name: "bridgedAmt", + type: "uint256", + }, + { + internalType: "uint256", + name: "normalizedIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "bytes32", + name: "canonicalId", + type: "bytes32", + }, + ], + internalType: "struct TransferInfo", + name: "params", + type: "tuple", + }, + { + internalType: "address[]", + name: "routers", + type: "address[]", + }, + { + internalType: "bytes[]", + name: "routerSignatures", + type: "bytes[]", + }, + { + internalType: "address", + name: "sequencer", + type: "address", + }, + { + internalType: "bytes", + name: "sequencerSignature", + type: "bytes", + }, + ], + internalType: "struct ExecuteArgs", + name: "_args", + type: "tuple", + }, + ], + name: "execute", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint32", + name: "originDomain", + type: "uint32", + }, + { + internalType: "uint32", + name: "destinationDomain", + type: "uint32", + }, + { + internalType: "uint32", + name: "canonicalDomain", + type: "uint32", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "address", + name: "delegate", + type: "address", + }, + { + internalType: "bool", + name: "receiveLocal", + type: "bool", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + { + internalType: "uint256", + name: "slippage", + type: "uint256", + }, + { + internalType: "address", + name: "originSender", + type: "address", + }, + { + internalType: "uint256", + name: "bridgedAmt", + type: "uint256", + }, + { + internalType: "uint256", + name: "normalizedIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "bytes32", + name: "canonicalId", + type: "bytes32", + }, + ], + internalType: "struct TransferInfo", + name: "_params", + type: "tuple", + }, + ], + name: "forceReceiveLocal", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint32", + name: "originDomain", + type: "uint32", + }, + { + internalType: "uint32", + name: "destinationDomain", + type: "uint32", + }, + { + internalType: "uint32", + name: "canonicalDomain", + type: "uint32", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "address", + name: "delegate", + type: "address", + }, + { + internalType: "bool", + name: "receiveLocal", + type: "bool", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + { + internalType: "uint256", + name: "slippage", + type: "uint256", + }, + { + internalType: "address", + name: "originSender", + type: "address", + }, + { + internalType: "uint256", + name: "bridgedAmt", + type: "uint256", + }, + { + internalType: "uint256", + name: "normalizedIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "bytes32", + name: "canonicalId", + type: "bytes32", + }, + ], + internalType: "struct TransferInfo", + name: "_params", + type: "tuple", + }, + { + internalType: "uint256", + name: "_slippage", + type: "uint256", + }, + ], + name: "forceUpdateSlippage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "nonce", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint32", name: "_domain", type: "uint32" }], + name: "remote", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_sequencer", + type: "address", + }, + ], + name: "removeSequencer", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_transferId", + type: "bytes32", + }, + ], + name: "routedTransfers", + outputs: [{ internalType: "address[]", name: "", type: "address[]" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_xAppConnectionManager", + type: "address", + }, + ], + name: "setXAppConnectionManager", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_transferId", + type: "bytes32", + }, + ], + name: "transferStatus", + outputs: [ + { + internalType: "enum DestinationTransferStatus", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "xAppConnectionManager", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint32", + name: "_destination", + type: "uint32", + }, + { internalType: "address", name: "_to", type: "address" }, + { internalType: "address", name: "_asset", type: "address" }, + { + internalType: "address", + name: "_delegate", + type: "address", + }, + { internalType: "uint256", name: "_amount", type: "uint256" }, + { + internalType: "uint256", + name: "_slippage", + type: "uint256", + }, + { internalType: "bytes", name: "_callData", type: "bytes" }, + ], + name: "xcall", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint32", + name: "_destination", + type: "uint32", + }, + { internalType: "address", name: "_to", type: "address" }, + { internalType: "address", name: "_asset", type: "address" }, + { + internalType: "address", + name: "_delegate", + type: "address", + }, + { internalType: "uint256", name: "_amount", type: "uint256" }, + { + internalType: "uint256", + name: "_slippage", + type: "uint256", + }, + { internalType: "bytes", name: "_callData", type: "bytes" }, + { + internalType: "uint256", + name: "_relayerFee", + type: "uint256", + }, + ], + name: "xcall", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint32", + name: "_destination", + type: "uint32", + }, + { internalType: "address", name: "_to", type: "address" }, + { internalType: "address", name: "_asset", type: "address" }, + { + internalType: "address", + name: "_delegate", + type: "address", + }, + { internalType: "uint256", name: "_amount", type: "uint256" }, + { + internalType: "uint256", + name: "_slippage", + type: "uint256", + }, + { internalType: "bytes", name: "_callData", type: "bytes" }, + { + internalType: "uint256", + name: "_relayerFee", + type: "uint256", + }, + ], + name: "xcallIntoLocal", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint32", + name: "_destination", + type: "uint32", + }, + { internalType: "address", name: "_to", type: "address" }, + { internalType: "address", name: "_asset", type: "address" }, + { + internalType: "address", + name: "_delegate", + type: "address", + }, + { internalType: "uint256", name: "_amount", type: "uint256" }, + { + internalType: "uint256", + name: "_slippage", + type: "uint256", + }, + { internalType: "bytes", name: "_callData", type: "bytes" }, + ], + name: "xcallIntoLocal", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "payable", + type: "function", + }, +] as const; diff --git a/services/decoder/protocols/connext/abis/connext-router.abi.json b/services/decoder/protocols/connext/abis/connext-router.abi.json deleted file mode 100644 index 37c8248..0000000 --- a/services/decoder/protocols/connext/abis/connext-router.abi.json +++ /dev/null @@ -1,777 +0,0 @@ -[ - { - "inputs": [], - "name": "AssetLogic__handleIncomingAsset_feeOnTransferNotSupported", - "type": "error" - }, - { - "inputs": [], - "name": "AssetLogic__handleIncomingAsset_nativeAssetNotSupported", - "type": "error" - }, - { - "inputs": [], - "name": "AssetLogic__handleOutgoingAsset_notNative", - "type": "error" - }, - { - "inputs": [], - "name": "BaseConnextFacet__getAdoptedAsset_assetNotFound", - "type": "error" - }, - { - "inputs": [], - "name": "BaseConnextFacet__getApprovedCanonicalId_notAllowlisted", - "type": "error" - }, - { - "inputs": [], - "name": "BaseConnextFacet__nonReentrant_reentrantCall", - "type": "error" - }, - { - "inputs": [], - "name": "BaseConnextFacet__nonXCallReentrant_reentrantCall", - "type": "error" - }, - { - "inputs": [], - "name": "BaseConnextFacet__onlyOwnerOrAdmin_notOwnerOrAdmin", - "type": "error" - }, - { - "inputs": [], - "name": "BaseConnextFacet__onlyOwnerOrRouter_notOwnerOrRouter", - "type": "error" - }, - { - "inputs": [], - "name": "BaseConnextFacet__onlyOwnerOrWatcher_notOwnerOrWatcher", - "type": "error" - }, - { - "inputs": [], - "name": "BaseConnextFacet__onlyOwner_notOwner", - "type": "error" - }, - { - "inputs": [], - "name": "BaseConnextFacet__onlyProposed_notProposedOwner", - "type": "error" - }, - { - "inputs": [], - "name": "BaseConnextFacet__whenNotPaused_paused", - "type": "error" - }, - { - "inputs": [], - "name": "RoutersFacet__acceptProposedRouterOwner_badCaller", - "type": "error" - }, - { - "inputs": [], - "name": "RoutersFacet__acceptProposedRouterOwner_notElapsed", - "type": "error" - }, - { - "inputs": [], - "name": "RoutersFacet__addLiquidityForRouter_amountIsZero", - "type": "error" - }, - { - "inputs": [], - "name": "RoutersFacet__addLiquidityForRouter_badRouter", - "type": "error" - }, - { - "inputs": [], - "name": "RoutersFacet__addLiquidityForRouter_capReached", - "type": "error" - }, - { - "inputs": [], - "name": "RoutersFacet__addLiquidityForRouter_routerEmpty", - "type": "error" - }, - { - "inputs": [], - "name": "RoutersFacet__approveRouterForPortal_alreadyApproved", - "type": "error" - }, - { - "inputs": [], - "name": "RoutersFacet__approveRouterForPortal_notAdded", - "type": "error" - }, - { - "inputs": [], - "name": "RoutersFacet__approveRouter_alreadyAdded", - "type": "error" - }, - { - "inputs": [], - "name": "RoutersFacet__approveRouter_routerEmpty", - "type": "error" - }, - { - "inputs": [], - "name": "RoutersFacet__initializeRouter_configNotEmpty", - "type": "error" - }, - { - "inputs": [], - "name": "RoutersFacet__onlyRouterOwner_notRouterOwner", - "type": "error" - }, - { - "inputs": [], - "name": "RoutersFacet__proposeRouterOwner_badRouter", - "type": "error" - }, - { - "inputs": [], - "name": "RoutersFacet__proposeRouterOwner_notNewOwner", - "type": "error" - }, - { - "inputs": [], - "name": "RoutersFacet__removeRouterLiquidityFor_notOwner", - "type": "error" - }, - { - "inputs": [], - "name": "RoutersFacet__removeRouterLiquidity_amountIsZero", - "type": "error" - }, - { - "inputs": [], - "name": "RoutersFacet__removeRouterLiquidity_insufficientFunds", - "type": "error" - }, - { - "inputs": [], - "name": "RoutersFacet__removeRouterLiquidity_recipientEmpty", - "type": "error" - }, - { - "inputs": [], - "name": "RoutersFacet__setLiquidityFeeNumerator_tooLarge", - "type": "error" - }, - { - "inputs": [], - "name": "RoutersFacet__setLiquidityFeeNumerator_tooSmall", - "type": "error" - }, - { - "inputs": [], - "name": "RoutersFacet__setMaxRoutersPerTransfer_invalidMaxRoutersPerTransfer", - "type": "error" - }, - { - "inputs": [], - "name": "RoutersFacet__setRouterOwner_noChange", - "type": "error" - }, - { - "inputs": [], - "name": "RoutersFacet__setRouterRecipient_notNewRecipient", - "type": "error" - }, - { - "inputs": [], - "name": "RoutersFacet__unapproveRouterForPortal_notApproved", - "type": "error" - }, - { - "inputs": [], - "name": "RoutersFacet__unapproveRouter_notAdded", - "type": "error" - }, - { - "inputs": [], - "name": "RoutersFacet__unapproveRouter_routerEmpty", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "liquidityFeeNumerator", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "LiquidityFeeNumeratorUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "maxRoutersPerTransfer", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "MaxRoutersPerTransferUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "router", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "RouterAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "router", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "RouterApprovedForPortal", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "router", - "type": "address" - } - ], - "name": "RouterInitialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "router", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "local", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "key", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "RouterLiquidityAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "router", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "local", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "key", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "RouterLiquidityRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "router", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "prevOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "RouterOwnerAccepted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "router", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "prevProposed", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProposed", - "type": "address" - } - ], - "name": "RouterOwnerProposed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "router", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "prevRecipient", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newRecipient", - "type": "address" - } - ], - "name": "RouterRecipientSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "router", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "RouterRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "router", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "RouterUnapprovedForPortal", - "type": "event" - }, - { - "inputs": [], - "name": "LIQUIDITY_FEE_DENOMINATOR", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "LIQUIDITY_FEE_NUMERATOR", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_router", "type": "address" } - ], - "name": "acceptProposedRouterOwner", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "_amount", "type": "uint256" }, - { "internalType": "address", "name": "_local", "type": "address" } - ], - "name": "addRouterLiquidity", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "_amount", "type": "uint256" }, - { "internalType": "address", "name": "_local", "type": "address" }, - { "internalType": "address", "name": "_router", "type": "address" } - ], - "name": "addRouterLiquidityFor", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_router", "type": "address" } - ], - "name": "approveRouter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_router", "type": "address" } - ], - "name": "approveRouterForPortal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_router", "type": "address" } - ], - "name": "getProposedRouterOwner", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_router", "type": "address" } - ], - "name": "getProposedRouterOwnerTimestamp", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_router", "type": "address" } - ], - "name": "getRouterApproval", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_router", "type": "address" } - ], - "name": "getRouterApprovalForPortal", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_router", "type": "address" } - ], - "name": "getRouterOwner", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_router", "type": "address" } - ], - "name": "getRouterRecipient", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_owner", "type": "address" }, - { - "internalType": "address", - "name": "_recipient", - "type": "address" - } - ], - "name": "initializeRouter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "maxRoutersPerTransfer", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_router", "type": "address" }, - { - "internalType": "address", - "name": "_proposed", - "type": "address" - } - ], - "name": "proposeRouterOwner", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint32", - "name": "domain", - "type": "uint32" - }, - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "internalType": "struct TokenId", - "name": "_canonical", - "type": "tuple" - }, - { "internalType": "uint256", "name": "_amount", "type": "uint256" }, - { - "internalType": "address payable", - "name": "_to", - "type": "address" - } - ], - "name": "removeRouterLiquidity", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint32", - "name": "domain", - "type": "uint32" - }, - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - } - ], - "internalType": "struct TokenId", - "name": "_canonical", - "type": "tuple" - }, - { "internalType": "uint256", "name": "_amount", "type": "uint256" }, - { - "internalType": "address payable", - "name": "_to", - "type": "address" - }, - { "internalType": "address", "name": "_router", "type": "address" } - ], - "name": "removeRouterLiquidityFor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_router", "type": "address" }, - { "internalType": "address", "name": "_asset", "type": "address" } - ], - "name": "routerBalances", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_numerator", - "type": "uint256" - } - ], - "name": "setLiquidityFeeNumerator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_newMaxRouters", - "type": "uint256" - } - ], - "name": "setMaxRoutersPerTransfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_router", "type": "address" }, - { - "internalType": "address", - "name": "_recipient", - "type": "address" - } - ], - "name": "setRouterRecipient", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_router", "type": "address" } - ], - "name": "unapproveRouter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_router", "type": "address" } - ], - "name": "unapproveRouterForPortal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/services/decoder/protocols/connext/abis/connext-router.abi.ts b/services/decoder/protocols/connext/abis/connext-router.abi.ts new file mode 100644 index 0000000..605880d --- /dev/null +++ b/services/decoder/protocols/connext/abis/connext-router.abi.ts @@ -0,0 +1,739 @@ +export const connextRouterABI = [ + { + inputs: [], + name: "AssetLogic__handleIncomingAsset_feeOnTransferNotSupported", + type: "error", + }, + { + inputs: [], + name: "AssetLogic__handleIncomingAsset_nativeAssetNotSupported", + type: "error", + }, + { + inputs: [], + name: "AssetLogic__handleOutgoingAsset_notNative", + type: "error", + }, + { + inputs: [], + name: "BaseConnextFacet__getAdoptedAsset_assetNotFound", + type: "error", + }, + { + inputs: [], + name: "BaseConnextFacet__getApprovedCanonicalId_notAllowlisted", + type: "error", + }, + { + inputs: [], + name: "BaseConnextFacet__nonReentrant_reentrantCall", + type: "error", + }, + { + inputs: [], + name: "BaseConnextFacet__nonXCallReentrant_reentrantCall", + type: "error", + }, + { + inputs: [], + name: "BaseConnextFacet__onlyOwnerOrAdmin_notOwnerOrAdmin", + type: "error", + }, + { + inputs: [], + name: "BaseConnextFacet__onlyOwnerOrRouter_notOwnerOrRouter", + type: "error", + }, + { + inputs: [], + name: "BaseConnextFacet__onlyOwnerOrWatcher_notOwnerOrWatcher", + type: "error", + }, + { + inputs: [], + name: "BaseConnextFacet__onlyOwner_notOwner", + type: "error", + }, + { + inputs: [], + name: "BaseConnextFacet__onlyProposed_notProposedOwner", + type: "error", + }, + { + inputs: [], + name: "BaseConnextFacet__whenNotPaused_paused", + type: "error", + }, + { + inputs: [], + name: "RoutersFacet__acceptProposedRouterOwner_badCaller", + type: "error", + }, + { + inputs: [], + name: "RoutersFacet__acceptProposedRouterOwner_notElapsed", + type: "error", + }, + { + inputs: [], + name: "RoutersFacet__addLiquidityForRouter_amountIsZero", + type: "error", + }, + { + inputs: [], + name: "RoutersFacet__addLiquidityForRouter_badRouter", + type: "error", + }, + { + inputs: [], + name: "RoutersFacet__addLiquidityForRouter_capReached", + type: "error", + }, + { + inputs: [], + name: "RoutersFacet__addLiquidityForRouter_routerEmpty", + type: "error", + }, + { + inputs: [], + name: "RoutersFacet__approveRouterForPortal_alreadyApproved", + type: "error", + }, + { + inputs: [], + name: "RoutersFacet__approveRouterForPortal_notAdded", + type: "error", + }, + { + inputs: [], + name: "RoutersFacet__approveRouter_alreadyAdded", + type: "error", + }, + { + inputs: [], + name: "RoutersFacet__approveRouter_routerEmpty", + type: "error", + }, + { + inputs: [], + name: "RoutersFacet__initializeRouter_configNotEmpty", + type: "error", + }, + { + inputs: [], + name: "RoutersFacet__onlyRouterOwner_notRouterOwner", + type: "error", + }, + { + inputs: [], + name: "RoutersFacet__proposeRouterOwner_badRouter", + type: "error", + }, + { + inputs: [], + name: "RoutersFacet__proposeRouterOwner_notNewOwner", + type: "error", + }, + { + inputs: [], + name: "RoutersFacet__removeRouterLiquidityFor_notOwner", + type: "error", + }, + { + inputs: [], + name: "RoutersFacet__removeRouterLiquidity_amountIsZero", + type: "error", + }, + { + inputs: [], + name: "RoutersFacet__removeRouterLiquidity_insufficientFunds", + type: "error", + }, + { + inputs: [], + name: "RoutersFacet__removeRouterLiquidity_recipientEmpty", + type: "error", + }, + { + inputs: [], + name: "RoutersFacet__setLiquidityFeeNumerator_tooLarge", + type: "error", + }, + { + inputs: [], + name: "RoutersFacet__setLiquidityFeeNumerator_tooSmall", + type: "error", + }, + { + inputs: [], + name: "RoutersFacet__setMaxRoutersPerTransfer_invalidMaxRoutersPerTransfer", + type: "error", + }, + { + inputs: [], + name: "RoutersFacet__setRouterOwner_noChange", + type: "error", + }, + { + inputs: [], + name: "RoutersFacet__setRouterRecipient_notNewRecipient", + type: "error", + }, + { + inputs: [], + name: "RoutersFacet__unapproveRouterForPortal_notApproved", + type: "error", + }, + { + inputs: [], + name: "RoutersFacet__unapproveRouter_notAdded", + type: "error", + }, + { + inputs: [], + name: "RoutersFacet__unapproveRouter_routerEmpty", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "liquidityFeeNumerator", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "LiquidityFeeNumeratorUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "maxRoutersPerTransfer", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "MaxRoutersPerTransferUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "router", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "RouterAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "router", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "RouterApprovedForPortal", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "router", + type: "address", + }, + ], + name: "RouterInitialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "router", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "local", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "key", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "RouterLiquidityAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "router", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "local", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "key", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "RouterLiquidityRemoved", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "router", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "prevOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "RouterOwnerAccepted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "router", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "prevProposed", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newProposed", + type: "address", + }, + ], + name: "RouterOwnerProposed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "router", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "prevRecipient", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newRecipient", + type: "address", + }, + ], + name: "RouterRecipientSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "router", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "RouterRemoved", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "router", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "RouterUnapprovedForPortal", + type: "event", + }, + { + inputs: [], + name: "LIQUIDITY_FEE_DENOMINATOR", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "LIQUIDITY_FEE_NUMERATOR", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_router", type: "address" }], + name: "acceptProposedRouterOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_amount", type: "uint256" }, + { internalType: "address", name: "_local", type: "address" }, + ], + name: "addRouterLiquidity", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_amount", type: "uint256" }, + { internalType: "address", name: "_local", type: "address" }, + { internalType: "address", name: "_router", type: "address" }, + ], + name: "addRouterLiquidityFor", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_router", type: "address" }], + name: "approveRouter", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_router", type: "address" }], + name: "approveRouterForPortal", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_router", type: "address" }], + name: "getProposedRouterOwner", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_router", type: "address" }], + name: "getProposedRouterOwnerTimestamp", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_router", type: "address" }], + name: "getRouterApproval", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_router", type: "address" }], + name: "getRouterApprovalForPortal", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_router", type: "address" }], + name: "getRouterOwner", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_router", type: "address" }], + name: "getRouterRecipient", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_owner", type: "address" }, + { + internalType: "address", + name: "_recipient", + type: "address", + }, + ], + name: "initializeRouter", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "maxRoutersPerTransfer", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_router", type: "address" }, + { + internalType: "address", + name: "_proposed", + type: "address", + }, + ], + name: "proposeRouterOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint32", + name: "domain", + type: "uint32", + }, + { + internalType: "bytes32", + name: "id", + type: "bytes32", + }, + ], + internalType: "struct TokenId", + name: "_canonical", + type: "tuple", + }, + { internalType: "uint256", name: "_amount", type: "uint256" }, + { + internalType: "address payable", + name: "_to", + type: "address", + }, + ], + name: "removeRouterLiquidity", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint32", + name: "domain", + type: "uint32", + }, + { + internalType: "bytes32", + name: "id", + type: "bytes32", + }, + ], + internalType: "struct TokenId", + name: "_canonical", + type: "tuple", + }, + { internalType: "uint256", name: "_amount", type: "uint256" }, + { + internalType: "address payable", + name: "_to", + type: "address", + }, + { internalType: "address", name: "_router", type: "address" }, + ], + name: "removeRouterLiquidityFor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_router", type: "address" }, + { internalType: "address", name: "_asset", type: "address" }, + ], + name: "routerBalances", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_numerator", + type: "uint256", + }, + ], + name: "setLiquidityFeeNumerator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_newMaxRouters", + type: "uint256", + }, + ], + name: "setMaxRoutersPerTransfer", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_router", type: "address" }, + { + internalType: "address", + name: "_recipient", + type: "address", + }, + ], + name: "setRouterRecipient", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_router", type: "address" }], + name: "unapproveRouter", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_router", type: "address" }], + name: "unapproveRouterForPortal", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; diff --git a/services/decoder/protocols/connext/connext.decoders.ts b/services/decoder/protocols/connext/connext.decoders.ts index 4bb8f19..1f741c3 100644 --- a/services/decoder/protocols/connext/connext.decoders.ts +++ b/services/decoder/protocols/connext/connext.decoders.ts @@ -1,15 +1,15 @@ +import { prettifyCurrency } from "@covalenthq/client-sdk"; +import { decodeEventLog, type Abi } from "viem"; +import { timestampParser } from "../../../../utils/functions"; import { GoldRushDecoder } from "../../decoder"; -import type { EventDetails, EventTokens } from "../../decoder.types"; -import { type EventType } from "../../decoder.types"; import { DECODED_ACTION, DECODED_EVENT_CATEGORY, } from "../../decoder.constants"; -import { decodeEventLog, type Abi } from "viem"; -import ROUTER_ABI from "./abis/connext-router.abi.json"; -import CALLER_ABI from "./abis/connext-call.abi.json"; -import { timestampParser } from "../../../../utils/functions"; -import { prettifyCurrency } from "@covalenthq/client-sdk"; +import type { EventDetails, EventTokens } from "../../decoder.types"; +import { type EventType } from "../../decoder.types"; +import { connextCallABI } from "./abis/connext-call.abi"; +import { connextRouterABI } from "./abis/connext-router.abi"; const DOMAIN_ID_TO_CHAIN_ID: { [domain_id: number]: string } = { 6648936: "Ethereum Mainnet", @@ -26,7 +26,7 @@ const DOMAIN_ID_TO_CHAIN_ID: { [domain_id: number]: string } = { GoldRushDecoder.on( "connext:RouterLiquidityAdded", ["eth-mainnet"], - ROUTER_ABI as Abi, + connextRouterABI as Abi, async ( log_event, tx, @@ -37,20 +37,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: ROUTER_ABI, + abi: connextRouterABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "RouterLiquidityAdded", - }) as { - eventName: "RouterLiquidityAdded"; - args: { - router: string; - local: string; - key: string; - amount: bigint; - caller: string; - }; - }; + }); const details: EventDetails = [ { @@ -97,7 +88,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "connext:RouterAdded", ["eth-mainnet"], - ROUTER_ABI as Abi, + connextRouterABI as Abi, async ( log_event, tx, @@ -108,17 +99,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: ROUTER_ABI, + abi: connextRouterABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "RouterAdded", - }) as { - eventName: "RouterAdded"; - args: { - router: string; - caller: string; - }; - }; + }); const details: EventDetails = [ { @@ -150,7 +135,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "connext:RouterRemoved", ["eth-mainnet"], - ROUTER_ABI as Abi, + connextRouterABI as Abi, async ( log_event, tx, @@ -161,17 +146,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: ROUTER_ABI, + abi: connextRouterABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "RouterRemoved", - }) as { - eventName: "RouterRemoved"; - args: { - router: string; - caller: string; - }; - }; + }); const details: EventDetails = [ { @@ -203,7 +182,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "connext:RouterRecipientSet", ["eth-mainnet"], - ROUTER_ABI as Abi, + connextRouterABI as Abi, async ( log_event, tx, @@ -214,18 +193,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: ROUTER_ABI, + abi: connextRouterABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "RouterRecipientSet", - }) as { - eventName: "RouterRecipientSet"; - args: { - router: string; - prevRecipient: string; - newRecipient: string; - }; - }; + }); const details: EventDetails = [ { @@ -262,7 +234,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "connext:RouterInitialized", ["eth-mainnet"], - ROUTER_ABI as Abi, + connextRouterABI as Abi, async ( log_event, tx, @@ -273,16 +245,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: ROUTER_ABI, + abi: connextRouterABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "RouterInitialized", - }) as { - eventName: "RouterInitialized"; - args: { - router: string; - }; - }; + }); const details: EventDetails = [ { @@ -309,7 +276,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "connext:RouterOwnerAccepted", ["eth-mainnet"], - ROUTER_ABI as Abi, + connextRouterABI as Abi, async ( log_event, tx, @@ -320,18 +287,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: ROUTER_ABI, + abi: connextRouterABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "RouterOwnerAccepted", - }) as { - eventName: "RouterOwnerAccepted"; - args: { - router: string; - prevOwner: string; - newOwner: string; - }; - }; + }); const details: EventDetails = [ { @@ -368,7 +328,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "connext:RouterOwnerProposed", ["eth-mainnet"], - ROUTER_ABI as Abi, + connextRouterABI as Abi, async ( log_event, tx, @@ -379,18 +339,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: ROUTER_ABI, + abi: connextRouterABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "RouterOwnerProposed", - }) as { - eventName: "RouterOwnerProposed"; - args: { - router: string; - prevProposed: string; - newProposed: string; - }; - }; + }); const details: EventDetails = [ { @@ -427,7 +380,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "connext:RouterLiquidityRemoved", ["eth-mainnet"], - ROUTER_ABI as Abi, + connextRouterABI as Abi, async ( log_event, tx, @@ -438,21 +391,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: ROUTER_ABI, + abi: connextRouterABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "RouterLiquidityRemoved", - }) as { - eventName: "RouterLiquidityRemoved"; - args: { - router: string; - to: string; - local: string; - key: string; - amount: bigint; - caller: string; - }; - }; + }); const details: EventDetails = [ { @@ -504,7 +447,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "connext:XCalled", ["eth-mainnet"], - CALLER_ABI as Abi, + connextCallABI as Abi, async ( log_event, tx, @@ -515,37 +458,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: CALLER_ABI, + abi: connextCallABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "XCalled", - }) as { - eventName: "XCalled"; - args: { - transferId: string; - nonce: bigint; - messageHash: string; - params: { - originDomain: bigint; - destinationDomain: bigint; - canonicalDomain: bigint; - to: string; - delegate: string; - receiveLocal: boolean; - callData: string; - slippage: bigint; - originSender: string; - bridgedAmt: bigint; - normalizedIn: bigint; - nonce: bigint; - canonicalId: string; - }; - asset: string; - amount: bigint; - local: string; - messageBody: string; - }; - }; + }); const date = timestampParser(tx.block_signed_at, "YYYY-MM-DD"); @@ -703,7 +620,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "connext:ExternalCalldataExecuted", ["eth-mainnet"], - CALLER_ABI as Abi, + connextCallABI as Abi, async ( log_event, tx, @@ -714,19 +631,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: CALLER_ABI, + abi: connextCallABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "ExternalCalldataExecuted", - }) as { - eventName: "ExternalCalldataExecuted"; - args: { - transferId: string; - success: boolean; - returnData: string; - }; - }; - + }); const details: EventDetails = [ { heading: "Transfer ID", @@ -762,7 +671,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "connext:TransferRelayerFeesIncreased", ["eth-mainnet"], - CALLER_ABI as Abi, + connextCallABI as Abi, async ( log_event, tx, @@ -773,19 +682,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: CALLER_ABI, + abi: connextCallABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "TransferRelayerFeesIncreased", - }) as { - eventName: "TransferRelayerFeesIncreased"; - args: { - transferId: string; - increase: bigint; - asset: string; - caller: string; - }; - }; + }); const date = timestampParser(tx.block_signed_at, "YYYY-MM-DD"); @@ -846,6 +747,7 @@ GoldRushDecoder.on( }, ...(options.raw_logs ? { raw_log: log_event } : {}), details, + tokens, }; } ); @@ -853,7 +755,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "connext:SlippageUpdated", ["eth-mainnet"], - CALLER_ABI as Abi, + connextCallABI as Abi, async ( log_event, tx, @@ -864,17 +766,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: CALLER_ABI, + abi: connextCallABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "SlippageUpdated", - }) as { - eventName: "SlippageUpdated"; - args: { - transferId: string; - slippage: bigint; - }; - }; + }); const details: EventDetails = [ { diff --git a/services/decoder/protocols/connext/connext.test.ts b/services/decoder/protocols/connext/connext.test.ts index 75e3454..2f98546 100644 --- a/services/decoder/protocols/connext/connext.test.ts +++ b/services/decoder/protocols/connext/connext.test.ts @@ -41,6 +41,7 @@ describe("connext", () => { throw Error("Event not found"); } expect(event.details?.length).toEqual(3); + expect(event.tokens?.length).toEqual(1); }); }); diff --git a/services/decoder/protocols/covalent-network/abis/new-block-specimen-proof.abi.json b/services/decoder/protocols/covalent-network/abis/new-block-specimen-proof.abi.json deleted file mode 100644 index c090a35..0000000 --- a/services/decoder/protocols/covalent-network/abis/new-block-specimen-proof.abi.json +++ /dev/null @@ -1,956 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint64", - "name": "chainId", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "threshold", - "type": "uint64" - } - ], - "name": "BlockHeightSubmissionThresholdChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "chainId", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "blockHeight", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "blockHash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "specimenHash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "string", - "name": "storageURL", - "type": "string" - } - ], - "name": "BlockSpecimenProductionProofSubmitted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint64", - "name": "chainId", - "type": "uint64" - }, - { - "indexed": true, - "internalType": "uint64", - "name": "blockHeight", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "validatorBitMap", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "blockHash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "specimenHash", - "type": "bytes32" - } - ], - "name": "BlockSpecimenQuorum", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint128", - "name": "newBlockSpecimenRewardAllocation", - "type": "uint128" - } - ], - "name": "BlockSpecimenRewardChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint64", - "name": "chainId", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "blockOnTargetChain", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "blockOnCurrentChain", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "secondsPerBlockTargetChain", - "type": "uint256" - } - ], - "name": "ChainSyncDataChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "maxSubmissions", - "type": "uint256" - } - ], - "name": "MaxSubmissionsPerBlockHeightChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint128", - "name": "newStakeRequirement", - "type": "uint128" - } - ], - "name": "MinimumRequiredStakeChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint64", - "name": "chainId", - "type": "uint64" - }, - { - "indexed": true, - "internalType": "uint64", - "name": "nthBlock", - "type": "uint64" - } - ], - "name": "NthBlockChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "OperatorAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "activeOperatorCount", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "OperatorRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint64", - "name": "chainId", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "blockHeight", - "type": "uint64" - } - ], - "name": "QuorumNotReached", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint64", - "name": "secondsPerBlockCurrentChain", - "type": "uint64" - } - ], - "name": "SecondsPerBlockCurrentChainChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint64", - "name": "chainId", - "type": "uint64" - }, - { - "indexed": true, - "internalType": "uint64", - "name": "blockHeight", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "deadline", - "type": "uint64" - } - ], - "name": "SessionStarted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "newSessionDuration", - "type": "uint64" - } - ], - "name": "SpecimenSessionDurationChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "minSubmissions", - "type": "uint64" - } - ], - "name": "SpecimenSessionMinSubmissionChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "newQuorumThreshold", - "type": "uint256" - } - ], - "name": "SpecimenSessionQuorumChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "newStakingManager", - "type": "address" - } - ], - "name": "StakingManagerChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "ValidatorDisabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "ValidatorEnabled", - "type": "event" - }, - { - "inputs": [], - "name": "AUDITOR_ROLE", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "BLOCK_SPECIMEN_PRODUCER_ROLE", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GOVERNANCE_ROLE", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "auditor", "type": "address" } - ], - "name": "addAuditor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "addBSPOperator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "governor", "type": "address" } - ], - "name": "addGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "disableValidator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "enableValidator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint64", "name": "chainId", "type": "uint64" }, - { - "internalType": "uint64", - "name": "blockHeight", - "type": "uint64" - } - ], - "name": "finalizeSpecimenSession", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getAllOperators", - "outputs": [ - { - "internalType": "address[]", - "name": "_bsps", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "__governors", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "__auditors", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getBSPRoleData", - "outputs": [ - { - "internalType": "uint128", - "name": "requiredStake", - "type": "uint128" - }, - { - "internalType": "address[]", - "name": "activeMembers", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint64", "name": "chainId", "type": "uint64" } - ], - "name": "getChainData", - "outputs": [ - { - "internalType": "uint256", - "name": "blockOnTargetChain", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "blockOnCurrentChain", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "secondsPerBlockTargetChain", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "allowedThreshold", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "maxSubmissionsPerBlockHeight", - "type": "uint128" - }, - { "internalType": "uint64", "name": "nthBlock", "type": "uint64" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "getEnabledOperatorCount", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getMetadata", - "outputs": [ - { - "internalType": "address", - "name": "stakingManager", - "type": "address" - }, - { - "internalType": "uint128", - "name": "blockSpecimenRewardAllocation", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "blockSpecimenSessionDuration", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "minSubmissionsRequired", - "type": "uint64" - }, - { - "internalType": "uint256", - "name": "blockSpecimenQuorum", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "secondsPerBlockCurrentChain", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "getOperators", - "outputs": [ - { "internalType": "address[]", "name": "", "type": "address[]" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "specimenhash", - "type": "bytes32" - } - ], - "name": "getURLS", - "outputs": [ - { "internalType": "string[]", "name": "", "type": "string[]" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "initialGovernor", - "type": "address" - }, - { - "internalType": "address", - "name": "stakingManager", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "operator", "type": "address" } - ], - "name": "isEnabled", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint64", "name": "chainId", "type": "uint64" }, - { - "internalType": "uint64", - "name": "blockHeight", - "type": "uint64" - }, - { "internalType": "address", "name": "operator", "type": "address" } - ], - "name": "isSessionOpen", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "isValidatorEnabled", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "name": "operatorRoles", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "auditor", "type": "address" } - ], - "name": "removeAuditor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "operator", "type": "address" } - ], - "name": "removeBSPOperator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "governor", "type": "address" } - ], - "name": "removeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint64", "name": "chainId", "type": "uint64" }, - { "internalType": "uint64", "name": "threshold", "type": "uint64" } - ], - "name": "setBlockHeightSubmissionsThreshold", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "newBlockSpecimenReward", - "type": "uint128" - } - ], - "name": "setBlockSpecimenReward", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "newSessionDuration", - "type": "uint64" - } - ], - "name": "setBlockSpecimenSessionDuration", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint64", "name": "chainId", "type": "uint64" }, - { - "internalType": "uint256", - "name": "blockOnTargetChain", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "blockOnCurrentChain", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "secondsPerBlockTargetChain", - "type": "uint256" - } - ], - "name": "setChainSyncData", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint64", "name": "chainId", "type": "uint64" }, - { - "internalType": "uint64", - "name": "maxSubmissions", - "type": "uint64" - } - ], - "name": "setMaxSubmissionsPerBlockHeight", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "minSubmissions", - "type": "uint64" - } - ], - "name": "setMinSubmissionsRequired", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint64", "name": "chainId", "type": "uint64" }, - { "internalType": "uint64", "name": "n", "type": "uint64" } - ], - "name": "setNthBlock", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "quorum", "type": "uint256" } - ], - "name": "setQuorumThreshold", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "secondsPerBlockCurrentChain", - "type": "uint64" - } - ], - "name": "setSecondsPerBlockCurrentChain", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "stakingManagerAddress", - "type": "address" - } - ], - "name": "setStakingManagerAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint64", "name": "chainId", "type": "uint64" }, - { - "internalType": "uint64", - "name": "blockHeight", - "type": "uint64" - }, - { - "internalType": "bytes32", - "name": "blockHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "specimenHash", - "type": "bytes32" - }, - { "internalType": "string", "name": "storageURL", "type": "string" } - ], - "name": "submitBlockSpecimenProof", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "newOwner", "type": "address" } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "name": "validatorIDs", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/services/decoder/protocols/covalent-network/abis/new-block-specimen-proof.abi.ts b/services/decoder/protocols/covalent-network/abis/new-block-specimen-proof.abi.ts new file mode 100644 index 0000000..1585564 --- /dev/null +++ b/services/decoder/protocols/covalent-network/abis/new-block-specimen-proof.abi.ts @@ -0,0 +1,926 @@ +export const newBlockSpecimenProofABI = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint64", + name: "chainId", + type: "uint64", + }, + { + indexed: false, + internalType: "uint64", + name: "threshold", + type: "uint64", + }, + ], + name: "BlockHeightSubmissionThresholdChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint64", + name: "chainId", + type: "uint64", + }, + { + indexed: false, + internalType: "uint64", + name: "blockHeight", + type: "uint64", + }, + { + indexed: false, + internalType: "bytes32", + name: "blockHash", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes32", + name: "specimenHash", + type: "bytes32", + }, + { + indexed: false, + internalType: "string", + name: "storageURL", + type: "string", + }, + ], + name: "BlockSpecimenProductionProofSubmitted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint64", + name: "chainId", + type: "uint64", + }, + { + indexed: true, + internalType: "uint64", + name: "blockHeight", + type: "uint64", + }, + { + indexed: false, + internalType: "uint256", + name: "validatorBitMap", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes32", + name: "blockHash", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes32", + name: "specimenHash", + type: "bytes32", + }, + ], + name: "BlockSpecimenQuorum", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint128", + name: "newBlockSpecimenRewardAllocation", + type: "uint128", + }, + ], + name: "BlockSpecimenRewardChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint64", + name: "chainId", + type: "uint64", + }, + { + indexed: false, + internalType: "uint256", + name: "blockOnTargetChain", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "blockOnCurrentChain", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "secondsPerBlockTargetChain", + type: "uint256", + }, + ], + name: "ChainSyncDataChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "version", + type: "uint8", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "maxSubmissions", + type: "uint256", + }, + ], + name: "MaxSubmissionsPerBlockHeightChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint128", + name: "newStakeRequirement", + type: "uint128", + }, + ], + name: "MinimumRequiredStakeChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint64", + name: "chainId", + type: "uint64", + }, + { + indexed: true, + internalType: "uint64", + name: "nthBlock", + type: "uint64", + }, + ], + name: "NthBlockChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "operator", + type: "address", + }, + { + indexed: false, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: false, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + ], + name: "OperatorAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "operator", + type: "address", + }, + { + indexed: false, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "activeOperatorCount", + type: "uint128", + }, + { + indexed: false, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + ], + name: "OperatorRemoved", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint64", + name: "chainId", + type: "uint64", + }, + { + indexed: false, + internalType: "uint64", + name: "blockHeight", + type: "uint64", + }, + ], + name: "QuorumNotReached", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint64", + name: "secondsPerBlockCurrentChain", + type: "uint64", + }, + ], + name: "SecondsPerBlockCurrentChainChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint64", + name: "chainId", + type: "uint64", + }, + { + indexed: true, + internalType: "uint64", + name: "blockHeight", + type: "uint64", + }, + { + indexed: false, + internalType: "uint64", + name: "deadline", + type: "uint64", + }, + ], + name: "SessionStarted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint64", + name: "newSessionDuration", + type: "uint64", + }, + ], + name: "SpecimenSessionDurationChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint64", + name: "minSubmissions", + type: "uint64", + }, + ], + name: "SpecimenSessionMinSubmissionChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "newQuorumThreshold", + type: "uint256", + }, + ], + name: "SpecimenSessionQuorumChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "newStakingManager", + type: "address", + }, + ], + name: "StakingManagerChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "ValidatorDisabled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "ValidatorEnabled", + type: "event", + }, + { + inputs: [], + name: "AUDITOR_ROLE", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "BLOCK_SPECIMEN_PRODUCER_ROLE", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "GOVERNANCE_ROLE", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "auditor", type: "address" }], + name: "addAuditor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "operator", + type: "address", + }, + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "addBSPOperator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "governor", type: "address" }, + ], + name: "addGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "disableValidator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "enableValidator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint64", name: "chainId", type: "uint64" }, + { + internalType: "uint64", + name: "blockHeight", + type: "uint64", + }, + ], + name: "finalizeSpecimenSession", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getAllOperators", + outputs: [ + { + internalType: "address[]", + name: "_bsps", + type: "address[]", + }, + { + internalType: "address[]", + name: "__governors", + type: "address[]", + }, + { + internalType: "address[]", + name: "__auditors", + type: "address[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getBSPRoleData", + outputs: [ + { + internalType: "uint128", + name: "requiredStake", + type: "uint128", + }, + { + internalType: "address[]", + name: "activeMembers", + type: "address[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint64", name: "chainId", type: "uint64" }], + name: "getChainData", + outputs: [ + { + internalType: "uint256", + name: "blockOnTargetChain", + type: "uint256", + }, + { + internalType: "uint256", + name: "blockOnCurrentChain", + type: "uint256", + }, + { + internalType: "uint256", + name: "secondsPerBlockTargetChain", + type: "uint256", + }, + { + internalType: "uint128", + name: "allowedThreshold", + type: "uint128", + }, + { + internalType: "uint128", + name: "maxSubmissionsPerBlockHeight", + type: "uint128", + }, + { internalType: "uint64", name: "nthBlock", type: "uint64" }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "getEnabledOperatorCount", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getMetadata", + outputs: [ + { + internalType: "address", + name: "stakingManager", + type: "address", + }, + { + internalType: "uint128", + name: "blockSpecimenRewardAllocation", + type: "uint128", + }, + { + internalType: "uint64", + name: "blockSpecimenSessionDuration", + type: "uint64", + }, + { + internalType: "uint64", + name: "minSubmissionsRequired", + type: "uint64", + }, + { + internalType: "uint256", + name: "blockSpecimenQuorum", + type: "uint256", + }, + { + internalType: "uint256", + name: "secondsPerBlockCurrentChain", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "getOperators", + outputs: [{ internalType: "address[]", name: "", type: "address[]" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "specimenhash", + type: "bytes32", + }, + ], + name: "getURLS", + outputs: [{ internalType: "string[]", name: "", type: "string[]" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "initialGovernor", + type: "address", + }, + { + internalType: "address", + name: "stakingManager", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "operator", type: "address" }, + ], + name: "isEnabled", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint64", name: "chainId", type: "uint64" }, + { + internalType: "uint64", + name: "blockHeight", + type: "uint64", + }, + { internalType: "address", name: "operator", type: "address" }, + ], + name: "isSessionOpen", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "isValidatorEnabled", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "", type: "address" }], + name: "operatorRoles", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "auditor", type: "address" }], + name: "removeAuditor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "operator", type: "address" }, + ], + name: "removeBSPOperator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "governor", type: "address" }, + ], + name: "removeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint64", name: "chainId", type: "uint64" }, + { internalType: "uint64", name: "threshold", type: "uint64" }, + ], + name: "setBlockHeightSubmissionsThreshold", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "newBlockSpecimenReward", + type: "uint128", + }, + ], + name: "setBlockSpecimenReward", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "newSessionDuration", + type: "uint64", + }, + ], + name: "setBlockSpecimenSessionDuration", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint64", name: "chainId", type: "uint64" }, + { + internalType: "uint256", + name: "blockOnTargetChain", + type: "uint256", + }, + { + internalType: "uint256", + name: "blockOnCurrentChain", + type: "uint256", + }, + { + internalType: "uint256", + name: "secondsPerBlockTargetChain", + type: "uint256", + }, + ], + name: "setChainSyncData", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint64", name: "chainId", type: "uint64" }, + { + internalType: "uint64", + name: "maxSubmissions", + type: "uint64", + }, + ], + name: "setMaxSubmissionsPerBlockHeight", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "minSubmissions", + type: "uint64", + }, + ], + name: "setMinSubmissionsRequired", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint64", name: "chainId", type: "uint64" }, + { internalType: "uint64", name: "n", type: "uint64" }, + ], + name: "setNthBlock", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "quorum", type: "uint256" }], + name: "setQuorumThreshold", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "secondsPerBlockCurrentChain", + type: "uint64", + }, + ], + name: "setSecondsPerBlockCurrentChain", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "stakingManagerAddress", + type: "address", + }, + ], + name: "setStakingManagerAddress", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint64", name: "chainId", type: "uint64" }, + { + internalType: "uint64", + name: "blockHeight", + type: "uint64", + }, + { + internalType: "bytes32", + name: "blockHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "specimenHash", + type: "bytes32", + }, + { internalType: "string", name: "storageURL", type: "string" }, + ], + name: "submitBlockSpecimenProof", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "newOwner", type: "address" }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "", type: "address" }], + name: "validatorIDs", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, +] as const; diff --git a/services/decoder/protocols/covalent-network/abis/new-operational-staking.abi.json b/services/decoder/protocols/covalent-network/abis/new-operational-staking.abi.json deleted file mode 100644 index 50c87c4..0000000 --- a/services/decoder/protocols/covalent-network/abis/new-operational-staking.abi.json +++ /dev/null @@ -1,1572 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "AllocatedTokensTaken", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": true, - "internalType": "address", - "name": "beneficiary", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "CommissionRewardRedeemed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "DelegatorMinStakeChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "DelegatorUnstakeCooldownChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "cqt", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "validatorCoolDown", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "delegatorCoolDown", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "recoverUnstakingCoolDown", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "maxCapMultiplier", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "validatorMaxStake", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "validatorEnableMinStake", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "delegatorMinStake", - "type": "uint128" - } - ], - "name": "InitializedSemantics", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint128", - "name": "newMaxCapMultiplier", - "type": "uint128" - } - ], - "name": "MaxCapMultiplierChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "RecoverUnstakeCooldownChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "unstakingId", - "type": "uint128" - } - ], - "name": "RecoveredUnstake", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "oldValidatorId", - "type": "uint128" - }, - { - "indexed": true, - "internalType": "uint128", - "name": "newValidatorId", - "type": "uint128" - }, - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "unstakingId", - "type": "uint128" - } - ], - "name": "Redelegated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "RewardFailedDueValidatorDisabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "RewardFailedDueValidatorFrozen", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "RewardFailedDueZeroStake", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": true, - "internalType": "address", - "name": "beneficiary", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "RewardRedeemed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "RewardTokensDeposited", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "rewardId", - "type": "uint128" - } - ], - "name": "RewardsDisbursed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "Staked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operationalManager", - "type": "address" - } - ], - "name": "StakingManagerChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint128", - "name": "unstakeId", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "UnstakeRedeemed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "unstakeId", - "type": "uint128" - } - ], - "name": "Unstaked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "id", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "commissionRate", - "type": "uint128" - }, - { - "indexed": true, - "internalType": "address", - "name": "validator", - "type": "address" - } - ], - "name": "ValidatorAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": true, - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "ValidatorAddressChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "ValidatorCommissionRateChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "name": "ValidatorDisabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "ValidatorEnableMinStakeChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "ValidatorEnabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "ValidatorFrozen", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "ValidatorMaxCapChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "ValidatorUnfrozen", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "ValidatorUnstakeCooldownChanged", - "type": "event" - }, - { - "inputs": [], - "name": "CQT", - "outputs": [ - { - "internalType": "contract IERC20Upgradeable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DEFAULT_DELEGATOR_MIN_STAKE", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DEFAULT_VALIDATOR_ENABLE_MIN_STAKE", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DIVIDER", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REWARD_REDEEM_THRESHOLD", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "validator", - "type": "address" - }, - { - "internalType": "uint128", - "name": "commissionRate", - "type": "uint128" - } - ], - "name": "addValidator", - "outputs": [ - { "internalType": "uint256", "name": "id", "type": "uint256" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "checkDelegatorExists", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "delegatorCoolDown", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "delegatorMinStake", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint128", "name": "amount", "type": "uint128" } - ], - "name": "depositRewardTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "disableValidator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "enableValidator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { "internalType": "string", "name": "reason", "type": "string" } - ], - "name": "freezeValidator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getAllValidatorsMetadata", - "outputs": [ - { - "internalType": "address[]", - "name": "addresses", - "type": "address[]" - }, - { - "internalType": "uint128[]", - "name": "staked", - "type": "uint128[]" - }, - { - "internalType": "uint128[]", - "name": "delegated", - "type": "uint128[]" - }, - { - "internalType": "uint128[]", - "name": "commissionRates", - "type": "uint128[]" - }, - { - "internalType": "uint256[]", - "name": "disabledAtBlocks", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "getDelegatorMetadata", - "outputs": [ - { "internalType": "uint128", "name": "staked", "type": "uint128" }, - { "internalType": "uint128", "name": "rewards", "type": "uint128" }, - { - "internalType": "uint128", - "name": "commissionEarned", - "type": "uint128" - }, - { - "internalType": "uint128[]", - "name": "unstakingAmounts", - "type": "uint128[]" - }, - { - "internalType": "uint128[]", - "name": "unstakingsEndEpochs", - "type": "uint128[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegator", - "type": "address" - } - ], - "name": "getDelegatorTotalLocked", - "outputs": [ - { - "internalType": "uint128", - "name": "totalValueLocked", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getMetadata", - "outputs": [ - { - "internalType": "address", - "name": "CQTaddress", - "type": "address" - }, - { - "internalType": "address", - "name": "_stakingManager", - "type": "address" - }, - { - "internalType": "uint128", - "name": "_validatorsN", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "_rewardPool", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "_validatorCoolDown", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "_delegatorCoolDown", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "_recoverUnstakingCoolDown", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "_maxCapMultiplier", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "_validatorMaxStake", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "_validatorEnableMinStake", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "_delegatorMinStake", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "getValidatorCompoundedStakingData", - "outputs": [ - { "internalType": "uint128", "name": "staked", "type": "uint128" }, - { - "internalType": "uint128", - "name": "delegated", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "getValidatorMetadata", - "outputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - }, - { "internalType": "uint128", "name": "staked", "type": "uint128" }, - { - "internalType": "uint128", - "name": "delegated", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "commissionRate", - "type": "uint128" - }, - { - "internalType": "uint256", - "name": "disabledAtBlock", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "getValidatorStakingData", - "outputs": [ - { "internalType": "uint128", "name": "staked", "type": "uint128" }, - { - "internalType": "uint128", - "name": "delegated", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getValidatorsCompoundedStakes", - "outputs": [ - { - "internalType": "uint128[]", - "name": "validatorIds", - "type": "uint128[]" - }, - { - "internalType": "bool[]", - "name": "isEnableds", - "type": "bool[]" - }, - { - "internalType": "uint128[]", - "name": "cstaked", - "type": "uint128[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint128", "name": "startId", "type": "uint128" }, - { "internalType": "uint128", "name": "endId", "type": "uint128" } - ], - "name": "getValidatorsMetadata", - "outputs": [ - { - "internalType": "address[]", - "name": "addresses", - "type": "address[]" - }, - { - "internalType": "uint128[]", - "name": "staked", - "type": "uint128[]" - }, - { - "internalType": "uint128[]", - "name": "delegated", - "type": "uint128[]" - }, - { - "internalType": "uint128[]", - "name": "commissionRates", - "type": "uint128[]" - }, - { - "internalType": "uint256[]", - "name": "disabledAtBlocks", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "cqt", "type": "address" }, - { - "internalType": "uint128", - "name": "dCoolDown", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "vCoolDown", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "rCoolDown", - "type": "uint128" - }, - { "internalType": "uint128", "name": "maxCapM", "type": "uint128" }, - { - "internalType": "uint128", - "name": "vMaxStake", - "type": "uint128" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "isValidatorEnabled", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxCapMultiplier", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint128", "name": "amount", "type": "uint128" }, - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "unstakingId", - "type": "uint128" - } - ], - "name": "recoverUnstaking", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "recoverUnstakingCoolDown", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "internalType": "address", - "name": "beneficiary", - "type": "address" - } - ], - "name": "redeemAllCommission", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "internalType": "address", - "name": "beneficiary", - "type": "address" - } - ], - "name": "redeemAllRewards", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "internalType": "address", - "name": "beneficiary", - "type": "address" - }, - { "internalType": "uint128", "name": "amount", "type": "uint128" } - ], - "name": "redeemCommission", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "internalType": "address", - "name": "beneficiary", - "type": "address" - }, - { "internalType": "uint128", "name": "amount", "type": "uint128" } - ], - "name": "redeemRewards", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint128", "name": "amount", "type": "uint128" }, - { - "internalType": "uint128", - "name": "oldValidatorId", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "newValidatorId", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "unstakingId", - "type": "uint128" - } - ], - "name": "redelegateUnstaked", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rewardPool", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "rewardId", - "type": "uint128" - }, - { "internalType": "uint128[]", "name": "ids", "type": "uint128[]" }, - { - "internalType": "uint128[]", - "name": "amounts", - "type": "uint128[]" - } - ], - "name": "rewardValidators", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint128", "name": "coolDown", "type": "uint128" } - ], - "name": "setDelegatorCoolDown", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint128", "name": "minStake", "type": "uint128" } - ], - "name": "setDelegatorMinStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "newMaxCapMultiplier", - "type": "uint128" - } - ], - "name": "setMaxCapMultiplier", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint128", "name": "coolDown", "type": "uint128" } - ], - "name": "setRecoverUnstakingCoolDown", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "setStakingManagerAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "setValidatorAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { "internalType": "uint128", "name": "amount", "type": "uint128" } - ], - "name": "setValidatorCommissionRate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint128", "name": "coolDown", "type": "uint128" } - ], - "name": "setValidatorCoolDown", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint128", "name": "minStake", "type": "uint128" } - ], - "name": "setValidatorEnableMinStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint128", "name": "maxStake", "type": "uint128" } - ], - "name": "setValidatorMaxStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { "internalType": "uint128", "name": "amount", "type": "uint128" } - ], - "name": "stake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "stakingManager", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint128", "name": "amount", "type": "uint128" } - ], - "name": "takeOutRewardTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "newOwner", "type": "address" } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint128", "name": "amount", "type": "uint128" }, - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "unstakingId", - "type": "uint128" - } - ], - "name": "transferUnstakedOut", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "unfreezeValidator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { "internalType": "uint128", "name": "amount", "type": "uint128" } - ], - "name": "unstake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "unstakeAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "validatorCoolDown", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "validatorEnableMinStake", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "validatorMaxStake", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "validatorsN", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/services/decoder/protocols/covalent-network/abis/new-operational-staking.abi.ts b/services/decoder/protocols/covalent-network/abis/new-operational-staking.abi.ts new file mode 100644 index 0000000..03ecb4f --- /dev/null +++ b/services/decoder/protocols/covalent-network/abis/new-operational-staking.abi.ts @@ -0,0 +1,1536 @@ +export const newOperationalStakingABI = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "AllocatedTokensTaken", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: true, + internalType: "address", + name: "beneficiary", + type: "address", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "CommissionRewardRedeemed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "DelegatorMinStakeChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "DelegatorUnstakeCooldownChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "version", + type: "uint8", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "cqt", + type: "address", + }, + { + indexed: false, + internalType: "uint128", + name: "validatorCoolDown", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "delegatorCoolDown", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "recoverUnstakingCoolDown", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "maxCapMultiplier", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "validatorMaxStake", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "validatorEnableMinStake", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "delegatorMinStake", + type: "uint128", + }, + ], + name: "InitializedSemantics", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint128", + name: "newMaxCapMultiplier", + type: "uint128", + }, + ], + name: "MaxCapMultiplierChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "Paused", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "RecoverUnstakeCooldownChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: true, + internalType: "address", + name: "delegator", + type: "address", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "unstakingId", + type: "uint128", + }, + ], + name: "RecoveredUnstake", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "oldValidatorId", + type: "uint128", + }, + { + indexed: true, + internalType: "uint128", + name: "newValidatorId", + type: "uint128", + }, + { + indexed: true, + internalType: "address", + name: "delegator", + type: "address", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "unstakingId", + type: "uint128", + }, + ], + name: "Redelegated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "RewardFailedDueValidatorDisabled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "RewardFailedDueValidatorFrozen", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "RewardFailedDueZeroStake", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: true, + internalType: "address", + name: "beneficiary", + type: "address", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "RewardRedeemed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "RewardTokensDeposited", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "rewardId", + type: "uint128", + }, + ], + name: "RewardsDisbursed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: false, + internalType: "address", + name: "delegator", + type: "address", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "Staked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "operationalManager", + type: "address", + }, + ], + name: "StakingManagerChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "Unpaused", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: true, + internalType: "address", + name: "delegator", + type: "address", + }, + { + indexed: true, + internalType: "uint128", + name: "unstakeId", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "UnstakeRedeemed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: true, + internalType: "address", + name: "delegator", + type: "address", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "unstakeId", + type: "uint128", + }, + ], + name: "Unstaked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "id", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "commissionRate", + type: "uint128", + }, + { + indexed: true, + internalType: "address", + name: "validator", + type: "address", + }, + ], + name: "ValidatorAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: true, + internalType: "address", + name: "newAddress", + type: "address", + }, + ], + name: "ValidatorAddressChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "ValidatorCommissionRateChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: false, + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "ValidatorDisabled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "ValidatorEnableMinStakeChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "ValidatorEnabled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: false, + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "ValidatorFrozen", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "ValidatorMaxCapChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "ValidatorUnfrozen", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "ValidatorUnstakeCooldownChanged", + type: "event", + }, + { + inputs: [], + name: "CQT", + outputs: [ + { + internalType: "contract IERC20Upgradeable", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "DEFAULT_DELEGATOR_MIN_STAKE", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "DEFAULT_VALIDATOR_ENABLE_MIN_STAKE", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "DIVIDER", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "REWARD_REDEEM_THRESHOLD", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "validator", + type: "address", + }, + { + internalType: "uint128", + name: "commissionRate", + type: "uint128", + }, + ], + name: "addValidator", + outputs: [{ internalType: "uint256", name: "id", type: "uint256" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newAddress", + type: "address", + }, + ], + name: "checkDelegatorExists", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "delegatorCoolDown", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "delegatorMinStake", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint128", name: "amount", type: "uint128" }], + name: "depositRewardTokens", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "disableValidator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "enableValidator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { internalType: "string", name: "reason", type: "string" }, + ], + name: "freezeValidator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getAllValidatorsMetadata", + outputs: [ + { + internalType: "address[]", + name: "addresses", + type: "address[]", + }, + { + internalType: "uint128[]", + name: "staked", + type: "uint128[]", + }, + { + internalType: "uint128[]", + name: "delegated", + type: "uint128[]", + }, + { + internalType: "uint128[]", + name: "commissionRates", + type: "uint128[]", + }, + { + internalType: "uint256[]", + name: "disabledAtBlocks", + type: "uint256[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "delegator", + type: "address", + }, + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "getDelegatorMetadata", + outputs: [ + { internalType: "uint128", name: "staked", type: "uint128" }, + { internalType: "uint128", name: "rewards", type: "uint128" }, + { + internalType: "uint128", + name: "commissionEarned", + type: "uint128", + }, + { + internalType: "uint128[]", + name: "unstakingAmounts", + type: "uint128[]", + }, + { + internalType: "uint128[]", + name: "unstakingsEndEpochs", + type: "uint128[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "delegator", + type: "address", + }, + ], + name: "getDelegatorTotalLocked", + outputs: [ + { + internalType: "uint128", + name: "totalValueLocked", + type: "uint128", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getMetadata", + outputs: [ + { + internalType: "address", + name: "CQTaddress", + type: "address", + }, + { + internalType: "address", + name: "_stakingManager", + type: "address", + }, + { + internalType: "uint128", + name: "_validatorsN", + type: "uint128", + }, + { + internalType: "uint128", + name: "_rewardPool", + type: "uint128", + }, + { + internalType: "uint128", + name: "_validatorCoolDown", + type: "uint128", + }, + { + internalType: "uint128", + name: "_delegatorCoolDown", + type: "uint128", + }, + { + internalType: "uint128", + name: "_recoverUnstakingCoolDown", + type: "uint128", + }, + { + internalType: "uint128", + name: "_maxCapMultiplier", + type: "uint128", + }, + { + internalType: "uint128", + name: "_validatorMaxStake", + type: "uint128", + }, + { + internalType: "uint128", + name: "_validatorEnableMinStake", + type: "uint128", + }, + { + internalType: "uint128", + name: "_delegatorMinStake", + type: "uint128", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "getValidatorCompoundedStakingData", + outputs: [ + { internalType: "uint128", name: "staked", type: "uint128" }, + { + internalType: "uint128", + name: "delegated", + type: "uint128", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "getValidatorMetadata", + outputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + { internalType: "uint128", name: "staked", type: "uint128" }, + { + internalType: "uint128", + name: "delegated", + type: "uint128", + }, + { + internalType: "uint128", + name: "commissionRate", + type: "uint128", + }, + { + internalType: "uint256", + name: "disabledAtBlock", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "getValidatorStakingData", + outputs: [ + { internalType: "uint128", name: "staked", type: "uint128" }, + { + internalType: "uint128", + name: "delegated", + type: "uint128", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getValidatorsCompoundedStakes", + outputs: [ + { + internalType: "uint128[]", + name: "validatorIds", + type: "uint128[]", + }, + { + internalType: "bool[]", + name: "isEnableds", + type: "bool[]", + }, + { + internalType: "uint128[]", + name: "cstaked", + type: "uint128[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint128", name: "startId", type: "uint128" }, + { internalType: "uint128", name: "endId", type: "uint128" }, + ], + name: "getValidatorsMetadata", + outputs: [ + { + internalType: "address[]", + name: "addresses", + type: "address[]", + }, + { + internalType: "uint128[]", + name: "staked", + type: "uint128[]", + }, + { + internalType: "uint128[]", + name: "delegated", + type: "uint128[]", + }, + { + internalType: "uint128[]", + name: "commissionRates", + type: "uint128[]", + }, + { + internalType: "uint256[]", + name: "disabledAtBlocks", + type: "uint256[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "cqt", type: "address" }, + { + internalType: "uint128", + name: "dCoolDown", + type: "uint128", + }, + { + internalType: "uint128", + name: "vCoolDown", + type: "uint128", + }, + { + internalType: "uint128", + name: "rCoolDown", + type: "uint128", + }, + { internalType: "uint128", name: "maxCapM", type: "uint128" }, + { + internalType: "uint128", + name: "vMaxStake", + type: "uint128", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "isValidatorEnabled", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "maxCapMultiplier", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "pause", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "paused", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint128", name: "amount", type: "uint128" }, + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + internalType: "uint128", + name: "unstakingId", + type: "uint128", + }, + ], + name: "recoverUnstaking", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "recoverUnstakingCoolDown", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + internalType: "address", + name: "beneficiary", + type: "address", + }, + ], + name: "redeemAllCommission", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + internalType: "address", + name: "beneficiary", + type: "address", + }, + ], + name: "redeemAllRewards", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + internalType: "address", + name: "beneficiary", + type: "address", + }, + { internalType: "uint128", name: "amount", type: "uint128" }, + ], + name: "redeemCommission", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + internalType: "address", + name: "beneficiary", + type: "address", + }, + { internalType: "uint128", name: "amount", type: "uint128" }, + ], + name: "redeemRewards", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint128", name: "amount", type: "uint128" }, + { + internalType: "uint128", + name: "oldValidatorId", + type: "uint128", + }, + { + internalType: "uint128", + name: "newValidatorId", + type: "uint128", + }, + { + internalType: "uint128", + name: "unstakingId", + type: "uint128", + }, + ], + name: "redelegateUnstaked", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "rewardPool", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "rewardId", + type: "uint128", + }, + { internalType: "uint128[]", name: "ids", type: "uint128[]" }, + { + internalType: "uint128[]", + name: "amounts", + type: "uint128[]", + }, + ], + name: "rewardValidators", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint128", name: "coolDown", type: "uint128" }, + ], + name: "setDelegatorCoolDown", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint128", name: "minStake", type: "uint128" }, + ], + name: "setDelegatorMinStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "newMaxCapMultiplier", + type: "uint128", + }, + ], + name: "setMaxCapMultiplier", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint128", name: "coolDown", type: "uint128" }, + ], + name: "setRecoverUnstakingCoolDown", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newAddress", + type: "address", + }, + ], + name: "setStakingManagerAddress", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + internalType: "address", + name: "newAddress", + type: "address", + }, + ], + name: "setValidatorAddress", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { internalType: "uint128", name: "amount", type: "uint128" }, + ], + name: "setValidatorCommissionRate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint128", name: "coolDown", type: "uint128" }, + ], + name: "setValidatorCoolDown", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint128", name: "minStake", type: "uint128" }, + ], + name: "setValidatorEnableMinStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint128", name: "maxStake", type: "uint128" }, + ], + name: "setValidatorMaxStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { internalType: "uint128", name: "amount", type: "uint128" }, + ], + name: "stake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "stakingManager", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint128", name: "amount", type: "uint128" }], + name: "takeOutRewardTokens", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "newOwner", type: "address" }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint128", name: "amount", type: "uint128" }, + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + internalType: "uint128", + name: "unstakingId", + type: "uint128", + }, + ], + name: "transferUnstakedOut", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "unfreezeValidator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "unpause", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { internalType: "uint128", name: "amount", type: "uint128" }, + ], + name: "unstake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "unstakeAll", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "validatorCoolDown", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "validatorEnableMinStake", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "validatorMaxStake", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "validatorsN", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, +] as const; diff --git a/services/decoder/protocols/covalent-network/abis/old-block-specimen-proof.abi.json b/services/decoder/protocols/covalent-network/abis/old-block-specimen-proof.abi.json deleted file mode 100644 index 6c971df..0000000 --- a/services/decoder/protocols/covalent-network/abis/old-block-specimen-proof.abi.json +++ /dev/null @@ -1,1062 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint64", - "name": "chainId", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "threshold", - "type": "uint64" - } - ], - "name": "BlockHeightSubmissionThresholdChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "chainId", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "blockHeight", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "blockHash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "specimenHash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "string", - "name": "storageURL", - "type": "string" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "submittedStake", - "type": "uint128" - } - ], - "name": "BlockSpecimenProductionProofSubmitted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint64", - "name": "chainId", - "type": "uint64" - }, - { - "indexed": true, - "internalType": "uint64", - "name": "blockHeight", - "type": "uint64" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "blockhash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "specimenhash", - "type": "bytes32" - } - ], - "name": "BlockSpecimenRewardAwarded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint128", - "name": "newBlockSpecimenRewardAllocation", - "type": "uint128" - } - ], - "name": "BlockSpecimenRewardChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint64", - "name": "chainId", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "blockOnTargetChain", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "blockOnCurrentChain", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "secondsPerBlock", - "type": "uint256" - } - ], - "name": "ChainSyncDataChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "maxSubmissions", - "type": "uint256" - } - ], - "name": "MaxSubmissionsPerBlockHeightChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint128", - "name": "newStakeRequirement", - "type": "uint128" - } - ], - "name": "MinimumRequiredStakeChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint64", - "name": "chainId", - "type": "uint64" - }, - { - "indexed": true, - "internalType": "uint64", - "name": "nthBlock", - "type": "uint64" - } - ], - "name": "NthBlockChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "OperatorAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "OperatorDisabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "OperatorEnabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "OperatorRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint64", - "name": "chainId", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "blockHeight", - "type": "uint64" - } - ], - "name": "QuorumNotReached", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint64", - "name": "secondsPerBlock", - "type": "uint64" - } - ], - "name": "SecondsPerBlockChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint64", - "name": "chainId", - "type": "uint64" - }, - { - "indexed": true, - "internalType": "uint64", - "name": "blockHeight", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "deadline", - "type": "uint64" - } - ], - "name": "SessionStarted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "newSessionDuration", - "type": "uint64" - } - ], - "name": "SpecimenSessionDurationChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "minSubmissions", - "type": "uint64" - } - ], - "name": "SpecimenSessionMinSubmissionChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "newQuorumThreshold", - "type": "uint256" - } - ], - "name": "SpecimenSessionQuorumChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "newInterfaceAddress", - "type": "address" - } - ], - "name": "StakingInterfaceChanged", - "type": "event" - }, - { - "inputs": [], - "name": "AUDITOR_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "BLOCK_SPECIMEN_PRODUCER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GOVERNANCE_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "auditor", - "type": "address" - } - ], - "name": "addAuditor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "addBSPOperator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "governor", - "type": "address" - } - ], - "name": "addGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "validator", - "type": "address" - }, - { - "internalType": "uint128", - "name": "commissionRate", - "type": "uint128" - } - ], - "name": "addValidator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "chainId", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "blockHeight", - "type": "uint64" - }, - { - "internalType": "bytes32", - "name": "blockHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "definitiveSpecimenHash", - "type": "bytes32" - } - ], - "name": "arbitrateBlockSpecimenSession", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "disableBSPOperator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "name": "disableValidator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "enableBSPOperator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "chainId", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "blockHeight", - "type": "uint64" - } - ], - "name": "finalizeAndRewardSpecimenSession", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getAllOperators", - "outputs": [ - { - "internalType": "address[]", - "name": "_bsps", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "__governors", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "__auditors", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getBSPRoleData", - "outputs": [ - { - "internalType": "uint128", - "name": "requiredStake", - "type": "uint128" - }, - { - "internalType": "address[]", - "name": "activeMembers", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "chainId", - "type": "uint64" - } - ], - "name": "getChainData", - "outputs": [ - { - "internalType": "uint256", - "name": "blockOnTargetChain", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "blockOnCurrentChain", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "secondsPerBlock", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "allowedThreshold", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "maxSubmissionsPerBlockHeight", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "nthBlock", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getMetadata", - "outputs": [ - { - "internalType": "address", - "name": "stakingInterface", - "type": "address" - }, - { - "internalType": "uint128", - "name": "blockSpecimenRewardAllocation", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "blockSpecimenSessionDuration", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "minSubmissionsRequired", - "type": "uint64" - }, - { - "internalType": "uint256", - "name": "blockSpecimenQuorum", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "secondsPerBlock", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "getOperators", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "initialOwner", - "type": "address" - }, - { - "internalType": "address", - "name": "stakingContract", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isEnabled", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "operatorRoles", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "auditor", - "type": "address" - } - ], - "name": "removeAuditor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "removeBSPOperator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "governor", - "type": "address" - } - ], - "name": "removeGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "newStakeAmount", - "type": "uint128" - } - ], - "name": "setBSPRequiredStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "chainId", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "threshold", - "type": "uint64" - } - ], - "name": "setBlockHeightSubmissionsThreshold", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "newBlockSpecimenReward", - "type": "uint128" - } - ], - "name": "setBlockSpecimenReward", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "newSessionDuration", - "type": "uint64" - } - ], - "name": "setBlockSpecimenSessionDuration", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "chainId", - "type": "uint64" - }, - { - "internalType": "uint256", - "name": "blockOnTargetChain", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "blockOnCurrentChain", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "secondsPerBlock", - "type": "uint256" - } - ], - "name": "setChainSyncData", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "chainId", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "maxSubmissions", - "type": "uint64" - } - ], - "name": "setMaxSubmissionsPerBlockHeight", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "minSubmissions", - "type": "uint64" - } - ], - "name": "setMinSubmissionsRequired", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "chainId", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "n", - "type": "uint64" - } - ], - "name": "setNthBlock", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "quorum", - "type": "uint256" - } - ], - "name": "setQuorumThreshold", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "secondsPerBlock", - "type": "uint64" - } - ], - "name": "setSecondsPerBlock", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "stakingContractAddress", - "type": "address" - } - ], - "name": "setStakingInterface", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "chainId", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "blockHeight", - "type": "uint64" - }, - { - "internalType": "bytes32", - "name": "blockHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "specimenHash", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "storageURL", - "type": "string" - } - ], - "name": "submitBlockSpecimenProof", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "validatorIDs", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/services/decoder/protocols/covalent-network/abis/old-block-specimen-proof.abi.ts b/services/decoder/protocols/covalent-network/abis/old-block-specimen-proof.abi.ts new file mode 100644 index 0000000..d78a20f --- /dev/null +++ b/services/decoder/protocols/covalent-network/abis/old-block-specimen-proof.abi.ts @@ -0,0 +1,1062 @@ +export const oldBlockSpecimenProofABI = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint64", + name: "chainId", + type: "uint64", + }, + { + indexed: false, + internalType: "uint64", + name: "threshold", + type: "uint64", + }, + ], + name: "BlockHeightSubmissionThresholdChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint64", + name: "chainId", + type: "uint64", + }, + { + indexed: false, + internalType: "uint64", + name: "blockHeight", + type: "uint64", + }, + { + indexed: false, + internalType: "bytes32", + name: "blockHash", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes32", + name: "specimenHash", + type: "bytes32", + }, + { + indexed: false, + internalType: "string", + name: "storageURL", + type: "string", + }, + { + indexed: false, + internalType: "uint128", + name: "submittedStake", + type: "uint128", + }, + ], + name: "BlockSpecimenProductionProofSubmitted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint64", + name: "chainId", + type: "uint64", + }, + { + indexed: true, + internalType: "uint64", + name: "blockHeight", + type: "uint64", + }, + { + indexed: true, + internalType: "bytes32", + name: "blockhash", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes32", + name: "specimenhash", + type: "bytes32", + }, + ], + name: "BlockSpecimenRewardAwarded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint128", + name: "newBlockSpecimenRewardAllocation", + type: "uint128", + }, + ], + name: "BlockSpecimenRewardChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint64", + name: "chainId", + type: "uint64", + }, + { + indexed: false, + internalType: "uint256", + name: "blockOnTargetChain", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "blockOnCurrentChain", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "secondsPerBlock", + type: "uint256", + }, + ], + name: "ChainSyncDataChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "maxSubmissions", + type: "uint256", + }, + ], + name: "MaxSubmissionsPerBlockHeightChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint128", + name: "newStakeRequirement", + type: "uint128", + }, + ], + name: "MinimumRequiredStakeChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint64", + name: "chainId", + type: "uint64", + }, + { + indexed: true, + internalType: "uint64", + name: "nthBlock", + type: "uint64", + }, + ], + name: "NthBlockChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "operator", + type: "address", + }, + { + indexed: false, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: false, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + ], + name: "OperatorAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "operator", + type: "address", + }, + ], + name: "OperatorDisabled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "operator", + type: "address", + }, + ], + name: "OperatorEnabled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "operator", + type: "address", + }, + ], + name: "OperatorRemoved", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint64", + name: "chainId", + type: "uint64", + }, + { + indexed: false, + internalType: "uint64", + name: "blockHeight", + type: "uint64", + }, + ], + name: "QuorumNotReached", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint64", + name: "secondsPerBlock", + type: "uint64", + }, + ], + name: "SecondsPerBlockChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint64", + name: "chainId", + type: "uint64", + }, + { + indexed: true, + internalType: "uint64", + name: "blockHeight", + type: "uint64", + }, + { + indexed: false, + internalType: "uint64", + name: "deadline", + type: "uint64", + }, + ], + name: "SessionStarted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint64", + name: "newSessionDuration", + type: "uint64", + }, + ], + name: "SpecimenSessionDurationChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint64", + name: "minSubmissions", + type: "uint64", + }, + ], + name: "SpecimenSessionMinSubmissionChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "newQuorumThreshold", + type: "uint256", + }, + ], + name: "SpecimenSessionQuorumChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "newInterfaceAddress", + type: "address", + }, + ], + name: "StakingInterfaceChanged", + type: "event", + }, + { + inputs: [], + name: "AUDITOR_ROLE", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "BLOCK_SPECIMEN_PRODUCER_ROLE", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "GOVERNANCE_ROLE", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "auditor", + type: "address", + }, + ], + name: "addAuditor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "operator", + type: "address", + }, + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "addBSPOperator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "governor", + type: "address", + }, + ], + name: "addGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "validator", + type: "address", + }, + { + internalType: "uint128", + name: "commissionRate", + type: "uint128", + }, + ], + name: "addValidator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "chainId", + type: "uint64", + }, + { + internalType: "uint64", + name: "blockHeight", + type: "uint64", + }, + { + internalType: "bytes32", + name: "blockHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "definitiveSpecimenHash", + type: "bytes32", + }, + ], + name: "arbitrateBlockSpecimenSession", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "operator", + type: "address", + }, + ], + name: "disableBSPOperator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "disableValidator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "operator", + type: "address", + }, + ], + name: "enableBSPOperator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "chainId", + type: "uint64", + }, + { + internalType: "uint64", + name: "blockHeight", + type: "uint64", + }, + ], + name: "finalizeAndRewardSpecimenSession", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getAllOperators", + outputs: [ + { + internalType: "address[]", + name: "_bsps", + type: "address[]", + }, + { + internalType: "address[]", + name: "__governors", + type: "address[]", + }, + { + internalType: "address[]", + name: "__auditors", + type: "address[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getBSPRoleData", + outputs: [ + { + internalType: "uint128", + name: "requiredStake", + type: "uint128", + }, + { + internalType: "address[]", + name: "activeMembers", + type: "address[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "chainId", + type: "uint64", + }, + ], + name: "getChainData", + outputs: [ + { + internalType: "uint256", + name: "blockOnTargetChain", + type: "uint256", + }, + { + internalType: "uint256", + name: "blockOnCurrentChain", + type: "uint256", + }, + { + internalType: "uint256", + name: "secondsPerBlock", + type: "uint256", + }, + { + internalType: "uint128", + name: "allowedThreshold", + type: "uint128", + }, + { + internalType: "uint128", + name: "maxSubmissionsPerBlockHeight", + type: "uint128", + }, + { + internalType: "uint64", + name: "nthBlock", + type: "uint64", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getMetadata", + outputs: [ + { + internalType: "address", + name: "stakingInterface", + type: "address", + }, + { + internalType: "uint128", + name: "blockSpecimenRewardAllocation", + type: "uint128", + }, + { + internalType: "uint64", + name: "blockSpecimenSessionDuration", + type: "uint64", + }, + { + internalType: "uint64", + name: "minSubmissionsRequired", + type: "uint64", + }, + { + internalType: "uint256", + name: "blockSpecimenQuorum", + type: "uint256", + }, + { + internalType: "uint256", + name: "secondsPerBlock", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "getOperators", + outputs: [ + { + internalType: "address[]", + name: "", + type: "address[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "initialOwner", + type: "address", + }, + { + internalType: "address", + name: "stakingContract", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "operator", + type: "address", + }, + ], + name: "isEnabled", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "operatorRoles", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "auditor", + type: "address", + }, + ], + name: "removeAuditor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "operator", + type: "address", + }, + ], + name: "removeBSPOperator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "governor", + type: "address", + }, + ], + name: "removeGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "newStakeAmount", + type: "uint128", + }, + ], + name: "setBSPRequiredStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "chainId", + type: "uint64", + }, + { + internalType: "uint64", + name: "threshold", + type: "uint64", + }, + ], + name: "setBlockHeightSubmissionsThreshold", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "newBlockSpecimenReward", + type: "uint128", + }, + ], + name: "setBlockSpecimenReward", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "newSessionDuration", + type: "uint64", + }, + ], + name: "setBlockSpecimenSessionDuration", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "chainId", + type: "uint64", + }, + { + internalType: "uint256", + name: "blockOnTargetChain", + type: "uint256", + }, + { + internalType: "uint256", + name: "blockOnCurrentChain", + type: "uint256", + }, + { + internalType: "uint256", + name: "secondsPerBlock", + type: "uint256", + }, + ], + name: "setChainSyncData", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "chainId", + type: "uint64", + }, + { + internalType: "uint64", + name: "maxSubmissions", + type: "uint64", + }, + ], + name: "setMaxSubmissionsPerBlockHeight", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "minSubmissions", + type: "uint64", + }, + ], + name: "setMinSubmissionsRequired", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "chainId", + type: "uint64", + }, + { + internalType: "uint64", + name: "n", + type: "uint64", + }, + ], + name: "setNthBlock", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "quorum", + type: "uint256", + }, + ], + name: "setQuorumThreshold", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "secondsPerBlock", + type: "uint64", + }, + ], + name: "setSecondsPerBlock", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "stakingContractAddress", + type: "address", + }, + ], + name: "setStakingInterface", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "chainId", + type: "uint64", + }, + { + internalType: "uint64", + name: "blockHeight", + type: "uint64", + }, + { + internalType: "bytes32", + name: "blockHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "specimenHash", + type: "bytes32", + }, + { + internalType: "string", + name: "storageURL", + type: "string", + }, + ], + name: "submitBlockSpecimenProof", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "validatorIDs", + outputs: [ + { + internalType: "uint128", + name: "", + type: "uint128", + }, + ], + stateMutability: "view", + type: "function", + }, +] as const; diff --git a/services/decoder/protocols/covalent-network/abis/old-operational-staking.abi.json b/services/decoder/protocols/covalent-network/abis/old-operational-staking.abi.json deleted file mode 100644 index f8fd012..0000000 --- a/services/decoder/protocols/covalent-network/abis/old-operational-staking.abi.json +++ /dev/null @@ -1,1488 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "AllocatedTokensTaken", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": true, - "internalType": "address", - "name": "beneficiary", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "CommissionRewardRedeemed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "DelegatorMinStakeChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "DelegatorUnstakeCooldownChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "cqt", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "validatorCoolDown", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "delegatorCoolDown", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "maxCapMultiplier", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "validatorMaxStake", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "validatorEnableMinStake", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "delegatorMinStake", - "type": "uint128" - } - ], - "name": "InitializedSemantics", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint128", - "name": "newMaxCapMultiplier", - "type": "uint128" - } - ], - "name": "MaxCapMultiplierChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "unstakingId", - "type": "uint128" - } - ], - "name": "RecoveredUnstake", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "oldValidatorId", - "type": "uint128" - }, - { - "indexed": true, - "internalType": "uint128", - "name": "newValidatorId", - "type": "uint128" - }, - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "unstakingId", - "type": "uint128" - } - ], - "name": "Redelegated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "RewardFailedDueLowPool", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "RewardFailedDueValidatorDisabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "RewardFailedDueValidatorFrozen", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "RewardFailedDueZeroStake", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": true, - "internalType": "address", - "name": "beneficiary", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "RewardRedeemed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "RewardTokensDeposited", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "Staked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operationalManager", - "type": "address" - } - ], - "name": "StakingManagerAddressChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint128", - "name": "unstakeId", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "UnstakeRedeemed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "unstakeId", - "type": "uint128" - } - ], - "name": "Unstaked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "id", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "commissionRate", - "type": "uint128" - }, - { - "indexed": true, - "internalType": "address", - "name": "validator", - "type": "address" - } - ], - "name": "ValidatorAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": true, - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "ValidatorAddressChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "ValidatorCommissionRateChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "name": "ValidatorDisabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "ValidatorEnableMinStakeChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "ValidatorEnabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "string", - "name": "reason", - "type": "string" - } - ], - "name": "ValidatorFrozen", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "ValidatorMaxCapChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "ValidatorUnfrozen", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "ValidatorUnstakeCooldownChanged", - "type": "event" - }, - { - "inputs": [], - "name": "CQT", - "outputs": [ - { - "internalType": "contract IERC20Upgradeable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "CURRENT_MIGRATION_STEPPING", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DEFAULT_DELEGATOR_MIN_STAKE", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DEFAULT_VALIDATOR_ENABLE_MIN_STAKE", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DIVIDER", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REWARD_REDEEM_THRESHOLD", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "validator", - "type": "address" - }, - { - "internalType": "uint128", - "name": "commissionRate", - "type": "uint128" - } - ], - "name": "addValidator", - "outputs": [ - { "internalType": "uint256", "name": "id", "type": "uint256" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "delegatorCoolDown", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "delegatorMinStake", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint128", "name": "amount", "type": "uint128" } - ], - "name": "depositRewardTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "name": "disableValidator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "enableValidator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { "internalType": "string", "name": "reason", "type": "string" } - ], - "name": "freezeValidator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getAllValidatorsMetadata", - "outputs": [ - { - "internalType": "address[]", - "name": "addresses", - "type": "address[]" - }, - { - "internalType": "uint128[]", - "name": "staked", - "type": "uint128[]" - }, - { - "internalType": "uint128[]", - "name": "delegated", - "type": "uint128[]" - }, - { - "internalType": "uint128[]", - "name": "commissionRates", - "type": "uint128[]" - }, - { - "internalType": "uint256[]", - "name": "disabledAtBlocks", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "getDelegatorMetadata", - "outputs": [ - { "internalType": "uint128", "name": "staked", "type": "uint128" }, - { "internalType": "uint128", "name": "rewards", "type": "uint128" }, - { - "internalType": "uint128", - "name": "commissionEarned", - "type": "uint128" - }, - { - "internalType": "uint128[]", - "name": "unstakingAmounts", - "type": "uint128[]" - }, - { - "internalType": "uint128[]", - "name": "unstakingsEndEpochs", - "type": "uint128[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getMetadata", - "outputs": [ - { - "internalType": "address", - "name": "CQTaddress", - "type": "address" - }, - { - "internalType": "address", - "name": "_stakingManager", - "type": "address" - }, - { - "internalType": "uint128", - "name": "_validatorsN", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "_rewardPool", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "_validatorCoolDown", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "_delegatorCoolDown", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "_maxCapMultiplier", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "_validatorMaxStake", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "getValidatorCompoundedStakingData", - "outputs": [ - { "internalType": "uint128", "name": "staked", "type": "uint128" }, - { - "internalType": "uint128", - "name": "delegated", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "getValidatorMetadata", - "outputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - }, - { "internalType": "uint128", "name": "staked", "type": "uint128" }, - { - "internalType": "uint128", - "name": "delegated", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "commissionRate", - "type": "uint128" - }, - { - "internalType": "uint256", - "name": "disabledAtBlock", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "getValidatorStakingData", - "outputs": [ - { "internalType": "uint128", "name": "staked", "type": "uint128" }, - { - "internalType": "uint128", - "name": "delegated", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint128", "name": "startId", "type": "uint128" }, - { "internalType": "uint128", "name": "endId", "type": "uint128" } - ], - "name": "getValidatorsMetadata", - "outputs": [ - { - "internalType": "address[]", - "name": "addresses", - "type": "address[]" - }, - { - "internalType": "uint128[]", - "name": "staked", - "type": "uint128[]" - }, - { - "internalType": "uint128[]", - "name": "delegated", - "type": "uint128[]" - }, - { - "internalType": "uint128[]", - "name": "commissionRates", - "type": "uint128[]" - }, - { - "internalType": "uint256[]", - "name": "disabledAtBlocks", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "cqt", "type": "address" }, - { - "internalType": "uint128", - "name": "dCoolDown", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "vCoolDown", - "type": "uint128" - }, - { "internalType": "uint128", "name": "maxCapM", "type": "uint128" }, - { - "internalType": "uint128", - "name": "vMaxStake", - "type": "uint128" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "isValidatorEnabled", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxCapMultiplier", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "goalStepping", - "type": "uint256" - } - ], - "name": "migrateTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint128", "name": "amount", "type": "uint128" }, - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "unstakingId", - "type": "uint128" - } - ], - "name": "recoverUnstaking", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "internalType": "address", - "name": "beneficiary", - "type": "address" - } - ], - "name": "redeemAllCommission", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "internalType": "address", - "name": "beneficiary", - "type": "address" - } - ], - "name": "redeemAllRewards", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "internalType": "address", - "name": "beneficiary", - "type": "address" - }, - { "internalType": "uint128", "name": "amount", "type": "uint128" } - ], - "name": "redeemCommission", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "internalType": "address", - "name": "beneficiary", - "type": "address" - }, - { "internalType": "uint128", "name": "amount", "type": "uint128" } - ], - "name": "redeemRewards", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint128", "name": "amount", "type": "uint128" }, - { - "internalType": "uint128", - "name": "oldValidatorId", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "newValidatorId", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "unstakingId", - "type": "uint128" - } - ], - "name": "redelegateUnstaked", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rewardPool", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint128[]", "name": "ids", "type": "uint128[]" }, - { - "internalType": "uint128[]", - "name": "amounts", - "type": "uint128[]" - } - ], - "name": "rewardValidators", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint128", "name": "coolDown", "type": "uint128" } - ], - "name": "setDelegatorCoolDown", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint128", "name": "minStake", "type": "uint128" } - ], - "name": "setDelegatorMinStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "newMaxCapMultiplier", - "type": "uint128" - } - ], - "name": "setMaxCapMultiplier", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "setStakingManagerAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "setValidatorAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { "internalType": "uint128", "name": "amount", "type": "uint128" } - ], - "name": "setValidatorCommissionRate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint128", "name": "coolDown", "type": "uint128" } - ], - "name": "setValidatorCoolDown", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint128", "name": "minStake", "type": "uint128" } - ], - "name": "setValidatorEnableMinStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint128", "name": "maxStake", "type": "uint128" } - ], - "name": "setValidatorMaxStake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { "internalType": "uint128", "name": "amount", "type": "uint128" } - ], - "name": "stake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "stakingManager", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint128", "name": "amount", "type": "uint128" } - ], - "name": "takeOutRewardTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "newOwner", "type": "address" } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint128", "name": "amount", "type": "uint128" }, - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "unstakingId", - "type": "uint128" - } - ], - "name": "transferUnstakedOut", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "unfreezeValidator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - }, - { "internalType": "uint128", "name": "amount", "type": "uint128" } - ], - "name": "unstake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "validatorId", - "type": "uint128" - } - ], - "name": "unstakeAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "validatorCoolDown", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "validatorEnableMinStake", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "validatorMaxStake", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "validatorsN", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/services/decoder/protocols/covalent-network/abis/old-operational-staking.abi.ts b/services/decoder/protocols/covalent-network/abis/old-operational-staking.abi.ts new file mode 100644 index 0000000..9083aa9 --- /dev/null +++ b/services/decoder/protocols/covalent-network/abis/old-operational-staking.abi.ts @@ -0,0 +1,1452 @@ +export const oldOperationalStakingABI = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "AllocatedTokensTaken", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: true, + internalType: "address", + name: "beneficiary", + type: "address", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "CommissionRewardRedeemed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "DelegatorMinStakeChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "DelegatorUnstakeCooldownChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "version", + type: "uint8", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "cqt", + type: "address", + }, + { + indexed: false, + internalType: "uint128", + name: "validatorCoolDown", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "delegatorCoolDown", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "maxCapMultiplier", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "validatorMaxStake", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "validatorEnableMinStake", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "delegatorMinStake", + type: "uint128", + }, + ], + name: "InitializedSemantics", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint128", + name: "newMaxCapMultiplier", + type: "uint128", + }, + ], + name: "MaxCapMultiplierChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "Paused", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: true, + internalType: "address", + name: "delegator", + type: "address", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "unstakingId", + type: "uint128", + }, + ], + name: "RecoveredUnstake", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "oldValidatorId", + type: "uint128", + }, + { + indexed: true, + internalType: "uint128", + name: "newValidatorId", + type: "uint128", + }, + { + indexed: true, + internalType: "address", + name: "delegator", + type: "address", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "unstakingId", + type: "uint128", + }, + ], + name: "Redelegated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "RewardFailedDueLowPool", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "RewardFailedDueValidatorDisabled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "RewardFailedDueValidatorFrozen", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "RewardFailedDueZeroStake", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: true, + internalType: "address", + name: "beneficiary", + type: "address", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "RewardRedeemed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "RewardTokensDeposited", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: false, + internalType: "address", + name: "delegator", + type: "address", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "Staked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "operationalManager", + type: "address", + }, + ], + name: "StakingManagerAddressChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "Unpaused", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: true, + internalType: "address", + name: "delegator", + type: "address", + }, + { + indexed: true, + internalType: "uint128", + name: "unstakeId", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "UnstakeRedeemed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: true, + internalType: "address", + name: "delegator", + type: "address", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "unstakeId", + type: "uint128", + }, + ], + name: "Unstaked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "id", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "commissionRate", + type: "uint128", + }, + { + indexed: true, + internalType: "address", + name: "validator", + type: "address", + }, + ], + name: "ValidatorAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: true, + internalType: "address", + name: "newAddress", + type: "address", + }, + ], + name: "ValidatorAddressChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "ValidatorCommissionRateChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: false, + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "ValidatorDisabled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "ValidatorEnableMinStakeChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "ValidatorEnabled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + indexed: false, + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "ValidatorFrozen", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "ValidatorMaxCapChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "ValidatorUnfrozen", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "ValidatorUnstakeCooldownChanged", + type: "event", + }, + { + inputs: [], + name: "CQT", + outputs: [ + { + internalType: "contract IERC20Upgradeable", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "CURRENT_MIGRATION_STEPPING", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "DEFAULT_DELEGATOR_MIN_STAKE", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "DEFAULT_VALIDATOR_ENABLE_MIN_STAKE", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "DIVIDER", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "REWARD_REDEEM_THRESHOLD", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "validator", + type: "address", + }, + { + internalType: "uint128", + name: "commissionRate", + type: "uint128", + }, + ], + name: "addValidator", + outputs: [{ internalType: "uint256", name: "id", type: "uint256" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "delegatorCoolDown", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "delegatorMinStake", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint128", name: "amount", type: "uint128" }], + name: "depositRewardTokens", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "disableValidator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "enableValidator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { internalType: "string", name: "reason", type: "string" }, + ], + name: "freezeValidator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getAllValidatorsMetadata", + outputs: [ + { + internalType: "address[]", + name: "addresses", + type: "address[]", + }, + { + internalType: "uint128[]", + name: "staked", + type: "uint128[]", + }, + { + internalType: "uint128[]", + name: "delegated", + type: "uint128[]", + }, + { + internalType: "uint128[]", + name: "commissionRates", + type: "uint128[]", + }, + { + internalType: "uint256[]", + name: "disabledAtBlocks", + type: "uint256[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "delegator", + type: "address", + }, + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "getDelegatorMetadata", + outputs: [ + { internalType: "uint128", name: "staked", type: "uint128" }, + { internalType: "uint128", name: "rewards", type: "uint128" }, + { + internalType: "uint128", + name: "commissionEarned", + type: "uint128", + }, + { + internalType: "uint128[]", + name: "unstakingAmounts", + type: "uint128[]", + }, + { + internalType: "uint128[]", + name: "unstakingsEndEpochs", + type: "uint128[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getMetadata", + outputs: [ + { + internalType: "address", + name: "CQTaddress", + type: "address", + }, + { + internalType: "address", + name: "_stakingManager", + type: "address", + }, + { + internalType: "uint128", + name: "_validatorsN", + type: "uint128", + }, + { + internalType: "uint128", + name: "_rewardPool", + type: "uint128", + }, + { + internalType: "uint128", + name: "_validatorCoolDown", + type: "uint128", + }, + { + internalType: "uint128", + name: "_delegatorCoolDown", + type: "uint128", + }, + { + internalType: "uint128", + name: "_maxCapMultiplier", + type: "uint128", + }, + { + internalType: "uint128", + name: "_validatorMaxStake", + type: "uint128", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "getValidatorCompoundedStakingData", + outputs: [ + { internalType: "uint128", name: "staked", type: "uint128" }, + { + internalType: "uint128", + name: "delegated", + type: "uint128", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "getValidatorMetadata", + outputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + { internalType: "uint128", name: "staked", type: "uint128" }, + { + internalType: "uint128", + name: "delegated", + type: "uint128", + }, + { + internalType: "uint128", + name: "commissionRate", + type: "uint128", + }, + { + internalType: "uint256", + name: "disabledAtBlock", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "getValidatorStakingData", + outputs: [ + { internalType: "uint128", name: "staked", type: "uint128" }, + { + internalType: "uint128", + name: "delegated", + type: "uint128", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint128", name: "startId", type: "uint128" }, + { internalType: "uint128", name: "endId", type: "uint128" }, + ], + name: "getValidatorsMetadata", + outputs: [ + { + internalType: "address[]", + name: "addresses", + type: "address[]", + }, + { + internalType: "uint128[]", + name: "staked", + type: "uint128[]", + }, + { + internalType: "uint128[]", + name: "delegated", + type: "uint128[]", + }, + { + internalType: "uint128[]", + name: "commissionRates", + type: "uint128[]", + }, + { + internalType: "uint256[]", + name: "disabledAtBlocks", + type: "uint256[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "cqt", type: "address" }, + { + internalType: "uint128", + name: "dCoolDown", + type: "uint128", + }, + { + internalType: "uint128", + name: "vCoolDown", + type: "uint128", + }, + { internalType: "uint128", name: "maxCapM", type: "uint128" }, + { + internalType: "uint128", + name: "vMaxStake", + type: "uint128", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "isValidatorEnabled", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "maxCapMultiplier", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "goalStepping", + type: "uint256", + }, + ], + name: "migrateTo", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "pause", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "paused", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint128", name: "amount", type: "uint128" }, + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + internalType: "uint128", + name: "unstakingId", + type: "uint128", + }, + ], + name: "recoverUnstaking", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + internalType: "address", + name: "beneficiary", + type: "address", + }, + ], + name: "redeemAllCommission", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + internalType: "address", + name: "beneficiary", + type: "address", + }, + ], + name: "redeemAllRewards", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + internalType: "address", + name: "beneficiary", + type: "address", + }, + { internalType: "uint128", name: "amount", type: "uint128" }, + ], + name: "redeemCommission", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + internalType: "address", + name: "beneficiary", + type: "address", + }, + { internalType: "uint128", name: "amount", type: "uint128" }, + ], + name: "redeemRewards", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint128", name: "amount", type: "uint128" }, + { + internalType: "uint128", + name: "oldValidatorId", + type: "uint128", + }, + { + internalType: "uint128", + name: "newValidatorId", + type: "uint128", + }, + { + internalType: "uint128", + name: "unstakingId", + type: "uint128", + }, + ], + name: "redelegateUnstaked", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "rewardPool", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint128[]", name: "ids", type: "uint128[]" }, + { + internalType: "uint128[]", + name: "amounts", + type: "uint128[]", + }, + ], + name: "rewardValidators", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint128", name: "coolDown", type: "uint128" }, + ], + name: "setDelegatorCoolDown", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint128", name: "minStake", type: "uint128" }, + ], + name: "setDelegatorMinStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "newMaxCapMultiplier", + type: "uint128", + }, + ], + name: "setMaxCapMultiplier", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newAddress", + type: "address", + }, + ], + name: "setStakingManagerAddress", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + internalType: "address", + name: "newAddress", + type: "address", + }, + ], + name: "setValidatorAddress", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { internalType: "uint128", name: "amount", type: "uint128" }, + ], + name: "setValidatorCommissionRate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint128", name: "coolDown", type: "uint128" }, + ], + name: "setValidatorCoolDown", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint128", name: "minStake", type: "uint128" }, + ], + name: "setValidatorEnableMinStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint128", name: "maxStake", type: "uint128" }, + ], + name: "setValidatorMaxStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { internalType: "uint128", name: "amount", type: "uint128" }, + ], + name: "stake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "stakingManager", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint128", name: "amount", type: "uint128" }], + name: "takeOutRewardTokens", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "newOwner", type: "address" }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint128", name: "amount", type: "uint128" }, + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { + internalType: "uint128", + name: "unstakingId", + type: "uint128", + }, + ], + name: "transferUnstakedOut", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "unfreezeValidator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "unpause", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + { internalType: "uint128", name: "amount", type: "uint128" }, + ], + name: "unstake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "validatorId", + type: "uint128", + }, + ], + name: "unstakeAll", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "validatorCoolDown", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "validatorEnableMinStake", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "validatorMaxStake", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "validatorsN", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, +] as const; diff --git a/services/decoder/protocols/covalent-network/covalent-network.decoders.ts b/services/decoder/protocols/covalent-network/covalent-network.decoders.ts index 937e540..f3b3b91 100644 --- a/services/decoder/protocols/covalent-network/covalent-network.decoders.ts +++ b/services/decoder/protocols/covalent-network/covalent-network.decoders.ts @@ -1,21 +1,21 @@ +import { prettifyCurrency } from "@covalenthq/client-sdk"; +import { decodeEventLog, type Abi } from "viem"; +import { timestampParser } from "../../../../utils/functions"; import { GoldRushDecoder } from "../../decoder"; -import { type EventTokens, type EventType } from "../../decoder.types"; import { DECODED_ACTION, DECODED_EVENT_CATEGORY, } from "../../decoder.constants"; -import { decodeEventLog, type Abi } from "viem"; -import OldBlockSpecimenProofABI from "./abis/old-block-specimen-proof.abi.json"; -import NewBlockSpecimenProofABI from "./abis/new-block-specimen-proof.abi.json"; -import OldOperationalStakingABI from "./abis/old-operational-staking.abi.json"; -import NewOperationalStakingABI from "./abis/new-operational-staking.abi.json"; -import { timestampParser } from "../../../../utils/functions"; -import { prettifyCurrency } from "@covalenthq/client-sdk"; +import { type EventTokens, type EventType } from "../../decoder.types"; +import { newBlockSpecimenProofABI } from "./abis/new-block-specimen-proof.abi"; +import { newOperationalStakingABI } from "./abis/new-operational-staking.abi"; +import { oldBlockSpecimenProofABI } from "./abis/old-block-specimen-proof.abi"; +import { oldOperationalStakingABI } from "./abis/old-operational-staking.abi"; GoldRushDecoder.on( "covalent-network:BlockSpecimenProductionProofSubmitted", ["moonbeam-mainnet"], - OldBlockSpecimenProofABI as Abi, + oldBlockSpecimenProofABI as Abi, async ( log_event, tx, @@ -26,21 +26,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: OldBlockSpecimenProofABI, + abi: oldBlockSpecimenProofABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "BlockSpecimenProductionProofSubmitted", - }) as { - eventName: "BlockSpecimenProductionProofSubmitted"; - args: { - chainId: bigint; - blockHeight: bigint; - blockHash: string; - specimenHash: string; - storageURL: string; - submittedStake: bigint; - }; - }; + }); return { action: DECODED_ACTION.APPROVAL, @@ -77,7 +67,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "covalent-network:Unstaked", ["moonbeam-mainnet"], - OldOperationalStakingABI as Abi, + oldOperationalStakingABI as Abi, async ( log_event, tx, @@ -88,19 +78,11 @@ GoldRushDecoder.on( const { block_signed_at, raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: OldOperationalStakingABI, + abi: oldOperationalStakingABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "Unstaked", - }) as { - eventName: "Unstaked"; - args: { - validatorId: bigint; - delegator: string; - amount: bigint; - unstakeId: bigint; - }; - }; + }); const date = timestampParser(block_signed_at, "YYYY-MM-DD"); const { data } = await covalent_client.PricingService.getTokenPrices( @@ -165,7 +147,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "covalent-network:RewardRedeemed", ["moonbeam-mainnet"], - OldOperationalStakingABI as Abi, + oldOperationalStakingABI as Abi, async ( log_event, tx, @@ -176,18 +158,11 @@ GoldRushDecoder.on( const { block_signed_at, raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: OldOperationalStakingABI, + abi: oldOperationalStakingABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "RewardRedeemed", - }) as { - eventName: "RewardRedeemed"; - args: { - validatorId: bigint; - beneficiary: string; - amount: bigint; - }; - }; + }); const date = timestampParser(block_signed_at, "YYYY-MM-DD"); const { data } = await covalent_client.PricingService.getTokenPrices( @@ -247,7 +222,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "covalent-network:CommissionRewardRedeemed", ["moonbeam-mainnet"], - OldOperationalStakingABI as Abi, + oldOperationalStakingABI as Abi, async ( log_event, tx, @@ -258,18 +233,11 @@ GoldRushDecoder.on( const { block_signed_at, raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: OldOperationalStakingABI, + abi: oldOperationalStakingABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "CommissionRewardRedeemed", - }) as { - eventName: "CommissionRewardRedeemed"; - args: { - validatorId: bigint; - beneficiary: string; - amount: bigint; - }; - }; + }); const date = timestampParser(block_signed_at, "YYYY-MM-DD"); const { data } = await covalent_client.PricingService.getTokenPrices( @@ -329,7 +297,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "covalent-network:BlockSpecimenProductionProofSubmitted", ["moonbeam-mainnet"], - NewBlockSpecimenProofABI as Abi, + newBlockSpecimenProofABI as Abi, async ( log_event, tx, @@ -340,20 +308,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: NewBlockSpecimenProofABI, + abi: newBlockSpecimenProofABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "BlockSpecimenProductionProofSubmitted", - }) as { - eventName: "BlockSpecimenProductionProofSubmitted"; - args: { - chainId: bigint; - blockHeight: bigint; - blockHash: string; - specimenHash: string; - storageURL: string; - }; - }; + }); return { action: DECODED_ACTION.APPROVAL, @@ -383,7 +342,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "covalent-network:Staked", ["eth-mainnet"], - NewOperationalStakingABI as Abi, + newOperationalStakingABI as Abi, async ( log_event, tx, @@ -394,18 +353,11 @@ GoldRushDecoder.on( const { block_signed_at, raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: NewOperationalStakingABI, + abi: newOperationalStakingABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "Staked", - }) as { - eventName: "Staked"; - args: { - validatorId: bigint; - delegator: string; - amount: bigint; - }; - }; + }); const date = timestampParser(block_signed_at, "YYYY-MM-DD"); const { data } = await covalent_client.PricingService.getTokenPrices( diff --git a/services/decoder/protocols/defi-kingdoms/abis/defi-kingdoms.hero-auction.abi.json b/services/decoder/protocols/defi-kingdoms/abis/defi-kingdoms.hero-auction.abi.json deleted file mode 100644 index 9b199e4..0000000 --- a/services/decoder/protocols/defi-kingdoms/abis/defi-kingdoms.hero-auction.abi.json +++ /dev/null @@ -1,1082 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "auctionId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "AuctionCancelled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "auctionId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "startingPrice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "endingPrice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "duration", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "winner", - "type": "address" - } - ], - "name": "AuctionCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "auctionId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalPrice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "winner", - "type": "address" - } - ], - "name": "AuctionSuccessful", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "feeAddress", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "feePercent", - "type": "uint256" - } - ], - "name": "FeeAddressAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "source", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "timestamp", - "type": "uint64" - } - ], - "name": "FeeDisbursed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "BIDDER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ERC721", - "outputs": [ - { - "internalType": "contract IERC721Upgradeable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MODERATOR_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "assistingAuction", - "outputs": [ - { - "internalType": "contract IAssistingAuctionUpgradeable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "auctionIdOffset", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "auctions", - "outputs": [ - { - "internalType": "address", - "name": "seller", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "startingPrice", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "endingPrice", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "duration", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "startedAt", - "type": "uint64" - }, - { - "internalType": "address", - "name": "winner", - "type": "address" - }, - { - "internalType": "bool", - "name": "open", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_bidAmount", - "type": "uint256" - } - ], - "name": "bid", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_bidder", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_bidAmount", - "type": "uint256" - } - ], - "name": "bidFor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "cancelAuction", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "cancelAuctionWhenPaused", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_tokenId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "_startingPrice", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "_endingPrice", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "_duration", - "type": "uint64" - }, - { - "internalType": "address", - "name": "_winner", - "type": "address" - } - ], - "name": "createAuction", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "feeAddresses", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "feePercents", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "getAuction", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "seller", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "startingPrice", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "endingPrice", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "duration", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "startedAt", - "type": "uint64" - }, - { - "internalType": "address", - "name": "winner", - "type": "address" - }, - { - "internalType": "bool", - "name": "open", - "type": "bool" - } - ], - "internalType": "struct Auction", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "_tokenIds", - "type": "uint256[]" - } - ], - "name": "getAuctions", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "seller", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "startingPrice", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "endingPrice", - "type": "uint128" - }, - { - "internalType": "uint64", - "name": "duration", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "startedAt", - "type": "uint64" - }, - { - "internalType": "address", - "name": "winner", - "type": "address" - }, - { - "internalType": "bool", - "name": "open", - "type": "bool" - } - ], - "internalType": "struct Auction[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "getCurrentPrice", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "getUserAuctions", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_heroCoreAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "_crystalAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_cut", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_assistingAuctionAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_auctionIdOffset", - "type": "uint256" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "isOnAuction", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onERC721Received", - "outputs": [ - { - "internalType": "bytes4", - "name": "", - "type": "bytes4" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "ownerCut", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "powerToken", - "outputs": [ - { - "internalType": "contract IPowerToken", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "powerUpManager", - "outputs": [ - { - "internalType": "contract IPowerUpManagerUpgradeable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_auctionIdOffset", - "type": "uint256" - } - ], - "name": "setAuctionIDOffset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newERC721Address", - "type": "address" - } - ], - "name": "setERC721", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_feeAddresses", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "_feePercents", - "type": "uint256[]" - } - ], - "name": "setFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_powerTokenAddress", - "type": "address" - } - ], - "name": "setPowerToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_powerUpManager", - "type": "address" - } - ], - "name": "setPowerUpManager", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalAuctions", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "userAuctions", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/services/decoder/protocols/defi-kingdoms/abis/defi-kingdoms.pets.abi.json b/services/decoder/protocols/defi-kingdoms/abis/defi-kingdoms.pets.abi.json deleted file mode 100644 index 8dbba9f..0000000 --- a/services/decoder/protocols/defi-kingdoms/abis/defi-kingdoms.pets.abi.json +++ /dev/null @@ -1,3043 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "facetAddress", - "type": "address" - }, - { - "internalType": "enum IDiamondCut.FacetCutAction", - "name": "action", - "type": "uint8" - }, - { - "internalType": "bytes4[]", - "name": "functionSelectors", - "type": "bytes4[]" - } - ], - "indexed": false, - "internalType": "struct IDiamondCut.FacetCut[]", - "name": "_diamondCut", - "type": "tuple[]" - }, - { - "indexed": false, - "internalType": "address", - "name": "_init", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_calldata", - "type": "bytes" - } - ], - "name": "DiamondCut", - "type": "event" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "facetAddress", - "type": "address" - }, - { - "internalType": "enum IDiamondCut.FacetCutAction", - "name": "action", - "type": "uint8" - }, - { - "internalType": "bytes4[]", - "name": "functionSelectors", - "type": "bytes4[]" - } - ], - "internalType": "struct IDiamondCut.FacetCut[]", - "name": "_diamondCut", - "type": "tuple[]" - }, - { - "internalType": "address", - "name": "_init", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_calldata", - "type": "bytes" - } - ], - "name": "diamondCut", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "_functionSelector", - "type": "bytes4" - } - ], - "name": "facetAddress", - "outputs": [ - { - "internalType": "address", - "name": "facetAddress_", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "facetAddresses", - "outputs": [ - { - "internalType": "address[]", - "name": "facetAddresses_", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_facet", - "type": "address" - } - ], - "name": "facetFunctionSelectors", - "outputs": [ - { - "internalType": "bytes4[]", - "name": "facetFunctionSelectors_", - "type": "bytes4[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "facets", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "facetAddress", - "type": "address" - }, - { - "internalType": "bytes4[]", - "name": "functionSelectors", - "type": "bytes4[]" - } - ], - "internalType": "struct IDiamondLoupe.Facet[]", - "name": "facets_", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "_interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "owner_", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "approved", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "petId", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "originId", - "type": "uint8" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "uint8", - "name": "season", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "eggType", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "rarity", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "element", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "bonusCount", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "profBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "profBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "craftBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "craftBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "combatBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "combatBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint16", - "name": "appearance", - "type": "uint16" - }, - { - "internalType": "uint8", - "name": "background", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "shiny", - "type": "uint8" - }, - { - "internalType": "uint64", - "name": "hungryAt", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "equippableAt", - "type": "uint64" - }, - { - "internalType": "uint256", - "name": "equippedTo", - "type": "uint256" - } - ], - "indexed": false, - "internalType": "struct Pet", - "name": "pet", - "type": "tuple" - } - ], - "name": "PetHatched", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "petId", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "originId", - "type": "uint8" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "uint8", - "name": "season", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "eggType", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "rarity", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "element", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "bonusCount", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "profBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "profBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "craftBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "craftBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "combatBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "combatBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint16", - "name": "appearance", - "type": "uint16" - }, - { - "internalType": "uint8", - "name": "background", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "shiny", - "type": "uint8" - }, - { - "internalType": "uint64", - "name": "hungryAt", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "equippableAt", - "type": "uint64" - }, - { - "internalType": "uint256", - "name": "equippedTo", - "type": "uint256" - }, - { - "internalType": "address", - "name": "fedBy", - "type": "address" - }, - { - "internalType": "enum PetFoodType", - "name": "foodType", - "type": "uint8" - } - ], - "indexed": false, - "internalType": "struct PetV2", - "name": "pet", - "type": "tuple" - } - ], - "name": "PetHatchedV2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "petId", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "originId", - "type": "uint8" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "uint8", - "name": "season", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "eggType", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "rarity", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "element", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "bonusCount", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "profBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "profBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "craftBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "craftBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "combatBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "combatBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint16", - "name": "appearance", - "type": "uint16" - }, - { - "internalType": "uint8", - "name": "background", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "shiny", - "type": "uint8" - }, - { - "internalType": "uint64", - "name": "hungryAt", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "equippableAt", - "type": "uint64" - }, - { - "internalType": "uint256", - "name": "equippedTo", - "type": "uint256" - } - ], - "indexed": false, - "internalType": "struct Pet", - "name": "pet", - "type": "tuple" - } - ], - "name": "PetUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "petId", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "originId", - "type": "uint8" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "uint8", - "name": "season", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "eggType", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "rarity", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "element", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "bonusCount", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "profBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "profBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "craftBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "craftBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "combatBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "combatBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint16", - "name": "appearance", - "type": "uint16" - }, - { - "internalType": "uint8", - "name": "background", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "shiny", - "type": "uint8" - }, - { - "internalType": "uint64", - "name": "hungryAt", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "equippableAt", - "type": "uint64" - }, - { - "internalType": "uint256", - "name": "equippedTo", - "type": "uint256" - }, - { - "internalType": "address", - "name": "fedBy", - "type": "address" - }, - { - "internalType": "enum PetFoodType", - "name": "foodType", - "type": "uint8" - } - ], - "indexed": false, - "internalType": "struct PetV2", - "name": "pet", - "type": "tuple" - } - ], - "name": "PetUpdatedV2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "BRIDGE_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MINTER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MODERATOR_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PET_MODERATOR_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "baseHungryTime", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "bonusCount", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_id", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_to", - "type": "address" - } - ], - "name": "bridgeMint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getApproved", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "gold", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "heroCore", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "heroToPet", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "nextPetId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "ownerOf", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "powerUpManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "_baseHungryTime", - "type": "uint64" - } - ], - "name": "setBaseHungryTime", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_gold", - "type": "address" - } - ], - "name": "setGold", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_heroCore", - "type": "address" - } - ], - "name": "setHeroCore", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "enum TreatType", - "name": "_treatType", - "type": "uint8" - }, - { - "internalType": "address[]", - "name": "_ingredients", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "_ingredientAmounts", - "type": "uint256[]" - } - ], - "name": "setIngredients", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_nextPetId", - "type": "uint256" - } - ], - "name": "setNextPetId", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_powerUpManager", - "type": "address" - } - ], - "name": "setPowerUpManager", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "enum TreatType", - "name": "_treatType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "internalType": "bool", - "name": "_active", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_goldCost", - "type": "uint256" - } - ], - "name": "setTreatType", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "tokenByIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "tokenOfOwnerByIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "tokenURI", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "enum TreatType", - "name": "", - "type": "uint8" - } - ], - "name": "treatInfo", - "outputs": [ - { - "internalType": "address", - "name": "treatAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "goldCost", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "isActive", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "enum TreatType", - "name": "", - "type": "uint8" - }, - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "treatIngredientRequirements", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "ReentrancyGuard__ReentrantCall", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "player", - "type": "address" - }, - { - "indexed": false, - "internalType": "enum TreatType", - "name": "treatType", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - } - ], - "name": "BonusTreatsAwarded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "fedBy", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "petId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "enum PetFoodType", - "name": "foodType", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "hungryAt", - "type": "uint256" - } - ], - "name": "PetFed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "player", - "type": "address" - }, - { - "indexed": false, - "internalType": "enum TreatType", - "name": "treatType", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "quantity", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "item1", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "item2", - "type": "address" - } - ], - "name": "TreatCrafted", - "type": "event" - }, - { - "inputs": [], - "name": "PREMIUM_PROVISIONS", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "enum TreatType", - "name": "treatType", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "treatQuantity", - "type": "uint256" - }, - { - "internalType": "address", - "name": "item1", - "type": "address" - }, - { - "internalType": "address", - "name": "item2", - "type": "address" - } - ], - "internalType": "struct TreatCraftingInput[]", - "name": "_treatData", - "type": "tuple[]" - } - ], - "name": "craftTreats", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "petId", - "type": "uint256" - }, - { - "internalType": "enum TreatType", - "name": "treatType", - "type": "uint8" - } - ], - "internalType": "struct PetFeedingInput[]", - "name": "_feedData", - "type": "tuple[]" - } - ], - "name": "feedPets", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "petId", - "type": "uint256" - }, - { - "internalType": "enum TreatType", - "name": "treatType", - "type": "uint8" - } - ], - "internalType": "struct PetFeedingInput[]", - "name": "_feedData", - "type": "tuple[]" - }, - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "feedPetsOnBehalf", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "_heroIds", - "type": "uint256[]" - } - ], - "name": "getDuelPetData", - "outputs": [ - { - "internalType": "uint256[]", - "name": "", - "type": "uint256[]" - }, - { - "internalType": "uint8[]", - "name": "", - "type": "uint8[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_heroId", - "type": "uint256" - } - ], - "name": "isHeroPetHungry", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_petId", - "type": "uint256" - } - ], - "name": "isPetHungry", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_id", - "type": "uint256" - } - ], - "name": "getPet", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "originId", - "type": "uint8" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "uint8", - "name": "season", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "eggType", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "rarity", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "element", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "bonusCount", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "profBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "profBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "craftBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "craftBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "combatBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "combatBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint16", - "name": "appearance", - "type": "uint16" - }, - { - "internalType": "uint8", - "name": "background", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "shiny", - "type": "uint8" - }, - { - "internalType": "uint64", - "name": "hungryAt", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "equippableAt", - "type": "uint64" - }, - { - "internalType": "uint256", - "name": "equippedTo", - "type": "uint256" - } - ], - "internalType": "struct Pet", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_id", - "type": "uint256" - } - ], - "name": "getPetFedState", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_id", - "type": "uint256" - } - ], - "name": "getPetQuestData", - "outputs": [ - { - "components": [ - { - "internalType": "uint64", - "name": "hungryAt", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "rarity", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "profBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "profBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "eggType", - "type": "uint8" - }, - { - "internalType": "enum PetFoodType", - "name": "foodType", - "type": "uint8" - } - ], - "internalType": "struct PetQuestData", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_id", - "type": "uint256" - } - ], - "name": "getPetV2", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "originId", - "type": "uint8" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "uint8", - "name": "season", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "eggType", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "rarity", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "element", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "bonusCount", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "profBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "profBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "craftBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "craftBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "combatBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "combatBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint16", - "name": "appearance", - "type": "uint16" - }, - { - "internalType": "uint8", - "name": "background", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "shiny", - "type": "uint8" - }, - { - "internalType": "uint64", - "name": "hungryAt", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "equippableAt", - "type": "uint64" - }, - { - "internalType": "uint256", - "name": "equippedTo", - "type": "uint256" - }, - { - "internalType": "address", - "name": "fedBy", - "type": "address" - }, - { - "internalType": "enum PetFoodType", - "name": "foodType", - "type": "uint8" - } - ], - "internalType": "struct PetV2", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "_ids", - "type": "uint256[]" - } - ], - "name": "getPetsV2", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "originId", - "type": "uint8" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "uint8", - "name": "season", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "eggType", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "rarity", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "element", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "bonusCount", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "profBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "profBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "craftBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "craftBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "combatBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "combatBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint16", - "name": "appearance", - "type": "uint16" - }, - { - "internalType": "uint8", - "name": "background", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "shiny", - "type": "uint8" - }, - { - "internalType": "uint64", - "name": "hungryAt", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "equippableAt", - "type": "uint64" - }, - { - "internalType": "uint256", - "name": "equippedTo", - "type": "uint256" - }, - { - "internalType": "address", - "name": "fedBy", - "type": "address" - }, - { - "internalType": "enum PetFoodType", - "name": "foodType", - "type": "uint8" - } - ], - "internalType": "struct PetV2[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "getUserPets", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "originId", - "type": "uint8" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "uint8", - "name": "season", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "eggType", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "rarity", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "element", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "bonusCount", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "profBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "profBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "craftBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "craftBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "combatBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "combatBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint16", - "name": "appearance", - "type": "uint16" - }, - { - "internalType": "uint8", - "name": "background", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "shiny", - "type": "uint8" - }, - { - "internalType": "uint64", - "name": "hungryAt", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "equippableAt", - "type": "uint64" - }, - { - "internalType": "uint256", - "name": "equippedTo", - "type": "uint256" - } - ], - "internalType": "struct Pet[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "getUserPetsV2", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "originId", - "type": "uint8" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "uint8", - "name": "season", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "eggType", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "rarity", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "element", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "bonusCount", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "profBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "profBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "craftBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "craftBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "combatBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "combatBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint16", - "name": "appearance", - "type": "uint16" - }, - { - "internalType": "uint8", - "name": "background", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "shiny", - "type": "uint8" - }, - { - "internalType": "uint64", - "name": "hungryAt", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "equippableAt", - "type": "uint64" - }, - { - "internalType": "uint256", - "name": "equippedTo", - "type": "uint256" - }, - { - "internalType": "address", - "name": "fedBy", - "type": "address" - }, - { - "internalType": "enum PetFoodType", - "name": "foodType", - "type": "uint8" - } - ], - "internalType": "struct PetV2[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint8", - "name": "originId", - "type": "uint8" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "uint8", - "name": "season", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "eggType", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "rarity", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "element", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "bonusCount", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "profBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "profBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "craftBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "craftBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "combatBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "combatBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint16", - "name": "appearance", - "type": "uint16" - }, - { - "internalType": "uint8", - "name": "background", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "shiny", - "type": "uint8" - } - ], - "internalType": "struct PetOptions", - "name": "_petOptions", - "type": "tuple" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "hatchPet", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_from", - "type": "address" - }, - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_petId", - "type": "uint256" - } - ], - "name": "transferPetOnBehalf", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "originId", - "type": "uint8" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "uint8", - "name": "season", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "eggType", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "rarity", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "element", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "bonusCount", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "profBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "profBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "craftBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "craftBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "combatBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "combatBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint16", - "name": "appearance", - "type": "uint16" - }, - { - "internalType": "uint8", - "name": "background", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "shiny", - "type": "uint8" - }, - { - "internalType": "uint64", - "name": "hungryAt", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "equippableAt", - "type": "uint64" - }, - { - "internalType": "uint256", - "name": "equippedTo", - "type": "uint256" - } - ], - "internalType": "struct Pet", - "name": "_pet", - "type": "tuple" - } - ], - "name": "updatePet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "originId", - "type": "uint8" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "uint8", - "name": "season", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "eggType", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "rarity", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "element", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "bonusCount", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "profBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "profBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "craftBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "craftBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "combatBonus", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "combatBonusScalar", - "type": "uint8" - }, - { - "internalType": "uint16", - "name": "appearance", - "type": "uint16" - }, - { - "internalType": "uint8", - "name": "background", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "shiny", - "type": "uint8" - }, - { - "internalType": "uint64", - "name": "hungryAt", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "equippableAt", - "type": "uint64" - }, - { - "internalType": "uint256", - "name": "equippedTo", - "type": "uint256" - }, - { - "internalType": "address", - "name": "fedBy", - "type": "address" - }, - { - "internalType": "enum PetFoodType", - "name": "foodType", - "type": "uint8" - } - ], - "internalType": "struct PetV2", - "name": "_pet", - "type": "tuple" - } - ], - "name": "updatePetV2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/services/decoder/protocols/defi-kingdoms/abis/hero-auction.abi.ts b/services/decoder/protocols/defi-kingdoms/abis/hero-auction.abi.ts new file mode 100644 index 0000000..76cbd9b --- /dev/null +++ b/services/decoder/protocols/defi-kingdoms/abis/hero-auction.abi.ts @@ -0,0 +1,1082 @@ +export const heroAuctionABI = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "auctionId", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "AuctionCancelled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "auctionId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "startingPrice", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "endingPrice", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "duration", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "winner", + type: "address", + }, + ], + name: "AuctionCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "auctionId", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "totalPrice", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "winner", + type: "address", + }, + ], + name: "AuctionSuccessful", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "feeAddress", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "feePercent", + type: "uint256", + }, + ], + name: "FeeAddressAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "source", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint64", + name: "timestamp", + type: "uint64", + }, + ], + name: "FeeDisbursed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "version", + type: "uint8", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "Paused", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "previousAdminRole", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "newAdminRole", + type: "bytes32", + }, + ], + name: "RoleAdminChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleGranted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleRevoked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "Unpaused", + type: "event", + }, + { + inputs: [], + name: "BIDDER_ROLE", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "DEFAULT_ADMIN_ROLE", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "ERC721", + outputs: [ + { + internalType: "contract IERC721Upgradeable", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MODERATOR_ROLE", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "assistingAuction", + outputs: [ + { + internalType: "contract IAssistingAuctionUpgradeable", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "auctionIdOffset", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "auctions", + outputs: [ + { + internalType: "address", + name: "seller", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "uint128", + name: "startingPrice", + type: "uint128", + }, + { + internalType: "uint128", + name: "endingPrice", + type: "uint128", + }, + { + internalType: "uint64", + name: "duration", + type: "uint64", + }, + { + internalType: "uint64", + name: "startedAt", + type: "uint64", + }, + { + internalType: "address", + name: "winner", + type: "address", + }, + { + internalType: "bool", + name: "open", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_tokenId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_bidAmount", + type: "uint256", + }, + ], + name: "bid", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_bidder", + type: "address", + }, + { + internalType: "uint256", + name: "_tokenId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_bidAmount", + type: "uint256", + }, + ], + name: "bidFor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_tokenId", + type: "uint256", + }, + ], + name: "cancelAuction", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_tokenId", + type: "uint256", + }, + ], + name: "cancelAuctionWhenPaused", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_tokenId", + type: "uint256", + }, + { + internalType: "uint128", + name: "_startingPrice", + type: "uint128", + }, + { + internalType: "uint128", + name: "_endingPrice", + type: "uint128", + }, + { + internalType: "uint64", + name: "_duration", + type: "uint64", + }, + { + internalType: "address", + name: "_winner", + type: "address", + }, + ], + name: "createAuction", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "feeAddresses", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "feePercents", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_tokenId", + type: "uint256", + }, + ], + name: "getAuction", + outputs: [ + { + components: [ + { + internalType: "address", + name: "seller", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "uint128", + name: "startingPrice", + type: "uint128", + }, + { + internalType: "uint128", + name: "endingPrice", + type: "uint128", + }, + { + internalType: "uint64", + name: "duration", + type: "uint64", + }, + { + internalType: "uint64", + name: "startedAt", + type: "uint64", + }, + { + internalType: "address", + name: "winner", + type: "address", + }, + { + internalType: "bool", + name: "open", + type: "bool", + }, + ], + internalType: "struct Auction", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_tokenIds", + type: "uint256[]", + }, + ], + name: "getAuctions", + outputs: [ + { + components: [ + { + internalType: "address", + name: "seller", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "uint128", + name: "startingPrice", + type: "uint128", + }, + { + internalType: "uint128", + name: "endingPrice", + type: "uint128", + }, + { + internalType: "uint64", + name: "duration", + type: "uint64", + }, + { + internalType: "uint64", + name: "startedAt", + type: "uint64", + }, + { + internalType: "address", + name: "winner", + type: "address", + }, + { + internalType: "bool", + name: "open", + type: "bool", + }, + ], + internalType: "struct Auction[]", + name: "", + type: "tuple[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_tokenId", + type: "uint256", + }, + ], + name: "getCurrentPrice", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + ], + name: "getRoleAdmin", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "getUserAuctions", + outputs: [ + { + internalType: "uint256[]", + name: "", + type: "uint256[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "grantRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "hasRole", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_heroCoreAddress", + type: "address", + }, + { + internalType: "address", + name: "_crystalAddress", + type: "address", + }, + { + internalType: "uint256", + name: "_cut", + type: "uint256", + }, + { + internalType: "address", + name: "_assistingAuctionAddress", + type: "address", + }, + { + internalType: "uint256", + name: "_auctionIdOffset", + type: "uint256", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_tokenId", + type: "uint256", + }, + ], + name: "isOnAuction", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + name: "onERC721Received", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "ownerCut", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "pause", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "paused", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "powerToken", + outputs: [ + { + internalType: "contract IPowerToken", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "powerUpManager", + outputs: [ + { + internalType: "contract IPowerUpManagerUpgradeable", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "renounceRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "revokeRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_auctionIdOffset", + type: "uint256", + }, + ], + name: "setAuctionIDOffset", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_newERC721Address", + type: "address", + }, + ], + name: "setERC721", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "_feeAddresses", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "_feePercents", + type: "uint256[]", + }, + ], + name: "setFees", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_powerTokenAddress", + type: "address", + }, + ], + name: "setPowerToken", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_powerUpManager", + type: "address", + }, + ], + name: "setPowerUpManager", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalAuctions", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "unpause", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "userAuctions", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +] as const; diff --git a/services/decoder/protocols/defi-kingdoms/abis/pets.abi.ts b/services/decoder/protocols/defi-kingdoms/abis/pets.abi.ts new file mode 100644 index 0000000..018e72d --- /dev/null +++ b/services/decoder/protocols/defi-kingdoms/abis/pets.abi.ts @@ -0,0 +1,3043 @@ +export const petsABI = [ + { + anonymous: false, + inputs: [ + { + components: [ + { + internalType: "address", + name: "facetAddress", + type: "address", + }, + { + internalType: "enum IDiamondCut.FacetCutAction", + name: "action", + type: "uint8", + }, + { + internalType: "bytes4[]", + name: "functionSelectors", + type: "bytes4[]", + }, + ], + indexed: false, + internalType: "struct IDiamondCut.FacetCut[]", + name: "_diamondCut", + type: "tuple[]", + }, + { + indexed: false, + internalType: "address", + name: "_init", + type: "address", + }, + { + indexed: false, + internalType: "bytes", + name: "_calldata", + type: "bytes", + }, + ], + name: "DiamondCut", + type: "event", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "facetAddress", + type: "address", + }, + { + internalType: "enum IDiamondCut.FacetCutAction", + name: "action", + type: "uint8", + }, + { + internalType: "bytes4[]", + name: "functionSelectors", + type: "bytes4[]", + }, + ], + internalType: "struct IDiamondCut.FacetCut[]", + name: "_diamondCut", + type: "tuple[]", + }, + { + internalType: "address", + name: "_init", + type: "address", + }, + { + internalType: "bytes", + name: "_calldata", + type: "bytes", + }, + ], + name: "diamondCut", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "_functionSelector", + type: "bytes4", + }, + ], + name: "facetAddress", + outputs: [ + { + internalType: "address", + name: "facetAddress_", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "facetAddresses", + outputs: [ + { + internalType: "address[]", + name: "facetAddresses_", + type: "address[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_facet", + type: "address", + }, + ], + name: "facetFunctionSelectors", + outputs: [ + { + internalType: "bytes4[]", + name: "facetFunctionSelectors_", + type: "bytes4[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "facets", + outputs: [ + { + components: [ + { + internalType: "address", + name: "facetAddress", + type: "address", + }, + { + internalType: "bytes4[]", + name: "functionSelectors", + type: "bytes4[]", + }, + ], + internalType: "struct IDiamondLoupe.Facet[]", + name: "facets_", + type: "tuple[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "_interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "owner_", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "approved", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "operator", + type: "address", + }, + { + indexed: false, + internalType: "bool", + name: "approved", + type: "bool", + }, + ], + name: "ApprovalForAll", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "version", + type: "uint8", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "Paused", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "petId", + type: "uint256", + }, + { + components: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "uint8", + name: "originId", + type: "uint8", + }, + { + internalType: "string", + name: "name", + type: "string", + }, + { + internalType: "uint8", + name: "season", + type: "uint8", + }, + { + internalType: "uint8", + name: "eggType", + type: "uint8", + }, + { + internalType: "uint8", + name: "rarity", + type: "uint8", + }, + { + internalType: "uint8", + name: "element", + type: "uint8", + }, + { + internalType: "uint8", + name: "bonusCount", + type: "uint8", + }, + { + internalType: "uint8", + name: "profBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "profBonusScalar", + type: "uint8", + }, + { + internalType: "uint8", + name: "craftBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "craftBonusScalar", + type: "uint8", + }, + { + internalType: "uint8", + name: "combatBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "combatBonusScalar", + type: "uint8", + }, + { + internalType: "uint16", + name: "appearance", + type: "uint16", + }, + { + internalType: "uint8", + name: "background", + type: "uint8", + }, + { + internalType: "uint8", + name: "shiny", + type: "uint8", + }, + { + internalType: "uint64", + name: "hungryAt", + type: "uint64", + }, + { + internalType: "uint64", + name: "equippableAt", + type: "uint64", + }, + { + internalType: "uint256", + name: "equippedTo", + type: "uint256", + }, + ], + indexed: false, + internalType: "struct Pet", + name: "pet", + type: "tuple", + }, + ], + name: "PetHatched", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "petId", + type: "uint256", + }, + { + components: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "uint8", + name: "originId", + type: "uint8", + }, + { + internalType: "string", + name: "name", + type: "string", + }, + { + internalType: "uint8", + name: "season", + type: "uint8", + }, + { + internalType: "uint8", + name: "eggType", + type: "uint8", + }, + { + internalType: "uint8", + name: "rarity", + type: "uint8", + }, + { + internalType: "uint8", + name: "element", + type: "uint8", + }, + { + internalType: "uint8", + name: "bonusCount", + type: "uint8", + }, + { + internalType: "uint8", + name: "profBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "profBonusScalar", + type: "uint8", + }, + { + internalType: "uint8", + name: "craftBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "craftBonusScalar", + type: "uint8", + }, + { + internalType: "uint8", + name: "combatBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "combatBonusScalar", + type: "uint8", + }, + { + internalType: "uint16", + name: "appearance", + type: "uint16", + }, + { + internalType: "uint8", + name: "background", + type: "uint8", + }, + { + internalType: "uint8", + name: "shiny", + type: "uint8", + }, + { + internalType: "uint64", + name: "hungryAt", + type: "uint64", + }, + { + internalType: "uint64", + name: "equippableAt", + type: "uint64", + }, + { + internalType: "uint256", + name: "equippedTo", + type: "uint256", + }, + { + internalType: "address", + name: "fedBy", + type: "address", + }, + { + internalType: "enum PetFoodType", + name: "foodType", + type: "uint8", + }, + ], + indexed: false, + internalType: "struct PetV2", + name: "pet", + type: "tuple", + }, + ], + name: "PetHatchedV2", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "petId", + type: "uint256", + }, + { + components: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "uint8", + name: "originId", + type: "uint8", + }, + { + internalType: "string", + name: "name", + type: "string", + }, + { + internalType: "uint8", + name: "season", + type: "uint8", + }, + { + internalType: "uint8", + name: "eggType", + type: "uint8", + }, + { + internalType: "uint8", + name: "rarity", + type: "uint8", + }, + { + internalType: "uint8", + name: "element", + type: "uint8", + }, + { + internalType: "uint8", + name: "bonusCount", + type: "uint8", + }, + { + internalType: "uint8", + name: "profBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "profBonusScalar", + type: "uint8", + }, + { + internalType: "uint8", + name: "craftBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "craftBonusScalar", + type: "uint8", + }, + { + internalType: "uint8", + name: "combatBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "combatBonusScalar", + type: "uint8", + }, + { + internalType: "uint16", + name: "appearance", + type: "uint16", + }, + { + internalType: "uint8", + name: "background", + type: "uint8", + }, + { + internalType: "uint8", + name: "shiny", + type: "uint8", + }, + { + internalType: "uint64", + name: "hungryAt", + type: "uint64", + }, + { + internalType: "uint64", + name: "equippableAt", + type: "uint64", + }, + { + internalType: "uint256", + name: "equippedTo", + type: "uint256", + }, + ], + indexed: false, + internalType: "struct Pet", + name: "pet", + type: "tuple", + }, + ], + name: "PetUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "petId", + type: "uint256", + }, + { + components: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "uint8", + name: "originId", + type: "uint8", + }, + { + internalType: "string", + name: "name", + type: "string", + }, + { + internalType: "uint8", + name: "season", + type: "uint8", + }, + { + internalType: "uint8", + name: "eggType", + type: "uint8", + }, + { + internalType: "uint8", + name: "rarity", + type: "uint8", + }, + { + internalType: "uint8", + name: "element", + type: "uint8", + }, + { + internalType: "uint8", + name: "bonusCount", + type: "uint8", + }, + { + internalType: "uint8", + name: "profBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "profBonusScalar", + type: "uint8", + }, + { + internalType: "uint8", + name: "craftBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "craftBonusScalar", + type: "uint8", + }, + { + internalType: "uint8", + name: "combatBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "combatBonusScalar", + type: "uint8", + }, + { + internalType: "uint16", + name: "appearance", + type: "uint16", + }, + { + internalType: "uint8", + name: "background", + type: "uint8", + }, + { + internalType: "uint8", + name: "shiny", + type: "uint8", + }, + { + internalType: "uint64", + name: "hungryAt", + type: "uint64", + }, + { + internalType: "uint64", + name: "equippableAt", + type: "uint64", + }, + { + internalType: "uint256", + name: "equippedTo", + type: "uint256", + }, + { + internalType: "address", + name: "fedBy", + type: "address", + }, + { + internalType: "enum PetFoodType", + name: "foodType", + type: "uint8", + }, + ], + indexed: false, + internalType: "struct PetV2", + name: "pet", + type: "tuple", + }, + ], + name: "PetUpdatedV2", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "previousAdminRole", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "newAdminRole", + type: "bytes32", + }, + ], + name: "RoleAdminChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleGranted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleRevoked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "Unpaused", + type: "event", + }, + { + inputs: [], + name: "BRIDGE_ROLE", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "DEFAULT_ADMIN_ROLE", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MINTER_ROLE", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MODERATOR_ROLE", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "PET_MODERATOR_ROLE", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "approve", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "baseHungryTime", + outputs: [ + { + internalType: "uint64", + name: "", + type: "uint64", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "bonusCount", + outputs: [ + { + internalType: "uint32", + name: "", + type: "uint32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "address", + name: "_to", + type: "address", + }, + ], + name: "bridgeMint", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "getApproved", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + ], + name: "getRoleAdmin", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "gold", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "grantRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "hasRole", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "heroCore", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "heroToPet", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "operator", + type: "address", + }, + ], + name: "isApprovedForAll", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "nextPetId", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "ownerOf", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "pause", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "paused", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "powerUpManager", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "renounceRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "revokeRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "safeTransferFrom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + name: "safeTransferFrom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "operator", + type: "address", + }, + { + internalType: "bool", + name: "approved", + type: "bool", + }, + ], + name: "setApprovalForAll", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "_baseHungryTime", + type: "uint64", + }, + ], + name: "setBaseHungryTime", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_gold", + type: "address", + }, + ], + name: "setGold", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_heroCore", + type: "address", + }, + ], + name: "setHeroCore", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "enum TreatType", + name: "_treatType", + type: "uint8", + }, + { + internalType: "address[]", + name: "_ingredients", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "_ingredientAmounts", + type: "uint256[]", + }, + ], + name: "setIngredients", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_nextPetId", + type: "uint256", + }, + ], + name: "setNextPetId", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_powerUpManager", + type: "address", + }, + ], + name: "setPowerUpManager", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "enum TreatType", + name: "_treatType", + type: "uint8", + }, + { + internalType: "address", + name: "_address", + type: "address", + }, + { + internalType: "bool", + name: "_active", + type: "bool", + }, + { + internalType: "uint256", + name: "_goldCost", + type: "uint256", + }, + ], + name: "setTreatType", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "index", + type: "uint256", + }, + ], + name: "tokenByIndex", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "uint256", + name: "index", + type: "uint256", + }, + ], + name: "tokenOfOwnerByIndex", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "tokenURI", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "enum TreatType", + name: "", + type: "uint8", + }, + ], + name: "treatInfo", + outputs: [ + { + internalType: "address", + name: "treatAddress", + type: "address", + }, + { + internalType: "uint256", + name: "goldCost", + type: "uint256", + }, + { + internalType: "bool", + name: "isActive", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "enum TreatType", + name: "", + type: "uint8", + }, + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "treatIngredientRequirements", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "unpause", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "ReentrancyGuard__ReentrantCall", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "player", + type: "address", + }, + { + indexed: false, + internalType: "enum TreatType", + name: "treatType", + type: "uint8", + }, + { + indexed: false, + internalType: "uint256", + name: "quantity", + type: "uint256", + }, + ], + name: "BonusTreatsAwarded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "fedBy", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "petId", + type: "uint256", + }, + { + indexed: false, + internalType: "enum PetFoodType", + name: "foodType", + type: "uint8", + }, + { + indexed: false, + internalType: "uint256", + name: "hungryAt", + type: "uint256", + }, + ], + name: "PetFed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "player", + type: "address", + }, + { + indexed: false, + internalType: "enum TreatType", + name: "treatType", + type: "uint8", + }, + { + indexed: false, + internalType: "uint256", + name: "quantity", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "item1", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "item2", + type: "address", + }, + ], + name: "TreatCrafted", + type: "event", + }, + { + inputs: [], + name: "PREMIUM_PROVISIONS", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "enum TreatType", + name: "treatType", + type: "uint8", + }, + { + internalType: "uint256", + name: "treatQuantity", + type: "uint256", + }, + { + internalType: "address", + name: "item1", + type: "address", + }, + { + internalType: "address", + name: "item2", + type: "address", + }, + ], + internalType: "struct TreatCraftingInput[]", + name: "_treatData", + type: "tuple[]", + }, + ], + name: "craftTreats", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint256", + name: "petId", + type: "uint256", + }, + { + internalType: "enum TreatType", + name: "treatType", + type: "uint8", + }, + ], + internalType: "struct PetFeedingInput[]", + name: "_feedData", + type: "tuple[]", + }, + ], + name: "feedPets", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint256", + name: "petId", + type: "uint256", + }, + { + internalType: "enum TreatType", + name: "treatType", + type: "uint8", + }, + ], + internalType: "struct PetFeedingInput[]", + name: "_feedData", + type: "tuple[]", + }, + { + internalType: "address", + name: "_account", + type: "address", + }, + ], + name: "feedPetsOnBehalf", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_heroIds", + type: "uint256[]", + }, + ], + name: "getDuelPetData", + outputs: [ + { + internalType: "uint256[]", + name: "", + type: "uint256[]", + }, + { + internalType: "uint8[]", + name: "", + type: "uint8[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_heroId", + type: "uint256", + }, + ], + name: "isHeroPetHungry", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_petId", + type: "uint256", + }, + ], + name: "isPetHungry", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "getPet", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "uint8", + name: "originId", + type: "uint8", + }, + { + internalType: "string", + name: "name", + type: "string", + }, + { + internalType: "uint8", + name: "season", + type: "uint8", + }, + { + internalType: "uint8", + name: "eggType", + type: "uint8", + }, + { + internalType: "uint8", + name: "rarity", + type: "uint8", + }, + { + internalType: "uint8", + name: "element", + type: "uint8", + }, + { + internalType: "uint8", + name: "bonusCount", + type: "uint8", + }, + { + internalType: "uint8", + name: "profBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "profBonusScalar", + type: "uint8", + }, + { + internalType: "uint8", + name: "craftBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "craftBonusScalar", + type: "uint8", + }, + { + internalType: "uint8", + name: "combatBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "combatBonusScalar", + type: "uint8", + }, + { + internalType: "uint16", + name: "appearance", + type: "uint16", + }, + { + internalType: "uint8", + name: "background", + type: "uint8", + }, + { + internalType: "uint8", + name: "shiny", + type: "uint8", + }, + { + internalType: "uint64", + name: "hungryAt", + type: "uint64", + }, + { + internalType: "uint64", + name: "equippableAt", + type: "uint64", + }, + { + internalType: "uint256", + name: "equippedTo", + type: "uint256", + }, + ], + internalType: "struct Pet", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "getPetFedState", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "getPetQuestData", + outputs: [ + { + components: [ + { + internalType: "uint64", + name: "hungryAt", + type: "uint64", + }, + { + internalType: "uint8", + name: "rarity", + type: "uint8", + }, + { + internalType: "uint8", + name: "profBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "profBonusScalar", + type: "uint8", + }, + { + internalType: "uint8", + name: "eggType", + type: "uint8", + }, + { + internalType: "enum PetFoodType", + name: "foodType", + type: "uint8", + }, + ], + internalType: "struct PetQuestData", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "getPetV2", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "uint8", + name: "originId", + type: "uint8", + }, + { + internalType: "string", + name: "name", + type: "string", + }, + { + internalType: "uint8", + name: "season", + type: "uint8", + }, + { + internalType: "uint8", + name: "eggType", + type: "uint8", + }, + { + internalType: "uint8", + name: "rarity", + type: "uint8", + }, + { + internalType: "uint8", + name: "element", + type: "uint8", + }, + { + internalType: "uint8", + name: "bonusCount", + type: "uint8", + }, + { + internalType: "uint8", + name: "profBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "profBonusScalar", + type: "uint8", + }, + { + internalType: "uint8", + name: "craftBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "craftBonusScalar", + type: "uint8", + }, + { + internalType: "uint8", + name: "combatBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "combatBonusScalar", + type: "uint8", + }, + { + internalType: "uint16", + name: "appearance", + type: "uint16", + }, + { + internalType: "uint8", + name: "background", + type: "uint8", + }, + { + internalType: "uint8", + name: "shiny", + type: "uint8", + }, + { + internalType: "uint64", + name: "hungryAt", + type: "uint64", + }, + { + internalType: "uint64", + name: "equippableAt", + type: "uint64", + }, + { + internalType: "uint256", + name: "equippedTo", + type: "uint256", + }, + { + internalType: "address", + name: "fedBy", + type: "address", + }, + { + internalType: "enum PetFoodType", + name: "foodType", + type: "uint8", + }, + ], + internalType: "struct PetV2", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_ids", + type: "uint256[]", + }, + ], + name: "getPetsV2", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "uint8", + name: "originId", + type: "uint8", + }, + { + internalType: "string", + name: "name", + type: "string", + }, + { + internalType: "uint8", + name: "season", + type: "uint8", + }, + { + internalType: "uint8", + name: "eggType", + type: "uint8", + }, + { + internalType: "uint8", + name: "rarity", + type: "uint8", + }, + { + internalType: "uint8", + name: "element", + type: "uint8", + }, + { + internalType: "uint8", + name: "bonusCount", + type: "uint8", + }, + { + internalType: "uint8", + name: "profBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "profBonusScalar", + type: "uint8", + }, + { + internalType: "uint8", + name: "craftBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "craftBonusScalar", + type: "uint8", + }, + { + internalType: "uint8", + name: "combatBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "combatBonusScalar", + type: "uint8", + }, + { + internalType: "uint16", + name: "appearance", + type: "uint16", + }, + { + internalType: "uint8", + name: "background", + type: "uint8", + }, + { + internalType: "uint8", + name: "shiny", + type: "uint8", + }, + { + internalType: "uint64", + name: "hungryAt", + type: "uint64", + }, + { + internalType: "uint64", + name: "equippableAt", + type: "uint64", + }, + { + internalType: "uint256", + name: "equippedTo", + type: "uint256", + }, + { + internalType: "address", + name: "fedBy", + type: "address", + }, + { + internalType: "enum PetFoodType", + name: "foodType", + type: "uint8", + }, + ], + internalType: "struct PetV2[]", + name: "", + type: "tuple[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "getUserPets", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "uint8", + name: "originId", + type: "uint8", + }, + { + internalType: "string", + name: "name", + type: "string", + }, + { + internalType: "uint8", + name: "season", + type: "uint8", + }, + { + internalType: "uint8", + name: "eggType", + type: "uint8", + }, + { + internalType: "uint8", + name: "rarity", + type: "uint8", + }, + { + internalType: "uint8", + name: "element", + type: "uint8", + }, + { + internalType: "uint8", + name: "bonusCount", + type: "uint8", + }, + { + internalType: "uint8", + name: "profBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "profBonusScalar", + type: "uint8", + }, + { + internalType: "uint8", + name: "craftBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "craftBonusScalar", + type: "uint8", + }, + { + internalType: "uint8", + name: "combatBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "combatBonusScalar", + type: "uint8", + }, + { + internalType: "uint16", + name: "appearance", + type: "uint16", + }, + { + internalType: "uint8", + name: "background", + type: "uint8", + }, + { + internalType: "uint8", + name: "shiny", + type: "uint8", + }, + { + internalType: "uint64", + name: "hungryAt", + type: "uint64", + }, + { + internalType: "uint64", + name: "equippableAt", + type: "uint64", + }, + { + internalType: "uint256", + name: "equippedTo", + type: "uint256", + }, + ], + internalType: "struct Pet[]", + name: "", + type: "tuple[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "getUserPetsV2", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "uint8", + name: "originId", + type: "uint8", + }, + { + internalType: "string", + name: "name", + type: "string", + }, + { + internalType: "uint8", + name: "season", + type: "uint8", + }, + { + internalType: "uint8", + name: "eggType", + type: "uint8", + }, + { + internalType: "uint8", + name: "rarity", + type: "uint8", + }, + { + internalType: "uint8", + name: "element", + type: "uint8", + }, + { + internalType: "uint8", + name: "bonusCount", + type: "uint8", + }, + { + internalType: "uint8", + name: "profBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "profBonusScalar", + type: "uint8", + }, + { + internalType: "uint8", + name: "craftBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "craftBonusScalar", + type: "uint8", + }, + { + internalType: "uint8", + name: "combatBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "combatBonusScalar", + type: "uint8", + }, + { + internalType: "uint16", + name: "appearance", + type: "uint16", + }, + { + internalType: "uint8", + name: "background", + type: "uint8", + }, + { + internalType: "uint8", + name: "shiny", + type: "uint8", + }, + { + internalType: "uint64", + name: "hungryAt", + type: "uint64", + }, + { + internalType: "uint64", + name: "equippableAt", + type: "uint64", + }, + { + internalType: "uint256", + name: "equippedTo", + type: "uint256", + }, + { + internalType: "address", + name: "fedBy", + type: "address", + }, + { + internalType: "enum PetFoodType", + name: "foodType", + type: "uint8", + }, + ], + internalType: "struct PetV2[]", + name: "", + type: "tuple[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint8", + name: "originId", + type: "uint8", + }, + { + internalType: "string", + name: "name", + type: "string", + }, + { + internalType: "uint8", + name: "season", + type: "uint8", + }, + { + internalType: "uint8", + name: "eggType", + type: "uint8", + }, + { + internalType: "uint8", + name: "rarity", + type: "uint8", + }, + { + internalType: "uint8", + name: "element", + type: "uint8", + }, + { + internalType: "uint8", + name: "bonusCount", + type: "uint8", + }, + { + internalType: "uint8", + name: "profBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "profBonusScalar", + type: "uint8", + }, + { + internalType: "uint8", + name: "craftBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "craftBonusScalar", + type: "uint8", + }, + { + internalType: "uint8", + name: "combatBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "combatBonusScalar", + type: "uint8", + }, + { + internalType: "uint16", + name: "appearance", + type: "uint16", + }, + { + internalType: "uint8", + name: "background", + type: "uint8", + }, + { + internalType: "uint8", + name: "shiny", + type: "uint8", + }, + ], + internalType: "struct PetOptions", + name: "_petOptions", + type: "tuple", + }, + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "hatchPet", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_from", + type: "address", + }, + { + internalType: "address", + name: "_to", + type: "address", + }, + { + internalType: "uint256", + name: "_petId", + type: "uint256", + }, + ], + name: "transferPetOnBehalf", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "uint8", + name: "originId", + type: "uint8", + }, + { + internalType: "string", + name: "name", + type: "string", + }, + { + internalType: "uint8", + name: "season", + type: "uint8", + }, + { + internalType: "uint8", + name: "eggType", + type: "uint8", + }, + { + internalType: "uint8", + name: "rarity", + type: "uint8", + }, + { + internalType: "uint8", + name: "element", + type: "uint8", + }, + { + internalType: "uint8", + name: "bonusCount", + type: "uint8", + }, + { + internalType: "uint8", + name: "profBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "profBonusScalar", + type: "uint8", + }, + { + internalType: "uint8", + name: "craftBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "craftBonusScalar", + type: "uint8", + }, + { + internalType: "uint8", + name: "combatBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "combatBonusScalar", + type: "uint8", + }, + { + internalType: "uint16", + name: "appearance", + type: "uint16", + }, + { + internalType: "uint8", + name: "background", + type: "uint8", + }, + { + internalType: "uint8", + name: "shiny", + type: "uint8", + }, + { + internalType: "uint64", + name: "hungryAt", + type: "uint64", + }, + { + internalType: "uint64", + name: "equippableAt", + type: "uint64", + }, + { + internalType: "uint256", + name: "equippedTo", + type: "uint256", + }, + ], + internalType: "struct Pet", + name: "_pet", + type: "tuple", + }, + ], + name: "updatePet", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "uint8", + name: "originId", + type: "uint8", + }, + { + internalType: "string", + name: "name", + type: "string", + }, + { + internalType: "uint8", + name: "season", + type: "uint8", + }, + { + internalType: "uint8", + name: "eggType", + type: "uint8", + }, + { + internalType: "uint8", + name: "rarity", + type: "uint8", + }, + { + internalType: "uint8", + name: "element", + type: "uint8", + }, + { + internalType: "uint8", + name: "bonusCount", + type: "uint8", + }, + { + internalType: "uint8", + name: "profBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "profBonusScalar", + type: "uint8", + }, + { + internalType: "uint8", + name: "craftBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "craftBonusScalar", + type: "uint8", + }, + { + internalType: "uint8", + name: "combatBonus", + type: "uint8", + }, + { + internalType: "uint8", + name: "combatBonusScalar", + type: "uint8", + }, + { + internalType: "uint16", + name: "appearance", + type: "uint16", + }, + { + internalType: "uint8", + name: "background", + type: "uint8", + }, + { + internalType: "uint8", + name: "shiny", + type: "uint8", + }, + { + internalType: "uint64", + name: "hungryAt", + type: "uint64", + }, + { + internalType: "uint64", + name: "equippableAt", + type: "uint64", + }, + { + internalType: "uint256", + name: "equippedTo", + type: "uint256", + }, + { + internalType: "address", + name: "fedBy", + type: "address", + }, + { + internalType: "enum PetFoodType", + name: "foodType", + type: "uint8", + }, + ], + internalType: "struct PetV2", + name: "_pet", + type: "tuple", + }, + ], + name: "updatePetV2", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; diff --git a/services/decoder/protocols/defi-kingdoms/defi-kingdoms.decoders.ts b/services/decoder/protocols/defi-kingdoms/defi-kingdoms.decoders.ts index 35b2e28..32fac9f 100644 --- a/services/decoder/protocols/defi-kingdoms/defi-kingdoms.decoders.ts +++ b/services/decoder/protocols/defi-kingdoms/defi-kingdoms.decoders.ts @@ -1,20 +1,20 @@ +import { prettifyCurrency } from "@covalenthq/client-sdk"; +import { decodeEventLog, type Abi } from "viem"; +import { isNullAddress, timestampParser } from "../../../../utils/functions"; import { GoldRushDecoder } from "../../decoder"; -import type { EventDetails, EventNFTs, EventTokens } from "../../decoder.types"; -import { type EventType } from "../../decoder.types"; import { DECODED_ACTION, DECODED_EVENT_CATEGORY, } from "../../decoder.constants"; -import { decodeEventLog, type Abi } from "viem"; -import PetABI from "./abis/defi-kingdoms.pets.abi.json"; -import HERO_AUCTION_ABI from "./abis/defi-kingdoms.hero-auction.abi.json"; -import { timestampParser, isNullAddress } from "../../../../utils/functions"; -import { prettifyCurrency } from "@covalenthq/client-sdk"; +import type { EventDetails, EventNFTs, EventTokens } from "../../decoder.types"; +import { type EventType } from "../../decoder.types"; +import { heroAuctionABI } from "./abis/hero-auction.abi"; +import { petsABI } from "./abis/pets.abi"; GoldRushDecoder.on( "defi-kingdoms:PetFed", ["defi-kingdoms-mainnet"], - PetABI as Abi, + petsABI as Abi, async ( log_event, tx, @@ -25,19 +25,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: PetABI, + abi: petsABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "PetFed", - }) as { - eventName: "PetFed"; - args: { - fedBy: string; - petId: bigint; - foodType: bigint; - hungryAt: bigint; - }; - }; + }); const { data: PetNFT } = await covalent_client.NftService.getNftMetadataForGivenTokenIdForContract( @@ -116,7 +108,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "defi-kingdoms:AuctionCreated", ["defi-kingdoms-mainnet"], - HERO_AUCTION_ABI as Abi, + heroAuctionABI as Abi, async ( log_event, tx, @@ -127,22 +119,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: HERO_AUCTION_ABI, + abi: heroAuctionABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "AuctionCreated", - }) as { - eventName: "AuctionCreated"; - args: { - auctionId: bigint; - owner: string; - tokenId: bigint; - startingPrice: bigint; - endingPrice: bigint; - duration: bigint; - winner: string; - }; - }; + }); const date = timestampParser(tx.block_signed_at, "YYYY-MM-DD"); @@ -276,7 +257,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "defi-kingdoms:AuctionCancelled", ["defi-kingdoms-mainnet"], - HERO_AUCTION_ABI as Abi, + heroAuctionABI as Abi, async ( log_event, tx, @@ -287,17 +268,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: HERO_AUCTION_ABI, + abi: heroAuctionABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "AuctionCancelled", - }) as { - eventName: "AuctionCancelled"; - args: { - auctionId: bigint; - tokenId: bigint; - }; - }; + }); const { data: HeroNFT } = await covalent_client.NftService.getNftMetadataForGivenTokenIdForContract( @@ -364,7 +339,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "defi-kingdoms:AuctionSuccessful", ["defi-kingdoms-mainnet"], - HERO_AUCTION_ABI as Abi, + heroAuctionABI as Abi, async ( log_event, tx, @@ -375,19 +350,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: HERO_AUCTION_ABI, + abi: heroAuctionABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "AuctionSuccessful", - }) as { - eventName: "AuctionSuccessful"; - args: { - auctionId: bigint; - tokenId: bigint; - totalPrice: bigint; - winner: string; - }; - }; + }); const date = timestampParser(tx.block_signed_at, "YYYY-MM-DD"); diff --git a/services/decoder/protocols/lido/abis/lido.steth.abi.json b/services/decoder/protocols/lido/abis/lido.steth.abi.json deleted file mode 100644 index 9356757..0000000 --- a/services/decoder/protocols/lido/abis/lido.steth.abi.json +++ /dev/null @@ -1,1600 +0,0 @@ -[ - { - "constant": false, - "inputs": [], - "name": "resume", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "stop", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "hasInitialized", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" - }, - { - "name": "_amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "STAKING_CONTROL_ROLE", - "outputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_ethAmount", - "type": "uint256" - } - ], - "name": "getSharesByPooledEth", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isStakingPaused", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_sender", - "type": "address" - }, - { - "name": "_recipient", - "type": "address" - }, - { - "name": "_amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_script", - "type": "bytes" - } - ], - "name": "getEVMScriptExecutor", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_maxStakeLimit", - "type": "uint256" - }, - { - "name": "_stakeLimitIncreasePerBlock", - "type": "uint256" - } - ], - "name": "setStakingLimit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "RESUME_ROLE", - "outputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_lidoLocator", - "type": "address" - }, - { - "name": "_eip712StETH", - "type": "address" - } - ], - "name": "finalizeUpgrade_v2", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getRecoveryVault", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getTotalPooledEther", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_newDepositedValidators", - "type": "uint256" - } - ], - "name": "unsafeChangeDepositedValidators", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "PAUSE_ROLE", - "outputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" - }, - { - "name": "_addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getTreasury", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isStopped", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getBufferedEther", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_lidoLocator", - "type": "address" - }, - { - "name": "_eip712StETH", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "receiveELRewards", - "outputs": [], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getWithdrawalCredentials", - "outputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCurrentStakeLimit", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getStakeLimitFullInfo", - "outputs": [ - { - "name": "isStakingPaused", - "type": "bool" - }, - { - "name": "isStakingLimitSet", - "type": "bool" - }, - { - "name": "currentStakeLimit", - "type": "uint256" - }, - { - "name": "maxStakeLimit", - "type": "uint256" - }, - { - "name": "maxStakeLimitGrowthBlocks", - "type": "uint256" - }, - { - "name": "prevStakeLimit", - "type": "uint256" - }, - { - "name": "prevStakeBlockNumber", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_sender", - "type": "address" - }, - { - "name": "_recipient", - "type": "address" - }, - { - "name": "_sharesAmount", - "type": "uint256" - } - ], - "name": "transferSharesFrom", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "resumeStaking", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getFeeDistribution", - "outputs": [ - { - "name": "treasuryFeeBasisPoints", - "type": "uint16" - }, - { - "name": "insuranceFeeBasisPoints", - "type": "uint16" - }, - { - "name": "operatorsFeeBasisPoints", - "type": "uint16" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "receiveWithdrawals", - "outputs": [], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_sharesAmount", - "type": "uint256" - } - ], - "name": "getPooledEthByShares", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "token", - "type": "address" - } - ], - "name": "allowRecoverability", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "owner", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "appId", - "outputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getOracle", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "eip712Domain", - "outputs": [ - { - "name": "name", - "type": "string" - }, - { - "name": "version", - "type": "string" - }, - { - "name": "chainId", - "type": "uint256" - }, - { - "name": "verifyingContract", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getContractVersion", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getInitializationBlock", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_recipient", - "type": "address" - }, - { - "name": "_sharesAmount", - "type": "uint256" - } - ], - "name": "transferShares", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getEIP712StETH", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "", - "type": "address" - } - ], - "name": "transferToVault", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_sender", - "type": "address" - }, - { - "name": "_role", - "type": "bytes32" - }, - { - "name": "_params", - "type": "uint256[]" - } - ], - "name": "canPerform", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_referral", - "type": "address" - } - ], - "name": "submit", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" - }, - { - "name": "_subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getEVMScriptRegistry", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_recipient", - "type": "address" - }, - { - "name": "_amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_maxDepositsCount", - "type": "uint256" - }, - { - "name": "_stakingModuleId", - "type": "uint256" - }, - { - "name": "_depositCalldata", - "type": "bytes" - } - ], - "name": "deposit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "UNSAFE_CHANGE_DEPOSITED_VALIDATORS_ROLE", - "outputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getBeaconStat", - "outputs": [ - { - "name": "depositedValidators", - "type": "uint256" - }, - { - "name": "beaconValidators", - "type": "uint256" - }, - { - "name": "beaconBalance", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "removeStakingLimit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_reportTimestamp", - "type": "uint256" - }, - { - "name": "_timeElapsed", - "type": "uint256" - }, - { - "name": "_clValidators", - "type": "uint256" - }, - { - "name": "_clBalance", - "type": "uint256" - }, - { - "name": "_withdrawalVaultBalance", - "type": "uint256" - }, - { - "name": "_elRewardsVaultBalance", - "type": "uint256" - }, - { - "name": "_sharesRequestedToBurn", - "type": "uint256" - }, - { - "name": "_withdrawalFinalizationBatches", - "type": "uint256[]" - }, - { - "name": "_simulatedShareRate", - "type": "uint256" - } - ], - "name": "handleOracleReport", - "outputs": [ - { - "name": "postRebaseAmounts", - "type": "uint256[4]" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getFee", - "outputs": [ - { - "name": "totalFee", - "type": "uint16" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "kernel", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getTotalShares", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_owner", - "type": "address" - }, - { - "name": "_spender", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - }, - { - "name": "_deadline", - "type": "uint256" - }, - { - "name": "_v", - "type": "uint8" - }, - { - "name": "_r", - "type": "bytes32" - }, - { - "name": "_s", - "type": "bytes32" - } - ], - "name": "permit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - }, - { - "name": "_spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isPetrified", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getLidoLocator", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "canDeposit", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "STAKING_PAUSE_ROLE", - "outputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getDepositableEther", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_account", - "type": "address" - } - ], - "name": "sharesOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "pauseStaking", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getTotalELRewardsCollected", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "anonymous": false, - "inputs": [], - "name": "StakingPaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "StakingResumed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "maxStakeLimit", - "type": "uint256" - }, - { - "indexed": false, - "name": "stakeLimitIncreasePerBlock", - "type": "uint256" - } - ], - "name": "StakingLimitSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "StakingLimitRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "reportTimestamp", - "type": "uint256" - }, - { - "indexed": false, - "name": "preCLValidators", - "type": "uint256" - }, - { - "indexed": false, - "name": "postCLValidators", - "type": "uint256" - } - ], - "name": "CLValidatorsUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "depositedValidators", - "type": "uint256" - } - ], - "name": "DepositedValidatorsChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "reportTimestamp", - "type": "uint256" - }, - { - "indexed": false, - "name": "preCLBalance", - "type": "uint256" - }, - { - "indexed": false, - "name": "postCLBalance", - "type": "uint256" - }, - { - "indexed": false, - "name": "withdrawalsWithdrawn", - "type": "uint256" - }, - { - "indexed": false, - "name": "executionLayerRewardsWithdrawn", - "type": "uint256" - }, - { - "indexed": false, - "name": "postBufferedEther", - "type": "uint256" - } - ], - "name": "ETHDistributed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "reportTimestamp", - "type": "uint256" - }, - { - "indexed": false, - "name": "timeElapsed", - "type": "uint256" - }, - { - "indexed": false, - "name": "preTotalShares", - "type": "uint256" - }, - { - "indexed": false, - "name": "preTotalEther", - "type": "uint256" - }, - { - "indexed": false, - "name": "postTotalShares", - "type": "uint256" - }, - { - "indexed": false, - "name": "postTotalEther", - "type": "uint256" - }, - { - "indexed": false, - "name": "sharesMintedAsFees", - "type": "uint256" - } - ], - "name": "TokenRebased", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "lidoLocator", - "type": "address" - } - ], - "name": "LidoLocatorSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "amount", - "type": "uint256" - } - ], - "name": "ELRewardsReceived", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "amount", - "type": "uint256" - } - ], - "name": "WithdrawalsReceived", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "name": "referral", - "type": "address" - } - ], - "name": "Submitted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "amount", - "type": "uint256" - } - ], - "name": "Unbuffered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "executor", - "type": "address" - }, - { - "indexed": false, - "name": "script", - "type": "bytes" - }, - { - "indexed": false, - "name": "input", - "type": "bytes" - }, - { - "indexed": false, - "name": "returnData", - "type": "bytes" - } - ], - "name": "ScriptResult", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "vault", - "type": "address" - }, - { - "indexed": true, - "name": "token", - "type": "address" - }, - { - "indexed": false, - "name": "amount", - "type": "uint256" - } - ], - "name": "RecoverToVault", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "eip712StETH", - "type": "address" - } - ], - "name": "EIP712StETHInitialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "from", - "type": "address" - }, - { - "indexed": true, - "name": "to", - "type": "address" - }, - { - "indexed": false, - "name": "sharesValue", - "type": "uint256" - } - ], - "name": "TransferShares", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "account", - "type": "address" - }, - { - "indexed": false, - "name": "preRebaseTokenAmount", - "type": "uint256" - }, - { - "indexed": false, - "name": "postRebaseTokenAmount", - "type": "uint256" - }, - { - "indexed": false, - "name": "sharesAmount", - "type": "uint256" - } - ], - "name": "SharesBurnt", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Stopped", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Resumed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "from", - "type": "address" - }, - { - "indexed": true, - "name": "to", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "version", - "type": "uint256" - } - ], - "name": "ContractVersionSet", - "type": "event" - } -] diff --git a/services/decoder/protocols/lido/abis/lido.withdrawalQueue.abi.json b/services/decoder/protocols/lido/abis/lido.withdrawalQueue.abi.json deleted file mode 100644 index af54772..0000000 --- a/services/decoder/protocols/lido/abis/lido.withdrawalQueue.abi.json +++ /dev/null @@ -1,1576 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "address", "name": "_wstETH", "type": "address" }, - { "internalType": "string", "name": "_name", "type": "string" }, - { "internalType": "string", "name": "_symbol", "type": "string" } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { "inputs": [], "name": "AdminZeroAddress", "type": "error" }, - { "inputs": [], "name": "ApprovalToOwner", "type": "error" }, - { "inputs": [], "name": "ApproveToCaller", "type": "error" }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_firstArrayLength", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_secondArrayLength", - "type": "uint256" - } - ], - "name": "ArraysLengthMismatch", - "type": "error" - }, - { "inputs": [], "name": "BatchesAreNotSorted", "type": "error" }, - { - "inputs": [], - "name": "CantSendValueRecipientMayHaveReverted", - "type": "error" - }, - { "inputs": [], "name": "EmptyBatches", "type": "error" }, - { - "inputs": [], - "name": "InvalidContractVersionIncrement", - "type": "error" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "_hint", "type": "uint256" } - ], - "name": "InvalidHint", - "type": "error" - }, - { - "inputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "name": "InvalidOwnerAddress", - "type": "error" - }, - { "inputs": [], "name": "InvalidReportTimestamp", "type": "error" }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_requestId", - "type": "uint256" - } - ], - "name": "InvalidRequestId", - "type": "error" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "startId", "type": "uint256" }, - { "internalType": "uint256", "name": "endId", "type": "uint256" } - ], - "name": "InvalidRequestIdRange", - "type": "error" - }, - { "inputs": [], "name": "InvalidState", "type": "error" }, - { "inputs": [], "name": "NonZeroContractVersionOnInit", "type": "error" }, - { "inputs": [], "name": "NotEnoughEther", "type": "error" }, - { - "inputs": [ - { "internalType": "address", "name": "_sender", "type": "address" }, - { "internalType": "address", "name": "_owner", "type": "address" } - ], - "name": "NotOwner", - "type": "error" - }, - { - "inputs": [ - { "internalType": "address", "name": "sender", "type": "address" } - ], - "name": "NotOwnerOrApproved", - "type": "error" - }, - { - "inputs": [ - { "internalType": "address", "name": "sender", "type": "address" } - ], - "name": "NotOwnerOrApprovedForAll", - "type": "error" - }, - { "inputs": [], "name": "PauseUntilMustBeInFuture", "type": "error" }, - { "inputs": [], "name": "PausedExpected", "type": "error" }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_requestId", - "type": "uint256" - } - ], - "name": "RequestAlreadyClaimed", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amountOfStETH", - "type": "uint256" - } - ], - "name": "RequestAmountTooLarge", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amountOfStETH", - "type": "uint256" - } - ], - "name": "RequestAmountTooSmall", - "type": "error" - }, - { "inputs": [], "name": "RequestIdsNotSorted", "type": "error" }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_requestId", - "type": "uint256" - } - ], - "name": "RequestNotFoundOrNotFinalized", - "type": "error" - }, - { "inputs": [], "name": "ResumedExpected", "type": "error" }, - { - "inputs": [ - { "internalType": "string", "name": "str", "type": "string" } - ], - "name": "StringTooLong", - "type": "error" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "sent", "type": "uint256" }, - { - "internalType": "uint256", - "name": "maxExpected", - "type": "uint256" - } - ], - "name": "TooMuchEtherToFinalize", - "type": "error" - }, - { - "inputs": [ - { "internalType": "address", "name": "from", "type": "address" }, - { - "internalType": "address", - "name": "realOwner", - "type": "address" - } - ], - "name": "TransferFromIncorrectOwner", - "type": "error" - }, - { "inputs": [], "name": "TransferFromZeroAddress", "type": "error" }, - { - "inputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "name": "TransferToNonIERC721Receiver", - "type": "error" - }, - { "inputs": [], "name": "TransferToThemselves", "type": "error" }, - { "inputs": [], "name": "TransferToZeroAddress", "type": "error" }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, - { "internalType": "uint256", "name": "received", "type": "uint256" } - ], - "name": "UnexpectedContractVersion", - "type": "error" - }, - { "inputs": [], "name": "ZeroAmountOfETH", "type": "error" }, - { "inputs": [], "name": "ZeroMetadata", "type": "error" }, - { "inputs": [], "name": "ZeroPauseDuration", "type": "error" }, - { "inputs": [], "name": "ZeroRecipient", "type": "error" }, - { "inputs": [], "name": "ZeroShareRate", "type": "error" }, - { "inputs": [], "name": "ZeroTimestamp", "type": "error" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "approved", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "baseURI", - "type": "string" - } - ], - "name": "BaseURISet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "_fromTokenId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_toTokenId", - "type": "uint256" - } - ], - "name": "BatchMetadataUpdate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "BunkerModeDisabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "_sinceTimestamp", - "type": "uint256" - } - ], - "name": "BunkerModeEnabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "version", - "type": "uint256" - } - ], - "name": "ContractVersionSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "_admin", - "type": "address" - } - ], - "name": "InitializedV1", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "_tokenId", - "type": "uint256" - } - ], - "name": "MetadataUpdate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "nftDescriptorAddress", - "type": "address" - } - ], - "name": "NftDescriptorAddressSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "duration", - "type": "uint256" - } - ], - "name": "Paused", - "type": "event" - }, - { "anonymous": false, "inputs": [], "name": "Resumed", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountOfETH", - "type": "uint256" - } - ], - "name": "WithdrawalClaimed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "requestId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "requestor", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountOfStETH", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountOfShares", - "type": "uint256" - } - ], - "name": "WithdrawalRequested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "from", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "to", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountOfETHLocked", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "sharesToBurn", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - } - ], - "name": "WithdrawalsFinalized", - "type": "event" - }, - { - "inputs": [], - "name": "BUNKER_MODE_DISABLED_TIMESTAMP", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "FINALIZE_ROLE", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MANAGE_TOKEN_URI_ROLE", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_BATCHES_LENGTH", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_STETH_WITHDRAWAL_AMOUNT", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MIN_STETH_WITHDRAWAL_AMOUNT", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ORACLE_ROLE", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PAUSE_INFINITELY", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PAUSE_ROLE", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "RESUME_ROLE", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "STETH", - "outputs": [ - { "internalType": "contract IStETH", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WSTETH", - "outputs": [ - { - "internalType": "contract IWstETH", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_to", "type": "address" }, - { - "internalType": "uint256", - "name": "_requestId", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_owner", "type": "address" } - ], - "name": "balanceOf", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "bunkerModeSinceTimestamp", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_maxShareRate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxTimestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxRequestsPerCall", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "remainingEthBudget", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "finished", - "type": "bool" - }, - { - "internalType": "uint256[36]", - "name": "batches", - "type": "uint256[36]" - }, - { - "internalType": "uint256", - "name": "batchesLength", - "type": "uint256" - } - ], - "internalType": "struct WithdrawalQueueBase.BatchesCalculationState", - "name": "_state", - "type": "tuple" - } - ], - "name": "calculateFinalizationBatches", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "remainingEthBudget", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "finished", - "type": "bool" - }, - { - "internalType": "uint256[36]", - "name": "batches", - "type": "uint256[36]" - }, - { - "internalType": "uint256", - "name": "batchesLength", - "type": "uint256" - } - ], - "internalType": "struct WithdrawalQueueBase.BatchesCalculationState", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_requestId", - "type": "uint256" - } - ], - "name": "claimWithdrawal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "_requestIds", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "_hints", - "type": "uint256[]" - } - ], - "name": "claimWithdrawals", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "_requestIds", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "_hints", - "type": "uint256[]" - }, - { - "internalType": "address", - "name": "_recipient", - "type": "address" - } - ], - "name": "claimWithdrawalsTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_lastRequestIdToBeFinalized", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxShareRate", - "type": "uint256" - } - ], - "name": "finalize", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "_requestIds", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_firstIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_lastIndex", - "type": "uint256" - } - ], - "name": "findCheckpointHints", - "outputs": [ - { - "internalType": "uint256[]", - "name": "hintIds", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_requestId", - "type": "uint256" - } - ], - "name": "getApproved", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getBaseURI", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "_requestIds", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "_hints", - "type": "uint256[]" - } - ], - "name": "getClaimableEther", - "outputs": [ - { - "internalType": "uint256[]", - "name": "claimableEthValues", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getContractVersion", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getLastCheckpointIndex", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getLastFinalizedRequestId", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getLastRequestId", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getLockedEtherAmount", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getNFTDescriptorAddress", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getResumeSinceTimestamp", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" } - ], - "name": "getRoleAdmin", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "uint256", "name": "index", "type": "uint256" } - ], - "name": "getRoleMember", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" } - ], - "name": "getRoleMemberCount", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_owner", "type": "address" } - ], - "name": "getWithdrawalRequests", - "outputs": [ - { - "internalType": "uint256[]", - "name": "requestsIds", - "type": "uint256[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "_requestIds", - "type": "uint256[]" - } - ], - "name": "getWithdrawalStatus", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "amountOfStETH", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOfShares", - "type": "uint256" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "isFinalized", - "type": "bool" - }, - { - "internalType": "bool", - "name": "isClaimed", - "type": "bool" - } - ], - "internalType": "struct WithdrawalQueueBase.WithdrawalRequestStatus[]", - "name": "statuses", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "hasRole", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_admin", "type": "address" } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_owner", "type": "address" }, - { - "internalType": "address", - "name": "_operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "isBunkerModeActive", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "isPaused", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "_isBunkerModeNow", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_bunkerStartTimestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_currentReportTimestamp", - "type": "uint256" - } - ], - "name": "onOracleReport", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_requestId", - "type": "uint256" - } - ], - "name": "ownerOf", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_duration", - "type": "uint256" - } - ], - "name": "pauseFor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_pauseUntilInclusive", - "type": "uint256" - } - ], - "name": "pauseUntil", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "_batches", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_maxShareRate", - "type": "uint256" - } - ], - "name": "prefinalize", - "outputs": [ - { - "internalType": "uint256", - "name": "ethToLock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "sharesToBurn", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "_amounts", - "type": "uint256[]" - }, - { "internalType": "address", "name": "_owner", "type": "address" } - ], - "name": "requestWithdrawals", - "outputs": [ - { - "internalType": "uint256[]", - "name": "requestIds", - "type": "uint256[]" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "_amounts", - "type": "uint256[]" - }, - { "internalType": "address", "name": "_owner", "type": "address" }, - { - "components": [ - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { "internalType": "uint8", "name": "v", "type": "uint8" }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "internalType": "struct WithdrawalQueue.PermitInput", - "name": "_permit", - "type": "tuple" - } - ], - "name": "requestWithdrawalsWithPermit", - "outputs": [ - { - "internalType": "uint256[]", - "name": "requestIds", - "type": "uint256[]" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "_amounts", - "type": "uint256[]" - }, - { "internalType": "address", "name": "_owner", "type": "address" } - ], - "name": "requestWithdrawalsWstETH", - "outputs": [ - { - "internalType": "uint256[]", - "name": "requestIds", - "type": "uint256[]" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "_amounts", - "type": "uint256[]" - }, - { "internalType": "address", "name": "_owner", "type": "address" }, - { - "components": [ - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { "internalType": "uint8", "name": "v", "type": "uint8" }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "internalType": "struct WithdrawalQueue.PermitInput", - "name": "_permit", - "type": "tuple" - } - ], - "name": "requestWithdrawalsWstETHWithPermit", - "outputs": [ - { - "internalType": "uint256[]", - "name": "requestIds", - "type": "uint256[]" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "resume", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_from", "type": "address" }, - { "internalType": "address", "name": "_to", "type": "address" }, - { - "internalType": "uint256", - "name": "_requestId", - "type": "uint256" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_from", "type": "address" }, - { "internalType": "address", "name": "_to", "type": "address" }, - { - "internalType": "uint256", - "name": "_requestId", - "type": "uint256" - }, - { "internalType": "bytes", "name": "_data", "type": "bytes" } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_operator", - "type": "address" - }, - { "internalType": "bool", "name": "_approved", "type": "bool" } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "string", "name": "_baseURI", "type": "string" } - ], - "name": "setBaseURI", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_nftDescriptorAddress", - "type": "address" - } - ], - "name": "setNFTDescriptorAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_requestId", - "type": "uint256" - } - ], - "name": "tokenURI", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_from", "type": "address" }, - { "internalType": "address", "name": "_to", "type": "address" }, - { - "internalType": "uint256", - "name": "_requestId", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unfinalizedRequestNumber", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unfinalizedStETH", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/services/decoder/protocols/lido/abis/steth.abi.ts b/services/decoder/protocols/lido/abis/steth.abi.ts new file mode 100644 index 0000000..b32c2ea --- /dev/null +++ b/services/decoder/protocols/lido/abis/steth.abi.ts @@ -0,0 +1,1600 @@ +export const stethABI = [ + { + constant: false, + inputs: [], + name: "resume", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "name", + outputs: [ + { + name: "", + type: "string", + }, + ], + payable: false, + stateMutability: "pure", + type: "function", + }, + { + constant: false, + inputs: [], + name: "stop", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "hasInitialized", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_spender", + type: "address", + }, + { + name: "_amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "STAKING_CONTROL_ROLE", + outputs: [ + { + name: "", + type: "bytes32", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "totalSupply", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "_ethAmount", + type: "uint256", + }, + ], + name: "getSharesByPooledEth", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "isStakingPaused", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_sender", + type: "address", + }, + { + name: "_recipient", + type: "address", + }, + { + name: "_amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "_script", + type: "bytes", + }, + ], + name: "getEVMScriptExecutor", + outputs: [ + { + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_maxStakeLimit", + type: "uint256", + }, + { + name: "_stakeLimitIncreasePerBlock", + type: "uint256", + }, + ], + name: "setStakingLimit", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "RESUME_ROLE", + outputs: [ + { + name: "", + type: "bytes32", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_lidoLocator", + type: "address", + }, + { + name: "_eip712StETH", + type: "address", + }, + ], + name: "finalizeUpgrade_v2", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "decimals", + outputs: [ + { + name: "", + type: "uint8", + }, + ], + payable: false, + stateMutability: "pure", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getRecoveryVault", + outputs: [ + { + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [ + { + name: "", + type: "bytes32", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getTotalPooledEther", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_newDepositedValidators", + type: "uint256", + }, + ], + name: "unsafeChangeDepositedValidators", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "PAUSE_ROLE", + outputs: [ + { + name: "", + type: "bytes32", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_spender", + type: "address", + }, + { + name: "_addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getTreasury", + outputs: [ + { + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "isStopped", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getBufferedEther", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_lidoLocator", + type: "address", + }, + { + name: "_eip712StETH", + type: "address", + }, + ], + name: "initialize", + outputs: [], + payable: true, + stateMutability: "payable", + type: "function", + }, + { + constant: false, + inputs: [], + name: "receiveELRewards", + outputs: [], + payable: true, + stateMutability: "payable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getWithdrawalCredentials", + outputs: [ + { + name: "", + type: "bytes32", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getCurrentStakeLimit", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getStakeLimitFullInfo", + outputs: [ + { + name: "isStakingPaused", + type: "bool", + }, + { + name: "isStakingLimitSet", + type: "bool", + }, + { + name: "currentStakeLimit", + type: "uint256", + }, + { + name: "maxStakeLimit", + type: "uint256", + }, + { + name: "maxStakeLimitGrowthBlocks", + type: "uint256", + }, + { + name: "prevStakeLimit", + type: "uint256", + }, + { + name: "prevStakeBlockNumber", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_sender", + type: "address", + }, + { + name: "_recipient", + type: "address", + }, + { + name: "_sharesAmount", + type: "uint256", + }, + ], + name: "transferSharesFrom", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "_account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "resumeStaking", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getFeeDistribution", + outputs: [ + { + name: "treasuryFeeBasisPoints", + type: "uint16", + }, + { + name: "insuranceFeeBasisPoints", + type: "uint16", + }, + { + name: "operatorsFeeBasisPoints", + type: "uint16", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "receiveWithdrawals", + outputs: [], + payable: true, + stateMutability: "payable", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "_sharesAmount", + type: "uint256", + }, + ], + name: "getPooledEthByShares", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "token", + type: "address", + }, + ], + name: "allowRecoverability", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "owner", + type: "address", + }, + ], + name: "nonces", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "appId", + outputs: [ + { + name: "", + type: "bytes32", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getOracle", + outputs: [ + { + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "eip712Domain", + outputs: [ + { + name: "name", + type: "string", + }, + { + name: "version", + type: "string", + }, + { + name: "chainId", + type: "uint256", + }, + { + name: "verifyingContract", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getContractVersion", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getInitializationBlock", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_recipient", + type: "address", + }, + { + name: "_sharesAmount", + type: "uint256", + }, + ], + name: "transferShares", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "symbol", + outputs: [ + { + name: "", + type: "string", + }, + ], + payable: false, + stateMutability: "pure", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getEIP712StETH", + outputs: [ + { + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "", + type: "address", + }, + ], + name: "transferToVault", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "_sender", + type: "address", + }, + { + name: "_role", + type: "bytes32", + }, + { + name: "_params", + type: "uint256[]", + }, + ], + name: "canPerform", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_referral", + type: "address", + }, + ], + name: "submit", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: true, + stateMutability: "payable", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_spender", + type: "address", + }, + { + name: "_subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getEVMScriptRegistry", + outputs: [ + { + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_recipient", + type: "address", + }, + { + name: "_amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_maxDepositsCount", + type: "uint256", + }, + { + name: "_stakingModuleId", + type: "uint256", + }, + { + name: "_depositCalldata", + type: "bytes", + }, + ], + name: "deposit", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "UNSAFE_CHANGE_DEPOSITED_VALIDATORS_ROLE", + outputs: [ + { + name: "", + type: "bytes32", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getBeaconStat", + outputs: [ + { + name: "depositedValidators", + type: "uint256", + }, + { + name: "beaconValidators", + type: "uint256", + }, + { + name: "beaconBalance", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "removeStakingLimit", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_reportTimestamp", + type: "uint256", + }, + { + name: "_timeElapsed", + type: "uint256", + }, + { + name: "_clValidators", + type: "uint256", + }, + { + name: "_clBalance", + type: "uint256", + }, + { + name: "_withdrawalVaultBalance", + type: "uint256", + }, + { + name: "_elRewardsVaultBalance", + type: "uint256", + }, + { + name: "_sharesRequestedToBurn", + type: "uint256", + }, + { + name: "_withdrawalFinalizationBatches", + type: "uint256[]", + }, + { + name: "_simulatedShareRate", + type: "uint256", + }, + ], + name: "handleOracleReport", + outputs: [ + { + name: "postRebaseAmounts", + type: "uint256[4]", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getFee", + outputs: [ + { + name: "totalFee", + type: "uint16", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "kernel", + outputs: [ + { + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getTotalShares", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_owner", + type: "address", + }, + { + name: "_spender", + type: "address", + }, + { + name: "_value", + type: "uint256", + }, + { + name: "_deadline", + type: "uint256", + }, + { + name: "_v", + type: "uint8", + }, + { + name: "_r", + type: "bytes32", + }, + { + name: "_s", + type: "bytes32", + }, + ], + name: "permit", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "_owner", + type: "address", + }, + { + name: "_spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "isPetrified", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getLidoLocator", + outputs: [ + { + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "canDeposit", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "STAKING_PAUSE_ROLE", + outputs: [ + { + name: "", + type: "bytes32", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getDepositableEther", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "_account", + type: "address", + }, + ], + name: "sharesOf", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "pauseStaking", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getTotalELRewardsCollected", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + payable: true, + stateMutability: "payable", + type: "fallback", + }, + { + anonymous: false, + inputs: [], + name: "StakingPaused", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "StakingResumed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + name: "maxStakeLimit", + type: "uint256", + }, + { + indexed: false, + name: "stakeLimitIncreasePerBlock", + type: "uint256", + }, + ], + name: "StakingLimitSet", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "StakingLimitRemoved", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "reportTimestamp", + type: "uint256", + }, + { + indexed: false, + name: "preCLValidators", + type: "uint256", + }, + { + indexed: false, + name: "postCLValidators", + type: "uint256", + }, + ], + name: "CLValidatorsUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + name: "depositedValidators", + type: "uint256", + }, + ], + name: "DepositedValidatorsChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "reportTimestamp", + type: "uint256", + }, + { + indexed: false, + name: "preCLBalance", + type: "uint256", + }, + { + indexed: false, + name: "postCLBalance", + type: "uint256", + }, + { + indexed: false, + name: "withdrawalsWithdrawn", + type: "uint256", + }, + { + indexed: false, + name: "executionLayerRewardsWithdrawn", + type: "uint256", + }, + { + indexed: false, + name: "postBufferedEther", + type: "uint256", + }, + ], + name: "ETHDistributed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "reportTimestamp", + type: "uint256", + }, + { + indexed: false, + name: "timeElapsed", + type: "uint256", + }, + { + indexed: false, + name: "preTotalShares", + type: "uint256", + }, + { + indexed: false, + name: "preTotalEther", + type: "uint256", + }, + { + indexed: false, + name: "postTotalShares", + type: "uint256", + }, + { + indexed: false, + name: "postTotalEther", + type: "uint256", + }, + { + indexed: false, + name: "sharesMintedAsFees", + type: "uint256", + }, + ], + name: "TokenRebased", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + name: "lidoLocator", + type: "address", + }, + ], + name: "LidoLocatorSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + name: "amount", + type: "uint256", + }, + ], + name: "ELRewardsReceived", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + name: "amount", + type: "uint256", + }, + ], + name: "WithdrawalsReceived", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "sender", + type: "address", + }, + { + indexed: false, + name: "amount", + type: "uint256", + }, + { + indexed: false, + name: "referral", + type: "address", + }, + ], + name: "Submitted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + name: "amount", + type: "uint256", + }, + ], + name: "Unbuffered", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "executor", + type: "address", + }, + { + indexed: false, + name: "script", + type: "bytes", + }, + { + indexed: false, + name: "input", + type: "bytes", + }, + { + indexed: false, + name: "returnData", + type: "bytes", + }, + ], + name: "ScriptResult", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "vault", + type: "address", + }, + { + indexed: true, + name: "token", + type: "address", + }, + { + indexed: false, + name: "amount", + type: "uint256", + }, + ], + name: "RecoverToVault", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + name: "eip712StETH", + type: "address", + }, + ], + name: "EIP712StETHInitialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "from", + type: "address", + }, + { + indexed: true, + name: "to", + type: "address", + }, + { + indexed: false, + name: "sharesValue", + type: "uint256", + }, + ], + name: "TransferShares", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "account", + type: "address", + }, + { + indexed: false, + name: "preRebaseTokenAmount", + type: "uint256", + }, + { + indexed: false, + name: "postRebaseTokenAmount", + type: "uint256", + }, + { + indexed: false, + name: "sharesAmount", + type: "uint256", + }, + ], + name: "SharesBurnt", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "Stopped", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "Resumed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "from", + type: "address", + }, + { + indexed: true, + name: "to", + type: "address", + }, + { + indexed: false, + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "owner", + type: "address", + }, + { + indexed: true, + name: "spender", + type: "address", + }, + { + indexed: false, + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + name: "version", + type: "uint256", + }, + ], + name: "ContractVersionSet", + type: "event", + }, +] as const; diff --git a/services/decoder/protocols/lido/abis/withdrawal-queue.abi.ts b/services/decoder/protocols/lido/abis/withdrawal-queue.abi.ts new file mode 100644 index 0000000..e508a08 --- /dev/null +++ b/services/decoder/protocols/lido/abis/withdrawal-queue.abi.ts @@ -0,0 +1,1501 @@ +export const withdrawalQueueABI = [ + { + inputs: [ + { internalType: "address", name: "_wstETH", type: "address" }, + { internalType: "string", name: "_name", type: "string" }, + { internalType: "string", name: "_symbol", type: "string" }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { inputs: [], name: "AdminZeroAddress", type: "error" }, + { inputs: [], name: "ApprovalToOwner", type: "error" }, + { inputs: [], name: "ApproveToCaller", type: "error" }, + { + inputs: [ + { + internalType: "uint256", + name: "_firstArrayLength", + type: "uint256", + }, + { + internalType: "uint256", + name: "_secondArrayLength", + type: "uint256", + }, + ], + name: "ArraysLengthMismatch", + type: "error", + }, + { inputs: [], name: "BatchesAreNotSorted", type: "error" }, + { + inputs: [], + name: "CantSendValueRecipientMayHaveReverted", + type: "error", + }, + { inputs: [], name: "EmptyBatches", type: "error" }, + { + inputs: [], + name: "InvalidContractVersionIncrement", + type: "error", + }, + { + inputs: [{ internalType: "uint256", name: "_hint", type: "uint256" }], + name: "InvalidHint", + type: "error", + }, + { + inputs: [{ internalType: "address", name: "", type: "address" }], + name: "InvalidOwnerAddress", + type: "error", + }, + { inputs: [], name: "InvalidReportTimestamp", type: "error" }, + { + inputs: [ + { + internalType: "uint256", + name: "_requestId", + type: "uint256", + }, + ], + name: "InvalidRequestId", + type: "error", + }, + { + inputs: [ + { internalType: "uint256", name: "startId", type: "uint256" }, + { internalType: "uint256", name: "endId", type: "uint256" }, + ], + name: "InvalidRequestIdRange", + type: "error", + }, + { inputs: [], name: "InvalidState", type: "error" }, + { inputs: [], name: "NonZeroContractVersionOnInit", type: "error" }, + { inputs: [], name: "NotEnoughEther", type: "error" }, + { + inputs: [ + { internalType: "address", name: "_sender", type: "address" }, + { internalType: "address", name: "_owner", type: "address" }, + ], + name: "NotOwner", + type: "error", + }, + { + inputs: [{ internalType: "address", name: "sender", type: "address" }], + name: "NotOwnerOrApproved", + type: "error", + }, + { + inputs: [{ internalType: "address", name: "sender", type: "address" }], + name: "NotOwnerOrApprovedForAll", + type: "error", + }, + { inputs: [], name: "PauseUntilMustBeInFuture", type: "error" }, + { inputs: [], name: "PausedExpected", type: "error" }, + { + inputs: [ + { + internalType: "uint256", + name: "_requestId", + type: "uint256", + }, + ], + name: "RequestAlreadyClaimed", + type: "error", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_amountOfStETH", + type: "uint256", + }, + ], + name: "RequestAmountTooLarge", + type: "error", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_amountOfStETH", + type: "uint256", + }, + ], + name: "RequestAmountTooSmall", + type: "error", + }, + { inputs: [], name: "RequestIdsNotSorted", type: "error" }, + { + inputs: [ + { + internalType: "uint256", + name: "_requestId", + type: "uint256", + }, + ], + name: "RequestNotFoundOrNotFinalized", + type: "error", + }, + { inputs: [], name: "ResumedExpected", type: "error" }, + { + inputs: [{ internalType: "string", name: "str", type: "string" }], + name: "StringTooLong", + type: "error", + }, + { + inputs: [ + { internalType: "uint256", name: "sent", type: "uint256" }, + { + internalType: "uint256", + name: "maxExpected", + type: "uint256", + }, + ], + name: "TooMuchEtherToFinalize", + type: "error", + }, + { + inputs: [ + { internalType: "address", name: "from", type: "address" }, + { + internalType: "address", + name: "realOwner", + type: "address", + }, + ], + name: "TransferFromIncorrectOwner", + type: "error", + }, + { inputs: [], name: "TransferFromZeroAddress", type: "error" }, + { + inputs: [{ internalType: "address", name: "", type: "address" }], + name: "TransferToNonIERC721Receiver", + type: "error", + }, + { inputs: [], name: "TransferToThemselves", type: "error" }, + { inputs: [], name: "TransferToZeroAddress", type: "error" }, + { + inputs: [ + { + internalType: "uint256", + name: "expected", + type: "uint256", + }, + { internalType: "uint256", name: "received", type: "uint256" }, + ], + name: "UnexpectedContractVersion", + type: "error", + }, + { inputs: [], name: "ZeroAmountOfETH", type: "error" }, + { inputs: [], name: "ZeroMetadata", type: "error" }, + { inputs: [], name: "ZeroPauseDuration", type: "error" }, + { inputs: [], name: "ZeroRecipient", type: "error" }, + { inputs: [], name: "ZeroShareRate", type: "error" }, + { inputs: [], name: "ZeroTimestamp", type: "error" }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "approved", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "operator", + type: "address", + }, + { + indexed: false, + internalType: "bool", + name: "approved", + type: "bool", + }, + ], + name: "ApprovalForAll", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "string", + name: "baseURI", + type: "string", + }, + ], + name: "BaseURISet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "_fromTokenId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_toTokenId", + type: "uint256", + }, + ], + name: "BatchMetadataUpdate", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "BunkerModeDisabled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "_sinceTimestamp", + type: "uint256", + }, + ], + name: "BunkerModeEnabled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "version", + type: "uint256", + }, + ], + name: "ContractVersionSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "_admin", + type: "address", + }, + ], + name: "InitializedV1", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "_tokenId", + type: "uint256", + }, + ], + name: "MetadataUpdate", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "nftDescriptorAddress", + type: "address", + }, + ], + name: "NftDescriptorAddressSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "duration", + type: "uint256", + }, + ], + name: "Paused", + type: "event", + }, + { anonymous: false, inputs: [], name: "Resumed", type: "event" }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "previousAdminRole", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "newAdminRole", + type: "bytes32", + }, + ], + name: "RoleAdminChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleGranted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleRevoked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "requestId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "receiver", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amountOfETH", + type: "uint256", + }, + ], + name: "WithdrawalClaimed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "requestId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "requestor", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amountOfStETH", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amountOfShares", + type: "uint256", + }, + ], + name: "WithdrawalRequested", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "from", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "to", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amountOfETHLocked", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "sharesToBurn", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, + ], + name: "WithdrawalsFinalized", + type: "event", + }, + { + inputs: [], + name: "BUNKER_MODE_DISABLED_TIMESTAMP", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "DEFAULT_ADMIN_ROLE", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "FINALIZE_ROLE", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MANAGE_TOKEN_URI_ROLE", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MAX_BATCHES_LENGTH", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MAX_STETH_WITHDRAWAL_AMOUNT", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MIN_STETH_WITHDRAWAL_AMOUNT", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "ORACLE_ROLE", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "PAUSE_INFINITELY", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "PAUSE_ROLE", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "RESUME_ROLE", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "STETH", + outputs: [ + { internalType: "contract IStETH", name: "", type: "address" }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "WSTETH", + outputs: [ + { + internalType: "contract IWstETH", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_to", type: "address" }, + { + internalType: "uint256", + name: "_requestId", + type: "uint256", + }, + ], + name: "approve", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_owner", type: "address" }], + name: "balanceOf", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "bunkerModeSinceTimestamp", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_maxShareRate", + type: "uint256", + }, + { + internalType: "uint256", + name: "_maxTimestamp", + type: "uint256", + }, + { + internalType: "uint256", + name: "_maxRequestsPerCall", + type: "uint256", + }, + { + components: [ + { + internalType: "uint256", + name: "remainingEthBudget", + type: "uint256", + }, + { + internalType: "bool", + name: "finished", + type: "bool", + }, + { + internalType: "uint256[36]", + name: "batches", + type: "uint256[36]", + }, + { + internalType: "uint256", + name: "batchesLength", + type: "uint256", + }, + ], + internalType: + "struct WithdrawalQueueBase.BatchesCalculationState", + name: "_state", + type: "tuple", + }, + ], + name: "calculateFinalizationBatches", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "remainingEthBudget", + type: "uint256", + }, + { + internalType: "bool", + name: "finished", + type: "bool", + }, + { + internalType: "uint256[36]", + name: "batches", + type: "uint256[36]", + }, + { + internalType: "uint256", + name: "batchesLength", + type: "uint256", + }, + ], + internalType: + "struct WithdrawalQueueBase.BatchesCalculationState", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_requestId", + type: "uint256", + }, + ], + name: "claimWithdrawal", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_requestIds", + type: "uint256[]", + }, + { + internalType: "uint256[]", + name: "_hints", + type: "uint256[]", + }, + ], + name: "claimWithdrawals", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_requestIds", + type: "uint256[]", + }, + { + internalType: "uint256[]", + name: "_hints", + type: "uint256[]", + }, + { + internalType: "address", + name: "_recipient", + type: "address", + }, + ], + name: "claimWithdrawalsTo", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_lastRequestIdToBeFinalized", + type: "uint256", + }, + { + internalType: "uint256", + name: "_maxShareRate", + type: "uint256", + }, + ], + name: "finalize", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_requestIds", + type: "uint256[]", + }, + { + internalType: "uint256", + name: "_firstIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_lastIndex", + type: "uint256", + }, + ], + name: "findCheckpointHints", + outputs: [ + { + internalType: "uint256[]", + name: "hintIds", + type: "uint256[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_requestId", + type: "uint256", + }, + ], + name: "getApproved", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getBaseURI", + outputs: [{ internalType: "string", name: "", type: "string" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_requestIds", + type: "uint256[]", + }, + { + internalType: "uint256[]", + name: "_hints", + type: "uint256[]", + }, + ], + name: "getClaimableEther", + outputs: [ + { + internalType: "uint256[]", + name: "claimableEthValues", + type: "uint256[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getContractVersion", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getLastCheckpointIndex", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getLastFinalizedRequestId", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getLastRequestId", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getLockedEtherAmount", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getNFTDescriptorAddress", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getResumeSinceTimestamp", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "bytes32", name: "role", type: "bytes32" }], + name: "getRoleAdmin", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "bytes32", name: "role", type: "bytes32" }, + { internalType: "uint256", name: "index", type: "uint256" }, + ], + name: "getRoleMember", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "bytes32", name: "role", type: "bytes32" }], + name: "getRoleMemberCount", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_owner", type: "address" }], + name: "getWithdrawalRequests", + outputs: [ + { + internalType: "uint256[]", + name: "requestsIds", + type: "uint256[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_requestIds", + type: "uint256[]", + }, + ], + name: "getWithdrawalStatus", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "amountOfStETH", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountOfShares", + type: "uint256", + }, + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, + { + internalType: "bool", + name: "isFinalized", + type: "bool", + }, + { + internalType: "bool", + name: "isClaimed", + type: "bool", + }, + ], + internalType: + "struct WithdrawalQueueBase.WithdrawalRequestStatus[]", + name: "statuses", + type: "tuple[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "bytes32", name: "role", type: "bytes32" }, + { internalType: "address", name: "account", type: "address" }, + ], + name: "grantRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "bytes32", name: "role", type: "bytes32" }, + { internalType: "address", name: "account", type: "address" }, + ], + name: "hasRole", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_admin", type: "address" }], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_owner", type: "address" }, + { + internalType: "address", + name: "_operator", + type: "address", + }, + ], + name: "isApprovedForAll", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "isBunkerModeActive", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "isPaused", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [{ internalType: "string", name: "", type: "string" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bool", + name: "_isBunkerModeNow", + type: "bool", + }, + { + internalType: "uint256", + name: "_bunkerStartTimestamp", + type: "uint256", + }, + { + internalType: "uint256", + name: "_currentReportTimestamp", + type: "uint256", + }, + ], + name: "onOracleReport", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_requestId", + type: "uint256", + }, + ], + name: "ownerOf", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_duration", + type: "uint256", + }, + ], + name: "pauseFor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_pauseUntilInclusive", + type: "uint256", + }, + ], + name: "pauseUntil", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_batches", + type: "uint256[]", + }, + { + internalType: "uint256", + name: "_maxShareRate", + type: "uint256", + }, + ], + name: "prefinalize", + outputs: [ + { + internalType: "uint256", + name: "ethToLock", + type: "uint256", + }, + { + internalType: "uint256", + name: "sharesToBurn", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "bytes32", name: "role", type: "bytes32" }, + { internalType: "address", name: "account", type: "address" }, + ], + name: "renounceRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_amounts", + type: "uint256[]", + }, + { internalType: "address", name: "_owner", type: "address" }, + ], + name: "requestWithdrawals", + outputs: [ + { + internalType: "uint256[]", + name: "requestIds", + type: "uint256[]", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_amounts", + type: "uint256[]", + }, + { internalType: "address", name: "_owner", type: "address" }, + { + components: [ + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { internalType: "uint8", name: "v", type: "uint8" }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + internalType: "struct WithdrawalQueue.PermitInput", + name: "_permit", + type: "tuple", + }, + ], + name: "requestWithdrawalsWithPermit", + outputs: [ + { + internalType: "uint256[]", + name: "requestIds", + type: "uint256[]", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_amounts", + type: "uint256[]", + }, + { internalType: "address", name: "_owner", type: "address" }, + ], + name: "requestWithdrawalsWstETH", + outputs: [ + { + internalType: "uint256[]", + name: "requestIds", + type: "uint256[]", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "_amounts", + type: "uint256[]", + }, + { internalType: "address", name: "_owner", type: "address" }, + { + components: [ + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { internalType: "uint8", name: "v", type: "uint8" }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + internalType: "struct WithdrawalQueue.PermitInput", + name: "_permit", + type: "tuple", + }, + ], + name: "requestWithdrawalsWstETHWithPermit", + outputs: [ + { + internalType: "uint256[]", + name: "requestIds", + type: "uint256[]", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "resume", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "bytes32", name: "role", type: "bytes32" }, + { internalType: "address", name: "account", type: "address" }, + ], + name: "revokeRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_from", type: "address" }, + { internalType: "address", name: "_to", type: "address" }, + { + internalType: "uint256", + name: "_requestId", + type: "uint256", + }, + ], + name: "safeTransferFrom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_from", type: "address" }, + { internalType: "address", name: "_to", type: "address" }, + { + internalType: "uint256", + name: "_requestId", + type: "uint256", + }, + { internalType: "bytes", name: "_data", type: "bytes" }, + ], + name: "safeTransferFrom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_operator", + type: "address", + }, + { internalType: "bool", name: "_approved", type: "bool" }, + ], + name: "setApprovalForAll", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "string", name: "_baseURI", type: "string" }], + name: "setBaseURI", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_nftDescriptorAddress", + type: "address", + }, + ], + name: "setNFTDescriptorAddress", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [{ internalType: "string", name: "", type: "string" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_requestId", + type: "uint256", + }, + ], + name: "tokenURI", + outputs: [{ internalType: "string", name: "", type: "string" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_from", type: "address" }, + { internalType: "address", name: "_to", type: "address" }, + { + internalType: "uint256", + name: "_requestId", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "unfinalizedRequestNumber", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "unfinalizedStETH", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, +] as const; diff --git a/services/decoder/protocols/lido/lido.decoders.ts b/services/decoder/protocols/lido/lido.decoders.ts index 9457da5..0eb1094 100644 --- a/services/decoder/protocols/lido/lido.decoders.ts +++ b/services/decoder/protocols/lido/lido.decoders.ts @@ -1,20 +1,20 @@ +import { prettifyCurrency } from "@covalenthq/client-sdk"; +import { decodeEventLog, type Abi } from "viem"; +import { timestampParser } from "../../../../utils/functions"; import { GoldRushDecoder } from "../../decoder"; -import type { EventDetails, EventTokens } from "../../decoder.types"; -import { type EventType } from "../../decoder.types"; import { DECODED_ACTION, DECODED_EVENT_CATEGORY, } from "../../decoder.constants"; -import { decodeEventLog, type Abi } from "viem"; -import ABI from "./abis/lido.steth.abi.json"; -import WithdrawalABI from "./abis/lido.withdrawalQueue.abi.json"; -import { prettifyCurrency } from "@covalenthq/client-sdk"; -import { timestampParser } from "../../../../utils/functions"; +import type { EventDetails, EventTokens } from "../../decoder.types"; +import { type EventType } from "../../decoder.types"; +import { stethABI } from "./abis/steth.abi"; +import { withdrawalQueueABI } from "./abis/withdrawal-queue.abi"; GoldRushDecoder.on( "lido:TransferShares", ["eth-mainnet"], - ABI as Abi, + stethABI as Abi, async ( log_event, tx, @@ -25,18 +25,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: ABI, + abi: stethABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "TransferShares", - }) as { - eventName: "TransferShares"; - args: { - from: string; - to: string; - sharesValue: bigint; - }; - }; + }); const details: EventDetails = [ { @@ -73,7 +66,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "lido:Submitted", ["eth-mainnet"], - ABI as Abi, + stethABI as Abi, async ( log_event, tx, @@ -84,18 +77,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: ABI, + abi: stethABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "Submitted", - }) as { - eventName: "Submitted"; - args: { - sender: string; - amount: bigint; - referral: string; - }; - }; + }); const details: EventDetails = [ { @@ -146,7 +132,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "lido:TokenRebased", ["eth-mainnet"], - ABI as Abi, + stethABI as Abi, async ( log_event, tx, @@ -157,22 +143,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: ABI, + abi: stethABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "TokenRebased", - }) as { - eventName: "TokenRebased"; - args: { - reportTimestamp: bigint; - timeElapsed: bigint; - preTotalShares: bigint; - preTotalEther: bigint; - postTotalShares: bigint; - postTotalEther: bigint; - sharesMintedAsFees: bigint; - }; - }; + }); const details: EventDetails = [ { @@ -256,7 +231,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "lido:SharesBurnt", ["eth-mainnet"], - ABI as Abi, + stethABI as Abi, async ( log_event, tx, @@ -267,19 +242,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: ABI, + abi: stethABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "SharesBurnt", - }) as { - eventName: "SharesBurnt"; - args: { - account: string; - preRebaseTokenAmount: bigint; - postRebaseTokenAmount: bigint; - sharesAmount: bigint; - }; - }; + }); const details: EventDetails = [ { @@ -358,7 +325,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "lido:ETHDistributed", ["eth-mainnet"], - ABI as Abi, + stethABI as Abi, async ( log_event, tx, @@ -369,21 +336,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: ABI, + abi: stethABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "ETHDistributed", - }) as { - eventName: "ETHDistributed"; - args: { - reportTimestamp: bigint; - preCLBalance: bigint; - postCLBalance: bigint; - withdrawalsWithdrawn: bigint; - executionLayerRewardsWithdrawn: bigint; - postBufferedEther: bigint; - }; - }; + }); const details: EventDetails = [ { @@ -492,7 +449,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "lido:WithdrawalsReceived", ["eth-mainnet"], - ABI as Abi, + stethABI as Abi, async ( log_event, tx, @@ -503,16 +460,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: ABI, + abi: stethABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "WithdrawalsReceived", - }) as { - eventName: "WithdrawalsReceived"; - args: { - amount: bigint; - }; - }; + }); const tokens: EventTokens = [ { @@ -549,7 +501,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "lido:ELRewardsReceived", ["eth-mainnet"], - ABI as Abi, + stethABI as Abi, async ( log_event, tx, @@ -560,16 +512,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: ABI, + abi: stethABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "ELRewardsReceived", - }) as { - eventName: "ELRewardsReceived"; - args: { - amount: bigint; - }; - }; + }); const tokens: EventTokens = [ { @@ -606,7 +553,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "lido:CLValidatorsUpdated", ["eth-mainnet"], - ABI as Abi, + stethABI as Abi, async ( log_event, tx, @@ -617,17 +564,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: ABI, + abi: stethABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "CLValidatorsUpdated", - }) as { - eventName: "CLValidatorsUpdated"; - args: { - preCLValidators: bigint; - postCLValidators: bigint; - }; - }; + }); const details: EventDetails = [ { @@ -659,7 +600,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "lido:WithdrawalRequested", ["eth-mainnet"], - WithdrawalABI as Abi, + withdrawalQueueABI as Abi, async ( log_event, tx, @@ -670,20 +611,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: WithdrawalABI, + abi: withdrawalQueueABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "WithdrawalRequested", - }) as { - eventName: "WithdrawalRequested"; - args: { - requestId: bigint; - requestor: string; - owner: string; - amountOfStETH: bigint; - amountOfShares: bigint; - }; - }; + }); const details: EventDetails = [ { @@ -757,7 +689,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "lido:WithdrawalClaimed", ["eth-mainnet"], - WithdrawalABI as Abi, + withdrawalQueueABI as Abi, async ( log_event, tx, @@ -768,19 +700,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: WithdrawalABI, + abi: withdrawalQueueABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "WithdrawalClaimed", - }) as { - eventName: "WithdrawalClaimed"; - args: { - requestId: bigint; - owner: string; - receiver: string; - amountOfETH: bigint; - }; - }; + }); const details: EventDetails = [ { @@ -836,7 +760,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "lido:BatchMetadataUpdate", ["eth-mainnet"], - WithdrawalABI as Abi, + withdrawalQueueABI as Abi, async ( log_event, tx, @@ -847,17 +771,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: WithdrawalABI, + abi: withdrawalQueueABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "BatchMetadataUpdate", - }) as { - eventName: "BatchMetadataUpdate"; - args: { - _fromTokenId: bigint; - _toTokenId: bigint; - }; - }; + }); const details: EventDetails = [ { @@ -889,7 +807,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "lido:WithdrawalsFinalized", ["eth-mainnet"], - WithdrawalABI as Abi, + withdrawalQueueABI as Abi, async ( log_event, tx, @@ -900,20 +818,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: WithdrawalABI, + abi: withdrawalQueueABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "WithdrawalsFinalized", - }) as { - eventName: "WithdrawalsFinalized"; - args: { - from: bigint; - to: bigint; - amountOfETHLocked: bigint; - sharesToBurn: bigint; - timestamp: bigint; - }; - }; + }); const details: EventDetails = [ { diff --git a/services/decoder/protocols/opensea/abis/seaport-1.1.abi.json b/services/decoder/protocols/opensea/abis/seaport-1.1.abi.json deleted file mode 100644 index 29f8a7a..0000000 --- a/services/decoder/protocols/opensea/abis/seaport-1.1.abi.json +++ /dev/null @@ -1,2405 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "conduitController", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { "inputs": [], "name": "BadContractSignature", "type": "error" }, - { "inputs": [], "name": "BadFraction", "type": "error" }, - { - "inputs": [ - { "internalType": "address", "name": "token", "type": "address" }, - { "internalType": "address", "name": "from", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "BadReturnValueFromERC20OnTransfer", - "type": "error" - }, - { - "inputs": [{ "internalType": "uint8", "name": "v", "type": "uint8" }], - "name": "BadSignatureV", - "type": "error" - }, - { - "inputs": [], - "name": "ConsiderationCriteriaResolverOutOfRange", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "orderIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "considerationIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "shortfallAmount", - "type": "uint256" - } - ], - "name": "ConsiderationNotMet", - "type": "error" - }, - { "inputs": [], "name": "CriteriaNotEnabledForItem", "type": "error" }, - { - "inputs": [ - { "internalType": "address", "name": "token", "type": "address" }, - { "internalType": "address", "name": "from", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { - "internalType": "uint256[]", - "name": "identifiers", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - } - ], - "name": "ERC1155BatchTransferGenericFailure", - "type": "error" - }, - { - "inputs": [ - { "internalType": "address", "name": "account", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "EtherTransferGenericFailure", - "type": "error" - }, - { "inputs": [], "name": "InexactFraction", "type": "error" }, - { "inputs": [], "name": "InsufficientEtherSupplied", "type": "error" }, - { - "inputs": [], - "name": "Invalid1155BatchTransferEncoding", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidBasicOrderParameterEncoding", - "type": "error" - }, - { - "inputs": [ - { "internalType": "address", "name": "conduit", "type": "address" } - ], - "name": "InvalidCallToConduit", - "type": "error" - }, - { "inputs": [], "name": "InvalidCanceller", "type": "error" }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "conduitKey", - "type": "bytes32" - }, - { "internalType": "address", "name": "conduit", "type": "address" } - ], - "name": "InvalidConduit", - "type": "error" - }, - { "inputs": [], "name": "InvalidERC721TransferAmount", "type": "error" }, - { - "inputs": [], - "name": "InvalidFulfillmentComponentData", - "type": "error" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "InvalidMsgValue", - "type": "error" - }, - { "inputs": [], "name": "InvalidNativeOfferItem", "type": "error" }, - { "inputs": [], "name": "InvalidProof", "type": "error" }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "orderHash", - "type": "bytes32" - } - ], - "name": "InvalidRestrictedOrder", - "type": "error" - }, - { "inputs": [], "name": "InvalidSignature", "type": "error" }, - { "inputs": [], "name": "InvalidSigner", "type": "error" }, - { "inputs": [], "name": "InvalidTime", "type": "error" }, - { - "inputs": [], - "name": "MismatchedFulfillmentOfferAndConsiderationComponents", - "type": "error" - }, - { - "inputs": [ - { "internalType": "enum Side", "name": "side", "type": "uint8" } - ], - "name": "MissingFulfillmentComponentOnAggregation", - "type": "error" - }, - { "inputs": [], "name": "MissingItemAmount", "type": "error" }, - { - "inputs": [], - "name": "MissingOriginalConsiderationItems", - "type": "error" - }, - { - "inputs": [ - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "NoContract", - "type": "error" - }, - { "inputs": [], "name": "NoReentrantCalls", "type": "error" }, - { "inputs": [], "name": "NoSpecifiedOrdersAvailable", "type": "error" }, - { - "inputs": [], - "name": "OfferAndConsiderationRequiredOnFulfillment", - "type": "error" - }, - { - "inputs": [], - "name": "OfferCriteriaResolverOutOfRange", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "orderHash", - "type": "bytes32" - } - ], - "name": "OrderAlreadyFilled", - "type": "error" - }, - { - "inputs": [], - "name": "OrderCriteriaResolverOutOfRange", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "orderHash", - "type": "bytes32" - } - ], - "name": "OrderIsCancelled", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "orderHash", - "type": "bytes32" - } - ], - "name": "OrderPartiallyFilled", - "type": "error" - }, - { "inputs": [], "name": "PartialFillsNotEnabledForOrder", "type": "error" }, - { - "inputs": [ - { "internalType": "address", "name": "token", "type": "address" }, - { "internalType": "address", "name": "from", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { - "internalType": "uint256", - "name": "identifier", - "type": "uint256" - }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "TokenTransferGenericFailure", - "type": "error" - }, - { - "inputs": [], - "name": "UnresolvedConsiderationCriteria", - "type": "error" - }, - { "inputs": [], "name": "UnresolvedOfferCriteria", "type": "error" }, - { "inputs": [], "name": "UnusedItemParameters", "type": "error" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "newCounter", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "offerer", - "type": "address" - } - ], - "name": "CounterIncremented", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "orderHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "offerer", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "zone", - "type": "address" - } - ], - "name": "OrderCancelled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "orderHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "offerer", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "zone", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "components": [ - { - "internalType": "enum ItemType", - "name": "itemType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "identifier", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "indexed": false, - "internalType": "struct SpentItem[]", - "name": "offer", - "type": "tuple[]" - }, - { - "components": [ - { - "internalType": "enum ItemType", - "name": "itemType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "identifier", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "recipient", - "type": "address" - } - ], - "indexed": false, - "internalType": "struct ReceivedItem[]", - "name": "consideration", - "type": "tuple[]" - } - ], - "name": "OrderFulfilled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "orderHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "offerer", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "zone", - "type": "address" - } - ], - "name": "OrderValidated", - "type": "event" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "offerer", - "type": "address" - }, - { - "internalType": "address", - "name": "zone", - "type": "address" - }, - { - "components": [ - { - "internalType": "enum ItemType", - "name": "itemType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" - } - ], - "internalType": "struct OfferItem[]", - "name": "offer", - "type": "tuple[]" - }, - { - "components": [ - { - "internalType": "enum ItemType", - "name": "itemType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "recipient", - "type": "address" - } - ], - "internalType": "struct ConsiderationItem[]", - "name": "consideration", - "type": "tuple[]" - }, - { - "internalType": "enum OrderType", - "name": "orderType", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "startTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endTime", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "zoneHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "conduitKey", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "counter", - "type": "uint256" - } - ], - "internalType": "struct OrderComponents[]", - "name": "orders", - "type": "tuple[]" - } - ], - "name": "cancel", - "outputs": [ - { "internalType": "bool", "name": "cancelled", "type": "bool" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "address", - "name": "offerer", - "type": "address" - }, - { - "internalType": "address", - "name": "zone", - "type": "address" - }, - { - "components": [ - { - "internalType": "enum ItemType", - "name": "itemType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" - } - ], - "internalType": "struct OfferItem[]", - "name": "offer", - "type": "tuple[]" - }, - { - "components": [ - { - "internalType": "enum ItemType", - "name": "itemType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "recipient", - "type": "address" - } - ], - "internalType": "struct ConsiderationItem[]", - "name": "consideration", - "type": "tuple[]" - }, - { - "internalType": "enum OrderType", - "name": "orderType", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "startTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endTime", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "zoneHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "conduitKey", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "totalOriginalConsiderationItems", - "type": "uint256" - } - ], - "internalType": "struct OrderParameters", - "name": "parameters", - "type": "tuple" - }, - { - "internalType": "uint120", - "name": "numerator", - "type": "uint120" - }, - { - "internalType": "uint120", - "name": "denominator", - "type": "uint120" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "internalType": "struct AdvancedOrder", - "name": "advancedOrder", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "orderIndex", - "type": "uint256" - }, - { - "internalType": "enum Side", - "name": "side", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "identifier", - "type": "uint256" - }, - { - "internalType": "bytes32[]", - "name": "criteriaProof", - "type": "bytes32[]" - } - ], - "internalType": "struct CriteriaResolver[]", - "name": "criteriaResolvers", - "type": "tuple[]" - }, - { - "internalType": "bytes32", - "name": "fulfillerConduitKey", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "name": "fulfillAdvancedOrder", - "outputs": [ - { "internalType": "bool", "name": "fulfilled", "type": "bool" } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "address", - "name": "offerer", - "type": "address" - }, - { - "internalType": "address", - "name": "zone", - "type": "address" - }, - { - "components": [ - { - "internalType": "enum ItemType", - "name": "itemType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" - } - ], - "internalType": "struct OfferItem[]", - "name": "offer", - "type": "tuple[]" - }, - { - "components": [ - { - "internalType": "enum ItemType", - "name": "itemType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "recipient", - "type": "address" - } - ], - "internalType": "struct ConsiderationItem[]", - "name": "consideration", - "type": "tuple[]" - }, - { - "internalType": "enum OrderType", - "name": "orderType", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "startTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endTime", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "zoneHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "conduitKey", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "totalOriginalConsiderationItems", - "type": "uint256" - } - ], - "internalType": "struct OrderParameters", - "name": "parameters", - "type": "tuple" - }, - { - "internalType": "uint120", - "name": "numerator", - "type": "uint120" - }, - { - "internalType": "uint120", - "name": "denominator", - "type": "uint120" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "internalType": "struct AdvancedOrder[]", - "name": "advancedOrders", - "type": "tuple[]" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "orderIndex", - "type": "uint256" - }, - { - "internalType": "enum Side", - "name": "side", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "identifier", - "type": "uint256" - }, - { - "internalType": "bytes32[]", - "name": "criteriaProof", - "type": "bytes32[]" - } - ], - "internalType": "struct CriteriaResolver[]", - "name": "criteriaResolvers", - "type": "tuple[]" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "orderIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "itemIndex", - "type": "uint256" - } - ], - "internalType": "struct FulfillmentComponent[][]", - "name": "offerFulfillments", - "type": "tuple[][]" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "orderIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "itemIndex", - "type": "uint256" - } - ], - "internalType": "struct FulfillmentComponent[][]", - "name": "considerationFulfillments", - "type": "tuple[][]" - }, - { - "internalType": "bytes32", - "name": "fulfillerConduitKey", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "maximumFulfilled", - "type": "uint256" - } - ], - "name": "fulfillAvailableAdvancedOrders", - "outputs": [ - { - "internalType": "bool[]", - "name": "availableOrders", - "type": "bool[]" - }, - { - "components": [ - { - "components": [ - { - "internalType": "enum ItemType", - "name": "itemType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "identifier", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "recipient", - "type": "address" - } - ], - "internalType": "struct ReceivedItem", - "name": "item", - "type": "tuple" - }, - { - "internalType": "address", - "name": "offerer", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "conduitKey", - "type": "bytes32" - } - ], - "internalType": "struct Execution[]", - "name": "executions", - "type": "tuple[]" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "address", - "name": "offerer", - "type": "address" - }, - { - "internalType": "address", - "name": "zone", - "type": "address" - }, - { - "components": [ - { - "internalType": "enum ItemType", - "name": "itemType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" - } - ], - "internalType": "struct OfferItem[]", - "name": "offer", - "type": "tuple[]" - }, - { - "components": [ - { - "internalType": "enum ItemType", - "name": "itemType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "recipient", - "type": "address" - } - ], - "internalType": "struct ConsiderationItem[]", - "name": "consideration", - "type": "tuple[]" - }, - { - "internalType": "enum OrderType", - "name": "orderType", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "startTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endTime", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "zoneHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "conduitKey", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "totalOriginalConsiderationItems", - "type": "uint256" - } - ], - "internalType": "struct OrderParameters", - "name": "parameters", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - } - ], - "internalType": "struct Order[]", - "name": "orders", - "type": "tuple[]" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "orderIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "itemIndex", - "type": "uint256" - } - ], - "internalType": "struct FulfillmentComponent[][]", - "name": "offerFulfillments", - "type": "tuple[][]" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "orderIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "itemIndex", - "type": "uint256" - } - ], - "internalType": "struct FulfillmentComponent[][]", - "name": "considerationFulfillments", - "type": "tuple[][]" - }, - { - "internalType": "bytes32", - "name": "fulfillerConduitKey", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "maximumFulfilled", - "type": "uint256" - } - ], - "name": "fulfillAvailableOrders", - "outputs": [ - { - "internalType": "bool[]", - "name": "availableOrders", - "type": "bool[]" - }, - { - "components": [ - { - "components": [ - { - "internalType": "enum ItemType", - "name": "itemType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "identifier", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "recipient", - "type": "address" - } - ], - "internalType": "struct ReceivedItem", - "name": "item", - "type": "tuple" - }, - { - "internalType": "address", - "name": "offerer", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "conduitKey", - "type": "bytes32" - } - ], - "internalType": "struct Execution[]", - "name": "executions", - "type": "tuple[]" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "considerationToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "considerationIdentifier", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "considerationAmount", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "offerer", - "type": "address" - }, - { - "internalType": "address", - "name": "zone", - "type": "address" - }, - { - "internalType": "address", - "name": "offerToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "offerIdentifier", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "offerAmount", - "type": "uint256" - }, - { - "internalType": "enum BasicOrderType", - "name": "basicOrderType", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "startTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endTime", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "zoneHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "offererConduitKey", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "fulfillerConduitKey", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "totalOriginalAdditionalRecipients", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "recipient", - "type": "address" - } - ], - "internalType": "struct AdditionalRecipient[]", - "name": "additionalRecipients", - "type": "tuple[]" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - } - ], - "internalType": "struct BasicOrderParameters", - "name": "parameters", - "type": "tuple" - } - ], - "name": "fulfillBasicOrder", - "outputs": [ - { "internalType": "bool", "name": "fulfilled", "type": "bool" } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "address", - "name": "offerer", - "type": "address" - }, - { - "internalType": "address", - "name": "zone", - "type": "address" - }, - { - "components": [ - { - "internalType": "enum ItemType", - "name": "itemType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" - } - ], - "internalType": "struct OfferItem[]", - "name": "offer", - "type": "tuple[]" - }, - { - "components": [ - { - "internalType": "enum ItemType", - "name": "itemType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "recipient", - "type": "address" - } - ], - "internalType": "struct ConsiderationItem[]", - "name": "consideration", - "type": "tuple[]" - }, - { - "internalType": "enum OrderType", - "name": "orderType", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "startTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endTime", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "zoneHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "conduitKey", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "totalOriginalConsiderationItems", - "type": "uint256" - } - ], - "internalType": "struct OrderParameters", - "name": "parameters", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - } - ], - "internalType": "struct Order", - "name": "order", - "type": "tuple" - }, - { - "internalType": "bytes32", - "name": "fulfillerConduitKey", - "type": "bytes32" - } - ], - "name": "fulfillOrder", - "outputs": [ - { "internalType": "bool", "name": "fulfilled", "type": "bool" } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "offerer", "type": "address" } - ], - "name": "getCounter", - "outputs": [ - { "internalType": "uint256", "name": "counter", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "offerer", - "type": "address" - }, - { - "internalType": "address", - "name": "zone", - "type": "address" - }, - { - "components": [ - { - "internalType": "enum ItemType", - "name": "itemType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" - } - ], - "internalType": "struct OfferItem[]", - "name": "offer", - "type": "tuple[]" - }, - { - "components": [ - { - "internalType": "enum ItemType", - "name": "itemType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "recipient", - "type": "address" - } - ], - "internalType": "struct ConsiderationItem[]", - "name": "consideration", - "type": "tuple[]" - }, - { - "internalType": "enum OrderType", - "name": "orderType", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "startTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endTime", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "zoneHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "conduitKey", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "counter", - "type": "uint256" - } - ], - "internalType": "struct OrderComponents", - "name": "order", - "type": "tuple" - } - ], - "name": "getOrderHash", - "outputs": [ - { - "internalType": "bytes32", - "name": "orderHash", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "orderHash", - "type": "bytes32" - } - ], - "name": "getOrderStatus", - "outputs": [ - { "internalType": "bool", "name": "isValidated", "type": "bool" }, - { "internalType": "bool", "name": "isCancelled", "type": "bool" }, - { - "internalType": "uint256", - "name": "totalFilled", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalSize", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "incrementCounter", - "outputs": [ - { - "internalType": "uint256", - "name": "newCounter", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "information", - "outputs": [ - { "internalType": "string", "name": "version", "type": "string" }, - { - "internalType": "bytes32", - "name": "domainSeparator", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "conduitController", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "address", - "name": "offerer", - "type": "address" - }, - { - "internalType": "address", - "name": "zone", - "type": "address" - }, - { - "components": [ - { - "internalType": "enum ItemType", - "name": "itemType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" - } - ], - "internalType": "struct OfferItem[]", - "name": "offer", - "type": "tuple[]" - }, - { - "components": [ - { - "internalType": "enum ItemType", - "name": "itemType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "recipient", - "type": "address" - } - ], - "internalType": "struct ConsiderationItem[]", - "name": "consideration", - "type": "tuple[]" - }, - { - "internalType": "enum OrderType", - "name": "orderType", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "startTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endTime", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "zoneHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "conduitKey", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "totalOriginalConsiderationItems", - "type": "uint256" - } - ], - "internalType": "struct OrderParameters", - "name": "parameters", - "type": "tuple" - }, - { - "internalType": "uint120", - "name": "numerator", - "type": "uint120" - }, - { - "internalType": "uint120", - "name": "denominator", - "type": "uint120" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "internalType": "struct AdvancedOrder[]", - "name": "advancedOrders", - "type": "tuple[]" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "orderIndex", - "type": "uint256" - }, - { - "internalType": "enum Side", - "name": "side", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "identifier", - "type": "uint256" - }, - { - "internalType": "bytes32[]", - "name": "criteriaProof", - "type": "bytes32[]" - } - ], - "internalType": "struct CriteriaResolver[]", - "name": "criteriaResolvers", - "type": "tuple[]" - }, - { - "components": [ - { - "components": [ - { - "internalType": "uint256", - "name": "orderIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "itemIndex", - "type": "uint256" - } - ], - "internalType": "struct FulfillmentComponent[]", - "name": "offerComponents", - "type": "tuple[]" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "orderIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "itemIndex", - "type": "uint256" - } - ], - "internalType": "struct FulfillmentComponent[]", - "name": "considerationComponents", - "type": "tuple[]" - } - ], - "internalType": "struct Fulfillment[]", - "name": "fulfillments", - "type": "tuple[]" - } - ], - "name": "matchAdvancedOrders", - "outputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "enum ItemType", - "name": "itemType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "identifier", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "recipient", - "type": "address" - } - ], - "internalType": "struct ReceivedItem", - "name": "item", - "type": "tuple" - }, - { - "internalType": "address", - "name": "offerer", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "conduitKey", - "type": "bytes32" - } - ], - "internalType": "struct Execution[]", - "name": "executions", - "type": "tuple[]" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "address", - "name": "offerer", - "type": "address" - }, - { - "internalType": "address", - "name": "zone", - "type": "address" - }, - { - "components": [ - { - "internalType": "enum ItemType", - "name": "itemType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" - } - ], - "internalType": "struct OfferItem[]", - "name": "offer", - "type": "tuple[]" - }, - { - "components": [ - { - "internalType": "enum ItemType", - "name": "itemType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "recipient", - "type": "address" - } - ], - "internalType": "struct ConsiderationItem[]", - "name": "consideration", - "type": "tuple[]" - }, - { - "internalType": "enum OrderType", - "name": "orderType", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "startTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endTime", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "zoneHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "conduitKey", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "totalOriginalConsiderationItems", - "type": "uint256" - } - ], - "internalType": "struct OrderParameters", - "name": "parameters", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - } - ], - "internalType": "struct Order[]", - "name": "orders", - "type": "tuple[]" - }, - { - "components": [ - { - "components": [ - { - "internalType": "uint256", - "name": "orderIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "itemIndex", - "type": "uint256" - } - ], - "internalType": "struct FulfillmentComponent[]", - "name": "offerComponents", - "type": "tuple[]" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "orderIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "itemIndex", - "type": "uint256" - } - ], - "internalType": "struct FulfillmentComponent[]", - "name": "considerationComponents", - "type": "tuple[]" - } - ], - "internalType": "struct Fulfillment[]", - "name": "fulfillments", - "type": "tuple[]" - } - ], - "name": "matchOrders", - "outputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "enum ItemType", - "name": "itemType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "identifier", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "recipient", - "type": "address" - } - ], - "internalType": "struct ReceivedItem", - "name": "item", - "type": "tuple" - }, - { - "internalType": "address", - "name": "offerer", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "conduitKey", - "type": "bytes32" - } - ], - "internalType": "struct Execution[]", - "name": "executions", - "type": "tuple[]" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "contractName", - "type": "string" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "address", - "name": "offerer", - "type": "address" - }, - { - "internalType": "address", - "name": "zone", - "type": "address" - }, - { - "components": [ - { - "internalType": "enum ItemType", - "name": "itemType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" - } - ], - "internalType": "struct OfferItem[]", - "name": "offer", - "type": "tuple[]" - }, - { - "components": [ - { - "internalType": "enum ItemType", - "name": "itemType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "identifierOrCriteria", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "startAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endAmount", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "recipient", - "type": "address" - } - ], - "internalType": "struct ConsiderationItem[]", - "name": "consideration", - "type": "tuple[]" - }, - { - "internalType": "enum OrderType", - "name": "orderType", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "startTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "endTime", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "zoneHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "conduitKey", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "totalOriginalConsiderationItems", - "type": "uint256" - } - ], - "internalType": "struct OrderParameters", - "name": "parameters", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - } - ], - "internalType": "struct Order[]", - "name": "orders", - "type": "tuple[]" - } - ], - "name": "validate", - "outputs": [ - { "internalType": "bool", "name": "validated", "type": "bool" } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/services/decoder/protocols/opensea/abis/seaport-1.1.abi.ts b/services/decoder/protocols/opensea/abis/seaport-1.1.abi.ts new file mode 100644 index 0000000..88d85e2 --- /dev/null +++ b/services/decoder/protocols/opensea/abis/seaport-1.1.abi.ts @@ -0,0 +1,2385 @@ +export const seaport11ABI = [ + { + inputs: [ + { + internalType: "address", + name: "conduitController", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { inputs: [], name: "BadContractSignature", type: "error" }, + { inputs: [], name: "BadFraction", type: "error" }, + { + inputs: [ + { internalType: "address", name: "token", type: "address" }, + { internalType: "address", name: "from", type: "address" }, + { internalType: "address", name: "to", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "BadReturnValueFromERC20OnTransfer", + type: "error", + }, + { + inputs: [{ internalType: "uint8", name: "v", type: "uint8" }], + name: "BadSignatureV", + type: "error", + }, + { + inputs: [], + name: "ConsiderationCriteriaResolverOutOfRange", + type: "error", + }, + { + inputs: [ + { + internalType: "uint256", + name: "orderIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "considerationIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "shortfallAmount", + type: "uint256", + }, + ], + name: "ConsiderationNotMet", + type: "error", + }, + { inputs: [], name: "CriteriaNotEnabledForItem", type: "error" }, + { + inputs: [ + { internalType: "address", name: "token", type: "address" }, + { internalType: "address", name: "from", type: "address" }, + { internalType: "address", name: "to", type: "address" }, + { + internalType: "uint256[]", + name: "identifiers", + type: "uint256[]", + }, + { + internalType: "uint256[]", + name: "amounts", + type: "uint256[]", + }, + ], + name: "ERC1155BatchTransferGenericFailure", + type: "error", + }, + { + inputs: [ + { internalType: "address", name: "account", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "EtherTransferGenericFailure", + type: "error", + }, + { inputs: [], name: "InexactFraction", type: "error" }, + { inputs: [], name: "InsufficientEtherSupplied", type: "error" }, + { + inputs: [], + name: "Invalid1155BatchTransferEncoding", + type: "error", + }, + { + inputs: [], + name: "InvalidBasicOrderParameterEncoding", + type: "error", + }, + { + inputs: [{ internalType: "address", name: "conduit", type: "address" }], + name: "InvalidCallToConduit", + type: "error", + }, + { inputs: [], name: "InvalidCanceller", type: "error" }, + { + inputs: [ + { + internalType: "bytes32", + name: "conduitKey", + type: "bytes32", + }, + { internalType: "address", name: "conduit", type: "address" }, + ], + name: "InvalidConduit", + type: "error", + }, + { inputs: [], name: "InvalidERC721TransferAmount", type: "error" }, + { + inputs: [], + name: "InvalidFulfillmentComponentData", + type: "error", + }, + { + inputs: [{ internalType: "uint256", name: "value", type: "uint256" }], + name: "InvalidMsgValue", + type: "error", + }, + { inputs: [], name: "InvalidNativeOfferItem", type: "error" }, + { inputs: [], name: "InvalidProof", type: "error" }, + { + inputs: [ + { + internalType: "bytes32", + name: "orderHash", + type: "bytes32", + }, + ], + name: "InvalidRestrictedOrder", + type: "error", + }, + { inputs: [], name: "InvalidSignature", type: "error" }, + { inputs: [], name: "InvalidSigner", type: "error" }, + { inputs: [], name: "InvalidTime", type: "error" }, + { + inputs: [], + name: "MismatchedFulfillmentOfferAndConsiderationComponents", + type: "error", + }, + { + inputs: [{ internalType: "enum Side", name: "side", type: "uint8" }], + name: "MissingFulfillmentComponentOnAggregation", + type: "error", + }, + { inputs: [], name: "MissingItemAmount", type: "error" }, + { + inputs: [], + name: "MissingOriginalConsiderationItems", + type: "error", + }, + { + inputs: [{ internalType: "address", name: "account", type: "address" }], + name: "NoContract", + type: "error", + }, + { inputs: [], name: "NoReentrantCalls", type: "error" }, + { inputs: [], name: "NoSpecifiedOrdersAvailable", type: "error" }, + { + inputs: [], + name: "OfferAndConsiderationRequiredOnFulfillment", + type: "error", + }, + { + inputs: [], + name: "OfferCriteriaResolverOutOfRange", + type: "error", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "orderHash", + type: "bytes32", + }, + ], + name: "OrderAlreadyFilled", + type: "error", + }, + { + inputs: [], + name: "OrderCriteriaResolverOutOfRange", + type: "error", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "orderHash", + type: "bytes32", + }, + ], + name: "OrderIsCancelled", + type: "error", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "orderHash", + type: "bytes32", + }, + ], + name: "OrderPartiallyFilled", + type: "error", + }, + { inputs: [], name: "PartialFillsNotEnabledForOrder", type: "error" }, + { + inputs: [ + { internalType: "address", name: "token", type: "address" }, + { internalType: "address", name: "from", type: "address" }, + { internalType: "address", name: "to", type: "address" }, + { + internalType: "uint256", + name: "identifier", + type: "uint256", + }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "TokenTransferGenericFailure", + type: "error", + }, + { + inputs: [], + name: "UnresolvedConsiderationCriteria", + type: "error", + }, + { inputs: [], name: "UnresolvedOfferCriteria", type: "error" }, + { inputs: [], name: "UnusedItemParameters", type: "error" }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "newCounter", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "offerer", + type: "address", + }, + ], + name: "CounterIncremented", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "orderHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "offerer", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "zone", + type: "address", + }, + ], + name: "OrderCancelled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "orderHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "offerer", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "zone", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "recipient", + type: "address", + }, + { + components: [ + { + internalType: "enum ItemType", + name: "itemType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "identifier", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + indexed: false, + internalType: "struct SpentItem[]", + name: "offer", + type: "tuple[]", + }, + { + components: [ + { + internalType: "enum ItemType", + name: "itemType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "identifier", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + ], + indexed: false, + internalType: "struct ReceivedItem[]", + name: "consideration", + type: "tuple[]", + }, + ], + name: "OrderFulfilled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "orderHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "offerer", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "zone", + type: "address", + }, + ], + name: "OrderValidated", + type: "event", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "offerer", + type: "address", + }, + { + internalType: "address", + name: "zone", + type: "address", + }, + { + components: [ + { + internalType: "enum ItemType", + name: "itemType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "identifierOrCriteria", + type: "uint256", + }, + { + internalType: "uint256", + name: "startAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "endAmount", + type: "uint256", + }, + ], + internalType: "struct OfferItem[]", + name: "offer", + type: "tuple[]", + }, + { + components: [ + { + internalType: "enum ItemType", + name: "itemType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "identifierOrCriteria", + type: "uint256", + }, + { + internalType: "uint256", + name: "startAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "endAmount", + type: "uint256", + }, + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + ], + internalType: "struct ConsiderationItem[]", + name: "consideration", + type: "tuple[]", + }, + { + internalType: "enum OrderType", + name: "orderType", + type: "uint8", + }, + { + internalType: "uint256", + name: "startTime", + type: "uint256", + }, + { + internalType: "uint256", + name: "endTime", + type: "uint256", + }, + { + internalType: "bytes32", + name: "zoneHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "bytes32", + name: "conduitKey", + type: "bytes32", + }, + { + internalType: "uint256", + name: "counter", + type: "uint256", + }, + ], + internalType: "struct OrderComponents[]", + name: "orders", + type: "tuple[]", + }, + ], + name: "cancel", + outputs: [{ internalType: "bool", name: "cancelled", type: "bool" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + components: [ + { + internalType: "address", + name: "offerer", + type: "address", + }, + { + internalType: "address", + name: "zone", + type: "address", + }, + { + components: [ + { + internalType: "enum ItemType", + name: "itemType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "identifierOrCriteria", + type: "uint256", + }, + { + internalType: "uint256", + name: "startAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "endAmount", + type: "uint256", + }, + ], + internalType: "struct OfferItem[]", + name: "offer", + type: "tuple[]", + }, + { + components: [ + { + internalType: "enum ItemType", + name: "itemType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "identifierOrCriteria", + type: "uint256", + }, + { + internalType: "uint256", + name: "startAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "endAmount", + type: "uint256", + }, + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + ], + internalType: "struct ConsiderationItem[]", + name: "consideration", + type: "tuple[]", + }, + { + internalType: "enum OrderType", + name: "orderType", + type: "uint8", + }, + { + internalType: "uint256", + name: "startTime", + type: "uint256", + }, + { + internalType: "uint256", + name: "endTime", + type: "uint256", + }, + { + internalType: "bytes32", + name: "zoneHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "bytes32", + name: "conduitKey", + type: "bytes32", + }, + { + internalType: "uint256", + name: "totalOriginalConsiderationItems", + type: "uint256", + }, + ], + internalType: "struct OrderParameters", + name: "parameters", + type: "tuple", + }, + { + internalType: "uint120", + name: "numerator", + type: "uint120", + }, + { + internalType: "uint120", + name: "denominator", + type: "uint120", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + { + internalType: "bytes", + name: "extraData", + type: "bytes", + }, + ], + internalType: "struct AdvancedOrder", + name: "advancedOrder", + type: "tuple", + }, + { + components: [ + { + internalType: "uint256", + name: "orderIndex", + type: "uint256", + }, + { + internalType: "enum Side", + name: "side", + type: "uint8", + }, + { + internalType: "uint256", + name: "index", + type: "uint256", + }, + { + internalType: "uint256", + name: "identifier", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "criteriaProof", + type: "bytes32[]", + }, + ], + internalType: "struct CriteriaResolver[]", + name: "criteriaResolvers", + type: "tuple[]", + }, + { + internalType: "bytes32", + name: "fulfillerConduitKey", + type: "bytes32", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + ], + name: "fulfillAdvancedOrder", + outputs: [{ internalType: "bool", name: "fulfilled", type: "bool" }], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + components: [ + { + internalType: "address", + name: "offerer", + type: "address", + }, + { + internalType: "address", + name: "zone", + type: "address", + }, + { + components: [ + { + internalType: "enum ItemType", + name: "itemType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "identifierOrCriteria", + type: "uint256", + }, + { + internalType: "uint256", + name: "startAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "endAmount", + type: "uint256", + }, + ], + internalType: "struct OfferItem[]", + name: "offer", + type: "tuple[]", + }, + { + components: [ + { + internalType: "enum ItemType", + name: "itemType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "identifierOrCriteria", + type: "uint256", + }, + { + internalType: "uint256", + name: "startAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "endAmount", + type: "uint256", + }, + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + ], + internalType: "struct ConsiderationItem[]", + name: "consideration", + type: "tuple[]", + }, + { + internalType: "enum OrderType", + name: "orderType", + type: "uint8", + }, + { + internalType: "uint256", + name: "startTime", + type: "uint256", + }, + { + internalType: "uint256", + name: "endTime", + type: "uint256", + }, + { + internalType: "bytes32", + name: "zoneHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "bytes32", + name: "conduitKey", + type: "bytes32", + }, + { + internalType: "uint256", + name: "totalOriginalConsiderationItems", + type: "uint256", + }, + ], + internalType: "struct OrderParameters", + name: "parameters", + type: "tuple", + }, + { + internalType: "uint120", + name: "numerator", + type: "uint120", + }, + { + internalType: "uint120", + name: "denominator", + type: "uint120", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + { + internalType: "bytes", + name: "extraData", + type: "bytes", + }, + ], + internalType: "struct AdvancedOrder[]", + name: "advancedOrders", + type: "tuple[]", + }, + { + components: [ + { + internalType: "uint256", + name: "orderIndex", + type: "uint256", + }, + { + internalType: "enum Side", + name: "side", + type: "uint8", + }, + { + internalType: "uint256", + name: "index", + type: "uint256", + }, + { + internalType: "uint256", + name: "identifier", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "criteriaProof", + type: "bytes32[]", + }, + ], + internalType: "struct CriteriaResolver[]", + name: "criteriaResolvers", + type: "tuple[]", + }, + { + components: [ + { + internalType: "uint256", + name: "orderIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "itemIndex", + type: "uint256", + }, + ], + internalType: "struct FulfillmentComponent[][]", + name: "offerFulfillments", + type: "tuple[][]", + }, + { + components: [ + { + internalType: "uint256", + name: "orderIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "itemIndex", + type: "uint256", + }, + ], + internalType: "struct FulfillmentComponent[][]", + name: "considerationFulfillments", + type: "tuple[][]", + }, + { + internalType: "bytes32", + name: "fulfillerConduitKey", + type: "bytes32", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "maximumFulfilled", + type: "uint256", + }, + ], + name: "fulfillAvailableAdvancedOrders", + outputs: [ + { + internalType: "bool[]", + name: "availableOrders", + type: "bool[]", + }, + { + components: [ + { + components: [ + { + internalType: "enum ItemType", + name: "itemType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "identifier", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + ], + internalType: "struct ReceivedItem", + name: "item", + type: "tuple", + }, + { + internalType: "address", + name: "offerer", + type: "address", + }, + { + internalType: "bytes32", + name: "conduitKey", + type: "bytes32", + }, + ], + internalType: "struct Execution[]", + name: "executions", + type: "tuple[]", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + components: [ + { + internalType: "address", + name: "offerer", + type: "address", + }, + { + internalType: "address", + name: "zone", + type: "address", + }, + { + components: [ + { + internalType: "enum ItemType", + name: "itemType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "identifierOrCriteria", + type: "uint256", + }, + { + internalType: "uint256", + name: "startAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "endAmount", + type: "uint256", + }, + ], + internalType: "struct OfferItem[]", + name: "offer", + type: "tuple[]", + }, + { + components: [ + { + internalType: "enum ItemType", + name: "itemType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "identifierOrCriteria", + type: "uint256", + }, + { + internalType: "uint256", + name: "startAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "endAmount", + type: "uint256", + }, + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + ], + internalType: "struct ConsiderationItem[]", + name: "consideration", + type: "tuple[]", + }, + { + internalType: "enum OrderType", + name: "orderType", + type: "uint8", + }, + { + internalType: "uint256", + name: "startTime", + type: "uint256", + }, + { + internalType: "uint256", + name: "endTime", + type: "uint256", + }, + { + internalType: "bytes32", + name: "zoneHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "bytes32", + name: "conduitKey", + type: "bytes32", + }, + { + internalType: "uint256", + name: "totalOriginalConsiderationItems", + type: "uint256", + }, + ], + internalType: "struct OrderParameters", + name: "parameters", + type: "tuple", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + internalType: "struct Order[]", + name: "orders", + type: "tuple[]", + }, + { + components: [ + { + internalType: "uint256", + name: "orderIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "itemIndex", + type: "uint256", + }, + ], + internalType: "struct FulfillmentComponent[][]", + name: "offerFulfillments", + type: "tuple[][]", + }, + { + components: [ + { + internalType: "uint256", + name: "orderIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "itemIndex", + type: "uint256", + }, + ], + internalType: "struct FulfillmentComponent[][]", + name: "considerationFulfillments", + type: "tuple[][]", + }, + { + internalType: "bytes32", + name: "fulfillerConduitKey", + type: "bytes32", + }, + { + internalType: "uint256", + name: "maximumFulfilled", + type: "uint256", + }, + ], + name: "fulfillAvailableOrders", + outputs: [ + { + internalType: "bool[]", + name: "availableOrders", + type: "bool[]", + }, + { + components: [ + { + components: [ + { + internalType: "enum ItemType", + name: "itemType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "identifier", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + ], + internalType: "struct ReceivedItem", + name: "item", + type: "tuple", + }, + { + internalType: "address", + name: "offerer", + type: "address", + }, + { + internalType: "bytes32", + name: "conduitKey", + type: "bytes32", + }, + ], + internalType: "struct Execution[]", + name: "executions", + type: "tuple[]", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "considerationToken", + type: "address", + }, + { + internalType: "uint256", + name: "considerationIdentifier", + type: "uint256", + }, + { + internalType: "uint256", + name: "considerationAmount", + type: "uint256", + }, + { + internalType: "address payable", + name: "offerer", + type: "address", + }, + { + internalType: "address", + name: "zone", + type: "address", + }, + { + internalType: "address", + name: "offerToken", + type: "address", + }, + { + internalType: "uint256", + name: "offerIdentifier", + type: "uint256", + }, + { + internalType: "uint256", + name: "offerAmount", + type: "uint256", + }, + { + internalType: "enum BasicOrderType", + name: "basicOrderType", + type: "uint8", + }, + { + internalType: "uint256", + name: "startTime", + type: "uint256", + }, + { + internalType: "uint256", + name: "endTime", + type: "uint256", + }, + { + internalType: "bytes32", + name: "zoneHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "bytes32", + name: "offererConduitKey", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "fulfillerConduitKey", + type: "bytes32", + }, + { + internalType: "uint256", + name: "totalOriginalAdditionalRecipients", + type: "uint256", + }, + { + components: [ + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + ], + internalType: "struct AdditionalRecipient[]", + name: "additionalRecipients", + type: "tuple[]", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + internalType: "struct BasicOrderParameters", + name: "parameters", + type: "tuple", + }, + ], + name: "fulfillBasicOrder", + outputs: [{ internalType: "bool", name: "fulfilled", type: "bool" }], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + components: [ + { + internalType: "address", + name: "offerer", + type: "address", + }, + { + internalType: "address", + name: "zone", + type: "address", + }, + { + components: [ + { + internalType: "enum ItemType", + name: "itemType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "identifierOrCriteria", + type: "uint256", + }, + { + internalType: "uint256", + name: "startAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "endAmount", + type: "uint256", + }, + ], + internalType: "struct OfferItem[]", + name: "offer", + type: "tuple[]", + }, + { + components: [ + { + internalType: "enum ItemType", + name: "itemType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "identifierOrCriteria", + type: "uint256", + }, + { + internalType: "uint256", + name: "startAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "endAmount", + type: "uint256", + }, + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + ], + internalType: "struct ConsiderationItem[]", + name: "consideration", + type: "tuple[]", + }, + { + internalType: "enum OrderType", + name: "orderType", + type: "uint8", + }, + { + internalType: "uint256", + name: "startTime", + type: "uint256", + }, + { + internalType: "uint256", + name: "endTime", + type: "uint256", + }, + { + internalType: "bytes32", + name: "zoneHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "bytes32", + name: "conduitKey", + type: "bytes32", + }, + { + internalType: "uint256", + name: "totalOriginalConsiderationItems", + type: "uint256", + }, + ], + internalType: "struct OrderParameters", + name: "parameters", + type: "tuple", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + internalType: "struct Order", + name: "order", + type: "tuple", + }, + { + internalType: "bytes32", + name: "fulfillerConduitKey", + type: "bytes32", + }, + ], + name: "fulfillOrder", + outputs: [{ internalType: "bool", name: "fulfilled", type: "bool" }], + stateMutability: "payable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "offerer", type: "address" }], + name: "getCounter", + outputs: [ + { internalType: "uint256", name: "counter", type: "uint256" }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "offerer", + type: "address", + }, + { + internalType: "address", + name: "zone", + type: "address", + }, + { + components: [ + { + internalType: "enum ItemType", + name: "itemType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "identifierOrCriteria", + type: "uint256", + }, + { + internalType: "uint256", + name: "startAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "endAmount", + type: "uint256", + }, + ], + internalType: "struct OfferItem[]", + name: "offer", + type: "tuple[]", + }, + { + components: [ + { + internalType: "enum ItemType", + name: "itemType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "identifierOrCriteria", + type: "uint256", + }, + { + internalType: "uint256", + name: "startAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "endAmount", + type: "uint256", + }, + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + ], + internalType: "struct ConsiderationItem[]", + name: "consideration", + type: "tuple[]", + }, + { + internalType: "enum OrderType", + name: "orderType", + type: "uint8", + }, + { + internalType: "uint256", + name: "startTime", + type: "uint256", + }, + { + internalType: "uint256", + name: "endTime", + type: "uint256", + }, + { + internalType: "bytes32", + name: "zoneHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "bytes32", + name: "conduitKey", + type: "bytes32", + }, + { + internalType: "uint256", + name: "counter", + type: "uint256", + }, + ], + internalType: "struct OrderComponents", + name: "order", + type: "tuple", + }, + ], + name: "getOrderHash", + outputs: [ + { + internalType: "bytes32", + name: "orderHash", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "orderHash", + type: "bytes32", + }, + ], + name: "getOrderStatus", + outputs: [ + { internalType: "bool", name: "isValidated", type: "bool" }, + { internalType: "bool", name: "isCancelled", type: "bool" }, + { + internalType: "uint256", + name: "totalFilled", + type: "uint256", + }, + { + internalType: "uint256", + name: "totalSize", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "incrementCounter", + outputs: [ + { + internalType: "uint256", + name: "newCounter", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "information", + outputs: [ + { internalType: "string", name: "version", type: "string" }, + { + internalType: "bytes32", + name: "domainSeparator", + type: "bytes32", + }, + { + internalType: "address", + name: "conduitController", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + components: [ + { + internalType: "address", + name: "offerer", + type: "address", + }, + { + internalType: "address", + name: "zone", + type: "address", + }, + { + components: [ + { + internalType: "enum ItemType", + name: "itemType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "identifierOrCriteria", + type: "uint256", + }, + { + internalType: "uint256", + name: "startAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "endAmount", + type: "uint256", + }, + ], + internalType: "struct OfferItem[]", + name: "offer", + type: "tuple[]", + }, + { + components: [ + { + internalType: "enum ItemType", + name: "itemType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "identifierOrCriteria", + type: "uint256", + }, + { + internalType: "uint256", + name: "startAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "endAmount", + type: "uint256", + }, + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + ], + internalType: "struct ConsiderationItem[]", + name: "consideration", + type: "tuple[]", + }, + { + internalType: "enum OrderType", + name: "orderType", + type: "uint8", + }, + { + internalType: "uint256", + name: "startTime", + type: "uint256", + }, + { + internalType: "uint256", + name: "endTime", + type: "uint256", + }, + { + internalType: "bytes32", + name: "zoneHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "bytes32", + name: "conduitKey", + type: "bytes32", + }, + { + internalType: "uint256", + name: "totalOriginalConsiderationItems", + type: "uint256", + }, + ], + internalType: "struct OrderParameters", + name: "parameters", + type: "tuple", + }, + { + internalType: "uint120", + name: "numerator", + type: "uint120", + }, + { + internalType: "uint120", + name: "denominator", + type: "uint120", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + { + internalType: "bytes", + name: "extraData", + type: "bytes", + }, + ], + internalType: "struct AdvancedOrder[]", + name: "advancedOrders", + type: "tuple[]", + }, + { + components: [ + { + internalType: "uint256", + name: "orderIndex", + type: "uint256", + }, + { + internalType: "enum Side", + name: "side", + type: "uint8", + }, + { + internalType: "uint256", + name: "index", + type: "uint256", + }, + { + internalType: "uint256", + name: "identifier", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "criteriaProof", + type: "bytes32[]", + }, + ], + internalType: "struct CriteriaResolver[]", + name: "criteriaResolvers", + type: "tuple[]", + }, + { + components: [ + { + components: [ + { + internalType: "uint256", + name: "orderIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "itemIndex", + type: "uint256", + }, + ], + internalType: "struct FulfillmentComponent[]", + name: "offerComponents", + type: "tuple[]", + }, + { + components: [ + { + internalType: "uint256", + name: "orderIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "itemIndex", + type: "uint256", + }, + ], + internalType: "struct FulfillmentComponent[]", + name: "considerationComponents", + type: "tuple[]", + }, + ], + internalType: "struct Fulfillment[]", + name: "fulfillments", + type: "tuple[]", + }, + ], + name: "matchAdvancedOrders", + outputs: [ + { + components: [ + { + components: [ + { + internalType: "enum ItemType", + name: "itemType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "identifier", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + ], + internalType: "struct ReceivedItem", + name: "item", + type: "tuple", + }, + { + internalType: "address", + name: "offerer", + type: "address", + }, + { + internalType: "bytes32", + name: "conduitKey", + type: "bytes32", + }, + ], + internalType: "struct Execution[]", + name: "executions", + type: "tuple[]", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + components: [ + { + internalType: "address", + name: "offerer", + type: "address", + }, + { + internalType: "address", + name: "zone", + type: "address", + }, + { + components: [ + { + internalType: "enum ItemType", + name: "itemType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "identifierOrCriteria", + type: "uint256", + }, + { + internalType: "uint256", + name: "startAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "endAmount", + type: "uint256", + }, + ], + internalType: "struct OfferItem[]", + name: "offer", + type: "tuple[]", + }, + { + components: [ + { + internalType: "enum ItemType", + name: "itemType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "identifierOrCriteria", + type: "uint256", + }, + { + internalType: "uint256", + name: "startAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "endAmount", + type: "uint256", + }, + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + ], + internalType: "struct ConsiderationItem[]", + name: "consideration", + type: "tuple[]", + }, + { + internalType: "enum OrderType", + name: "orderType", + type: "uint8", + }, + { + internalType: "uint256", + name: "startTime", + type: "uint256", + }, + { + internalType: "uint256", + name: "endTime", + type: "uint256", + }, + { + internalType: "bytes32", + name: "zoneHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "bytes32", + name: "conduitKey", + type: "bytes32", + }, + { + internalType: "uint256", + name: "totalOriginalConsiderationItems", + type: "uint256", + }, + ], + internalType: "struct OrderParameters", + name: "parameters", + type: "tuple", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + internalType: "struct Order[]", + name: "orders", + type: "tuple[]", + }, + { + components: [ + { + components: [ + { + internalType: "uint256", + name: "orderIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "itemIndex", + type: "uint256", + }, + ], + internalType: "struct FulfillmentComponent[]", + name: "offerComponents", + type: "tuple[]", + }, + { + components: [ + { + internalType: "uint256", + name: "orderIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "itemIndex", + type: "uint256", + }, + ], + internalType: "struct FulfillmentComponent[]", + name: "considerationComponents", + type: "tuple[]", + }, + ], + internalType: "struct Fulfillment[]", + name: "fulfillments", + type: "tuple[]", + }, + ], + name: "matchOrders", + outputs: [ + { + components: [ + { + components: [ + { + internalType: "enum ItemType", + name: "itemType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "identifier", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + ], + internalType: "struct ReceivedItem", + name: "item", + type: "tuple", + }, + { + internalType: "address", + name: "offerer", + type: "address", + }, + { + internalType: "bytes32", + name: "conduitKey", + type: "bytes32", + }, + ], + internalType: "struct Execution[]", + name: "executions", + type: "tuple[]", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "contractName", + type: "string", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + components: [ + { + components: [ + { + internalType: "address", + name: "offerer", + type: "address", + }, + { + internalType: "address", + name: "zone", + type: "address", + }, + { + components: [ + { + internalType: "enum ItemType", + name: "itemType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "identifierOrCriteria", + type: "uint256", + }, + { + internalType: "uint256", + name: "startAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "endAmount", + type: "uint256", + }, + ], + internalType: "struct OfferItem[]", + name: "offer", + type: "tuple[]", + }, + { + components: [ + { + internalType: "enum ItemType", + name: "itemType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "identifierOrCriteria", + type: "uint256", + }, + { + internalType: "uint256", + name: "startAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "endAmount", + type: "uint256", + }, + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + ], + internalType: "struct ConsiderationItem[]", + name: "consideration", + type: "tuple[]", + }, + { + internalType: "enum OrderType", + name: "orderType", + type: "uint8", + }, + { + internalType: "uint256", + name: "startTime", + type: "uint256", + }, + { + internalType: "uint256", + name: "endTime", + type: "uint256", + }, + { + internalType: "bytes32", + name: "zoneHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "bytes32", + name: "conduitKey", + type: "bytes32", + }, + { + internalType: "uint256", + name: "totalOriginalConsiderationItems", + type: "uint256", + }, + ], + internalType: "struct OrderParameters", + name: "parameters", + type: "tuple", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + internalType: "struct Order[]", + name: "orders", + type: "tuple[]", + }, + ], + name: "validate", + outputs: [{ internalType: "bool", name: "validated", type: "bool" }], + stateMutability: "nonpayable", + type: "function", + }, +] as const; diff --git a/services/decoder/protocols/opensea/opensea.decoders.ts b/services/decoder/protocols/opensea/opensea.decoders.ts index 7449ea3..7825eb2 100644 --- a/services/decoder/protocols/opensea/opensea.decoders.ts +++ b/services/decoder/protocols/opensea/opensea.decoders.ts @@ -1,23 +1,23 @@ +import { prettifyCurrency } from "@covalenthq/client-sdk"; +import { decodeEventLog, type Abi } from "viem"; +import { timestampParser } from "../../../../utils/functions"; import { GoldRushDecoder } from "../../decoder"; +import { + DECODED_ACTION, + DECODED_EVENT_CATEGORY, +} from "../../decoder.constants"; import { type EventDetails, type EventNFTs, type EventTokens, type EventType, } from "../../decoder.types"; -import { - DECODED_ACTION, - DECODED_EVENT_CATEGORY, -} from "../../decoder.constants"; -import { decodeEventLog, type Abi } from "viem"; -import Seaport from "./abis/seaport-1.1.abi.json"; -import { timestampParser } from "../../../../utils/functions"; -import { prettifyCurrency } from "@covalenthq/client-sdk"; +import { seaport11ABI } from "./abis/seaport-1.1.abi"; GoldRushDecoder.on( "opensea:OrderFulfilled", ["eth-mainnet", "matic-mainnet"], - Seaport as Abi, + seaport11ABI as Abi, async ( log_event, tx, @@ -37,32 +37,11 @@ GoldRushDecoder.on( } const { args: decoded } = decodeEventLog({ - abi: Seaport, + abi: seaport11ABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "OrderFulfilled", - }) as { - eventName: "OrderFulfilled"; - args: { - offerer: string; - zone: string; - orderHash: string; - recipient: string; - offer: { - itemType: ITEM_TYPE; - token: string; - identifier: bigint; - amount: bigint; - }[]; - consideration: { - itemType: ITEM_TYPE; - token: string; - identifier: bigint; - amount: bigint; - recipient: string; - }[]; - }; - }; + }); const tokens: EventTokens = []; const nfts: EventNFTs = []; diff --git a/services/decoder/protocols/paraswap-v5/abis/paraswap-v5.simple-swap.abi.json b/services/decoder/protocols/paraswap-v5/abis/paraswap-v5.simple-swap.abi.json deleted file mode 100644 index 0e7da4a..0000000 --- a/services/decoder/protocols/paraswap-v5/abis/paraswap-v5.simple-swap.abi.json +++ /dev/null @@ -1,450 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "uint256", - "name": "_partnerSharePercent", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxFeePercent", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_paraswapReferralShare", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_paraswapSlippageShare", - "type": "uint256" - }, - { - "internalType": "contract IFeeClaimer", - "name": "_feeClaimer", - "type": "address" - }, - { - "internalType": "address", - "name": "_augustusRFQ", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes16", - "name": "uuid", - "type": "bytes16" - }, - { - "indexed": false, - "internalType": "address", - "name": "partner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feePercent", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "initiator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "beneficiary", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "srcToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "destToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "srcAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "receivedAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "expectedAmount", - "type": "uint256" - } - ], - "name": "BoughtV3", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes16", - "name": "uuid", - "type": "bytes16" - }, - { - "indexed": false, - "internalType": "address", - "name": "partner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feePercent", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "initiator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "beneficiary", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "srcToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "destToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "srcAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "receivedAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "expectedAmount", - "type": "uint256" - } - ], - "name": "SwappedV3", - "type": "event" - }, - { - "inputs": [], - "name": "ROUTER_ROLE", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WHITELISTED_ROLE", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "augustusRFQ", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "feeClaimer", - "outputs": [ - { - "internalType": "contract IFeeClaimer", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getKey", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "maxFeePercent", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "paraswapReferralShare", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "paraswapSlippageShare", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "partnerSharePercent", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "fromToken", - "type": "address" - }, - { - "internalType": "address", - "name": "toToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "fromAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "toAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expectedAmount", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "callees", - "type": "address[]" - }, - { - "internalType": "bytes", - "name": "exchangeData", - "type": "bytes" - }, - { - "internalType": "uint256[]", - "name": "startIndexes", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "address payable", - "name": "beneficiary", - "type": "address" - }, - { - "internalType": "address payable", - "name": "partner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "feePercent", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "permit", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bytes16", - "name": "uuid", - "type": "bytes16" - } - ], - "internalType": "struct Utils.SimpleData", - "name": "data", - "type": "tuple" - } - ], - "name": "simpleBuy", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "fromToken", - "type": "address" - }, - { - "internalType": "address", - "name": "toToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "fromAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "toAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expectedAmount", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "callees", - "type": "address[]" - }, - { - "internalType": "bytes", - "name": "exchangeData", - "type": "bytes" - }, - { - "internalType": "uint256[]", - "name": "startIndexes", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "values", - "type": "uint256[]" - }, - { - "internalType": "address payable", - "name": "beneficiary", - "type": "address" - }, - { - "internalType": "address payable", - "name": "partner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "feePercent", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "permit", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "bytes16", - "name": "uuid", - "type": "bytes16" - } - ], - "internalType": "struct Utils.SimpleData", - "name": "data", - "type": "tuple" - } - ], - "name": "simpleSwap", - "outputs": [ - { - "internalType": "uint256", - "name": "receivedAmount", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - } -] diff --git a/services/decoder/protocols/paraswap-v5/abis/simple-swap.abi.ts b/services/decoder/protocols/paraswap-v5/abis/simple-swap.abi.ts new file mode 100644 index 0000000..d34db7d --- /dev/null +++ b/services/decoder/protocols/paraswap-v5/abis/simple-swap.abi.ts @@ -0,0 +1,434 @@ +export const simpleSwapABI = [ + { + inputs: [ + { + internalType: "uint256", + name: "_partnerSharePercent", + type: "uint256", + }, + { + internalType: "uint256", + name: "_maxFeePercent", + type: "uint256", + }, + { + internalType: "uint256", + name: "_paraswapReferralShare", + type: "uint256", + }, + { + internalType: "uint256", + name: "_paraswapSlippageShare", + type: "uint256", + }, + { + internalType: "contract IFeeClaimer", + name: "_feeClaimer", + type: "address", + }, + { + internalType: "address", + name: "_augustusRFQ", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes16", + name: "uuid", + type: "bytes16", + }, + { + indexed: false, + internalType: "address", + name: "partner", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "feePercent", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "initiator", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "beneficiary", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "srcToken", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "destToken", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "srcAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "receivedAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "expectedAmount", + type: "uint256", + }, + ], + name: "BoughtV3", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes16", + name: "uuid", + type: "bytes16", + }, + { + indexed: false, + internalType: "address", + name: "partner", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "feePercent", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "initiator", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "beneficiary", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "srcToken", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "destToken", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "srcAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "receivedAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "expectedAmount", + type: "uint256", + }, + ], + name: "SwappedV3", + type: "event", + }, + { + inputs: [], + name: "ROUTER_ROLE", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "WHITELISTED_ROLE", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "augustusRFQ", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "feeClaimer", + outputs: [ + { + internalType: "contract IFeeClaimer", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getKey", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "pure", + type: "function", + }, + { + inputs: [{ internalType: "bytes", name: "", type: "bytes" }], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "maxFeePercent", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "paraswapReferralShare", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "paraswapSlippageShare", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "partnerSharePercent", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "fromToken", + type: "address", + }, + { + internalType: "address", + name: "toToken", + type: "address", + }, + { + internalType: "uint256", + name: "fromAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "toAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "expectedAmount", + type: "uint256", + }, + { + internalType: "address[]", + name: "callees", + type: "address[]", + }, + { + internalType: "bytes", + name: "exchangeData", + type: "bytes", + }, + { + internalType: "uint256[]", + name: "startIndexes", + type: "uint256[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "address payable", + name: "beneficiary", + type: "address", + }, + { + internalType: "address payable", + name: "partner", + type: "address", + }, + { + internalType: "uint256", + name: "feePercent", + type: "uint256", + }, + { + internalType: "bytes", + name: "permit", + type: "bytes", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "bytes16", + name: "uuid", + type: "bytes16", + }, + ], + internalType: "struct Utils.SimpleData", + name: "data", + type: "tuple", + }, + ], + name: "simpleBuy", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "fromToken", + type: "address", + }, + { + internalType: "address", + name: "toToken", + type: "address", + }, + { + internalType: "uint256", + name: "fromAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "toAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "expectedAmount", + type: "uint256", + }, + { + internalType: "address[]", + name: "callees", + type: "address[]", + }, + { + internalType: "bytes", + name: "exchangeData", + type: "bytes", + }, + { + internalType: "uint256[]", + name: "startIndexes", + type: "uint256[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "address payable", + name: "beneficiary", + type: "address", + }, + { + internalType: "address payable", + name: "partner", + type: "address", + }, + { + internalType: "uint256", + name: "feePercent", + type: "uint256", + }, + { + internalType: "bytes", + name: "permit", + type: "bytes", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "bytes16", + name: "uuid", + type: "bytes16", + }, + ], + internalType: "struct Utils.SimpleData", + name: "data", + type: "tuple", + }, + ], + name: "simpleSwap", + outputs: [ + { + internalType: "uint256", + name: "receivedAmount", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, +] as const; diff --git a/services/decoder/protocols/paraswap-v5/paraswap-v5.decoders.ts b/services/decoder/protocols/paraswap-v5/paraswap-v5.decoders.ts index 444c08f..758d478 100644 --- a/services/decoder/protocols/paraswap-v5/paraswap-v5.decoders.ts +++ b/services/decoder/protocols/paraswap-v5/paraswap-v5.decoders.ts @@ -1,24 +1,24 @@ -import { GoldRushDecoder } from "../../decoder"; import { - type EventTokens, - type EventDetails, - type EventType, -} from "../../decoder.types"; + calculatePrettyBalance, + prettifyCurrency, +} from "@covalenthq/client-sdk"; +import { decodeEventLog, type Abi } from "viem"; +import { GoldRushDecoder } from "../../decoder"; import { DECODED_ACTION, DECODED_EVENT_CATEGORY, } from "../../decoder.constants"; -import { decodeEventLog, type Abi } from "viem"; -import SimpleSwapABI from "./abis/paraswap-v5.simple-swap.abi.json"; import { - calculatePrettyBalance, - prettifyCurrency, -} from "@covalenthq/client-sdk"; + type EventDetails, + type EventTokens, + type EventType, +} from "../../decoder.types"; +import { simpleSwapABI } from "./abis/simple-swap.abi"; GoldRushDecoder.on( "paraswap-v5:SwappedV3", ["eth-mainnet", "matic-mainnet", "avalanche-mainnet"], - SimpleSwapABI as Abi, + simpleSwapABI as Abi, async ( log_event, tx, @@ -29,25 +29,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: SimpleSwapABI, + abi: simpleSwapABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "SwappedV3", - }) as { - eventName: "SwappedV3"; - args: { - beneficiary: string; - srcToken: string; - destToken: string; - uuid: string; - partner: string; - feePercent: bigint; - initiator: string; - srcAmount: bigint; - receivedAmount: bigint; - expectedAmount: bigint; - }; - }; + }); const [{ data: srcToken }, { data: destToken }] = await Promise.all( [decoded.srcToken, decoded.destToken].map((address) => { diff --git a/services/decoder/protocols/pendle/abis/pendle-router-v3.abi.json b/services/decoder/protocols/pendle/abis/pendle-router-v3.abi.json deleted file mode 100644 index be2fd94..0000000 --- a/services/decoder/protocols/pendle/abis/pendle-router-v3.abi.json +++ /dev/null @@ -1,2709 +0,0 @@ -[ - { "inputs": [], "name": "ApproxFail", "type": "error" }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "guessMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "guessMax", - "type": "uint256" - }, - { "internalType": "uint256", "name": "eps", "type": "uint256" } - ], - "name": "ApproxParamsInvalid", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "int256", - "name": "exchangeRate", - "type": "int256" - } - ], - "name": "MarketExchangeRateBelowOne", - "type": "error" - }, - { "inputs": [], "name": "MarketExpired", "type": "error" }, - { - "inputs": [], - "name": "MarketProportionMustNotEqualOne", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "int256", - "name": "proportion", - "type": "int256" - }, - { - "internalType": "int256", - "name": "maxProportion", - "type": "int256" - } - ], - "name": "MarketProportionTooHigh", - "type": "error" - }, - { - "inputs": [ - { "internalType": "int256", "name": "rateScalar", "type": "int256" } - ], - "name": "MarketRateScalarBelowZero", - "type": "error" - }, - { - "inputs": [ - { "internalType": "int256", "name": "totalPt", "type": "int256" }, - { "internalType": "int256", "name": "totalAsset", "type": "int256" } - ], - "name": "MarketZeroTotalPtOrTotalAsset", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "actualPtOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "requiredPtOut", - "type": "uint256" - } - ], - "name": "RouterInsufficientPtOut", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "actualSyOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "requiredSyOut", - "type": "uint256" - } - ], - "name": "RouterInsufficientSyOut", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "actualTokenOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "requiredTokenOut", - "type": "uint256" - } - ], - "name": "RouterInsufficientTokenOut", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "market", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "int256", - "name": "netPtToAccount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "netSyToAccount", - "type": "int256" - } - ], - "name": "SwapPtAndSy", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "market", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "int256", - "name": "netPtToAccount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "netTokenToAccount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "netSyInterm", - "type": "uint256" - } - ], - "name": "SwapPtAndToken", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { "internalType": "address", "name": "market", "type": "address" }, - { - "internalType": "uint256", - "name": "exactPtIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minSyOut", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "address", - "name": "limitRouter", - "type": "address" - }, - { - "internalType": "uint256", - "name": "epsSkipMarket", - "type": "uint256" - }, - { - "components": [ - { - "components": [ - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "enum IPLimitOrderType.OrderType", - "name": "orderType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "YT", - "type": "address" - }, - { - "internalType": "address", - "name": "maker", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lnImpliedRate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "failSafeRate", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "permit", - "type": "bytes" - } - ], - "internalType": "struct Order", - "name": "order", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - } - ], - "internalType": "struct FillOrderParams[]", - "name": "normalFills", - "type": "tuple[]" - }, - { - "components": [ - { - "components": [ - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "enum IPLimitOrderType.OrderType", - "name": "orderType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "YT", - "type": "address" - }, - { - "internalType": "address", - "name": "maker", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lnImpliedRate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "failSafeRate", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "permit", - "type": "bytes" - } - ], - "internalType": "struct Order", - "name": "order", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - } - ], - "internalType": "struct FillOrderParams[]", - "name": "flashFills", - "type": "tuple[]" - }, - { - "internalType": "bytes", - "name": "optData", - "type": "bytes" - } - ], - "internalType": "struct LimitOrderData", - "name": "limit", - "type": "tuple" - } - ], - "name": "swapExactPtForSy", - "outputs": [ - { - "internalType": "uint256", - "name": "netSyOut", - "type": "uint256" - }, - { "internalType": "uint256", "name": "netSyFee", "type": "uint256" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { "internalType": "address", "name": "market", "type": "address" }, - { - "internalType": "uint256", - "name": "exactPtIn", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "address", - "name": "tokenOut", - "type": "address" - }, - { - "internalType": "uint256", - "name": "minTokenOut", - "type": "uint256" - }, - { - "internalType": "address", - "name": "tokenRedeemSy", - "type": "address" - }, - { - "internalType": "address", - "name": "pendleSwap", - "type": "address" - }, - { - "components": [ - { - "internalType": "enum SwapType", - "name": "swapType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "extRouter", - "type": "address" - }, - { - "internalType": "bytes", - "name": "extCalldata", - "type": "bytes" - }, - { - "internalType": "bool", - "name": "needScale", - "type": "bool" - } - ], - "internalType": "struct SwapData", - "name": "swapData", - "type": "tuple" - } - ], - "internalType": "struct TokenOutput", - "name": "output", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "limitRouter", - "type": "address" - }, - { - "internalType": "uint256", - "name": "epsSkipMarket", - "type": "uint256" - }, - { - "components": [ - { - "components": [ - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "enum IPLimitOrderType.OrderType", - "name": "orderType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "YT", - "type": "address" - }, - { - "internalType": "address", - "name": "maker", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lnImpliedRate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "failSafeRate", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "permit", - "type": "bytes" - } - ], - "internalType": "struct Order", - "name": "order", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - } - ], - "internalType": "struct FillOrderParams[]", - "name": "normalFills", - "type": "tuple[]" - }, - { - "components": [ - { - "components": [ - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "enum IPLimitOrderType.OrderType", - "name": "orderType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "YT", - "type": "address" - }, - { - "internalType": "address", - "name": "maker", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lnImpliedRate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "failSafeRate", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "permit", - "type": "bytes" - } - ], - "internalType": "struct Order", - "name": "order", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - } - ], - "internalType": "struct FillOrderParams[]", - "name": "flashFills", - "type": "tuple[]" - }, - { - "internalType": "bytes", - "name": "optData", - "type": "bytes" - } - ], - "internalType": "struct LimitOrderData", - "name": "limit", - "type": "tuple" - } - ], - "name": "swapExactPtForToken", - "outputs": [ - { - "internalType": "uint256", - "name": "netTokenOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "netSyFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "netSyInterm", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { "internalType": "address", "name": "market", "type": "address" }, - { - "internalType": "uint256", - "name": "exactSyIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minPtOut", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "guessMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "guessMax", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "guessOffchain", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxIteration", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "eps", - "type": "uint256" - } - ], - "internalType": "struct ApproxParams", - "name": "guessPtOut", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "limitRouter", - "type": "address" - }, - { - "internalType": "uint256", - "name": "epsSkipMarket", - "type": "uint256" - }, - { - "components": [ - { - "components": [ - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "enum IPLimitOrderType.OrderType", - "name": "orderType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "YT", - "type": "address" - }, - { - "internalType": "address", - "name": "maker", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lnImpliedRate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "failSafeRate", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "permit", - "type": "bytes" - } - ], - "internalType": "struct Order", - "name": "order", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - } - ], - "internalType": "struct FillOrderParams[]", - "name": "normalFills", - "type": "tuple[]" - }, - { - "components": [ - { - "components": [ - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "enum IPLimitOrderType.OrderType", - "name": "orderType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "YT", - "type": "address" - }, - { - "internalType": "address", - "name": "maker", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lnImpliedRate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "failSafeRate", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "permit", - "type": "bytes" - } - ], - "internalType": "struct Order", - "name": "order", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - } - ], - "internalType": "struct FillOrderParams[]", - "name": "flashFills", - "type": "tuple[]" - }, - { - "internalType": "bytes", - "name": "optData", - "type": "bytes" - } - ], - "internalType": "struct LimitOrderData", - "name": "limit", - "type": "tuple" - } - ], - "name": "swapExactSyForPt", - "outputs": [ - { - "internalType": "uint256", - "name": "netPtOut", - "type": "uint256" - }, - { "internalType": "uint256", "name": "netSyFee", "type": "uint256" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { "internalType": "address", "name": "market", "type": "address" }, - { - "internalType": "uint256", - "name": "minPtOut", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "guessMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "guessMax", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "guessOffchain", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxIteration", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "eps", - "type": "uint256" - } - ], - "internalType": "struct ApproxParams", - "name": "guessPtOut", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "tokenIn", - "type": "address" - }, - { - "internalType": "uint256", - "name": "netTokenIn", - "type": "uint256" - }, - { - "internalType": "address", - "name": "tokenMintSy", - "type": "address" - }, - { - "internalType": "address", - "name": "pendleSwap", - "type": "address" - }, - { - "components": [ - { - "internalType": "enum SwapType", - "name": "swapType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "extRouter", - "type": "address" - }, - { - "internalType": "bytes", - "name": "extCalldata", - "type": "bytes" - }, - { - "internalType": "bool", - "name": "needScale", - "type": "bool" - } - ], - "internalType": "struct SwapData", - "name": "swapData", - "type": "tuple" - } - ], - "internalType": "struct TokenInput", - "name": "input", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "limitRouter", - "type": "address" - }, - { - "internalType": "uint256", - "name": "epsSkipMarket", - "type": "uint256" - }, - { - "components": [ - { - "components": [ - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "enum IPLimitOrderType.OrderType", - "name": "orderType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "YT", - "type": "address" - }, - { - "internalType": "address", - "name": "maker", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lnImpliedRate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "failSafeRate", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "permit", - "type": "bytes" - } - ], - "internalType": "struct Order", - "name": "order", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - } - ], - "internalType": "struct FillOrderParams[]", - "name": "normalFills", - "type": "tuple[]" - }, - { - "components": [ - { - "components": [ - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "enum IPLimitOrderType.OrderType", - "name": "orderType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "YT", - "type": "address" - }, - { - "internalType": "address", - "name": "maker", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lnImpliedRate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "failSafeRate", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "permit", - "type": "bytes" - } - ], - "internalType": "struct Order", - "name": "order", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - } - ], - "internalType": "struct FillOrderParams[]", - "name": "flashFills", - "type": "tuple[]" - }, - { - "internalType": "bytes", - "name": "optData", - "type": "bytes" - } - ], - "internalType": "struct LimitOrderData", - "name": "limit", - "type": "tuple" - } - ], - "name": "swapExactTokenForPt", - "outputs": [ - { - "internalType": "uint256", - "name": "netPtOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "netSyFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "netSyInterm", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { "inputs": [], "name": "ApproxFail", "type": "error" }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "guessMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "guessMax", - "type": "uint256" - }, - { "internalType": "uint256", "name": "eps", "type": "uint256" } - ], - "name": "ApproxParamsInvalid", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "int256", - "name": "exchangeRate", - "type": "int256" - } - ], - "name": "MarketExchangeRateBelowOne", - "type": "error" - }, - { "inputs": [], "name": "MarketExpired", "type": "error" }, - { - "inputs": [], - "name": "MarketProportionMustNotEqualOne", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "int256", - "name": "proportion", - "type": "int256" - }, - { - "internalType": "int256", - "name": "maxProportion", - "type": "int256" - } - ], - "name": "MarketProportionTooHigh", - "type": "error" - }, - { - "inputs": [ - { "internalType": "int256", "name": "rateScalar", "type": "int256" } - ], - "name": "MarketRateScalarBelowZero", - "type": "error" - }, - { - "inputs": [ - { "internalType": "int256", "name": "totalPt", "type": "int256" }, - { "internalType": "int256", "name": "totalAsset", "type": "int256" } - ], - "name": "MarketZeroTotalPtOrTotalAsset", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "actualPtOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "requiredPtOut", - "type": "uint256" - } - ], - "name": "RouterInsufficientPtOut", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "actualSyOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "requiredSyOut", - "type": "uint256" - } - ], - "name": "RouterInsufficientSyOut", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "actualTokenOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "requiredTokenOut", - "type": "uint256" - } - ], - "name": "RouterInsufficientTokenOut", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "actualYtOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "requiredYtOut", - "type": "uint256" - } - ], - "name": "RouterInsufficientYtOut", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "market", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "int256", - "name": "netPtToAccount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "netYtToAccount", - "type": "int256" - } - ], - "name": "SwapPtAndYt", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "market", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "int256", - "name": "netYtToAccount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "netSyToAccount", - "type": "int256" - } - ], - "name": "SwapYtAndSy", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "market", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "int256", - "name": "netYtToAccount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "netTokenToAccount", - "type": "int256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "netSyInterm", - "type": "uint256" - } - ], - "name": "SwapYtAndToken", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { "internalType": "address", "name": "market", "type": "address" }, - { - "internalType": "uint256", - "name": "exactPtIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minYtOut", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "guessMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "guessMax", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "guessOffchain", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxIteration", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "eps", - "type": "uint256" - } - ], - "internalType": "struct ApproxParams", - "name": "guessTotalPtToSwap", - "type": "tuple" - } - ], - "name": "swapExactPtForYt", - "outputs": [ - { - "internalType": "uint256", - "name": "netYtOut", - "type": "uint256" - }, - { "internalType": "uint256", "name": "netSyFee", "type": "uint256" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { "internalType": "address", "name": "market", "type": "address" }, - { - "internalType": "uint256", - "name": "exactSyIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minYtOut", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "guessMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "guessMax", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "guessOffchain", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxIteration", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "eps", - "type": "uint256" - } - ], - "internalType": "struct ApproxParams", - "name": "guessYtOut", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "limitRouter", - "type": "address" - }, - { - "internalType": "uint256", - "name": "epsSkipMarket", - "type": "uint256" - }, - { - "components": [ - { - "components": [ - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "enum IPLimitOrderType.OrderType", - "name": "orderType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "YT", - "type": "address" - }, - { - "internalType": "address", - "name": "maker", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lnImpliedRate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "failSafeRate", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "permit", - "type": "bytes" - } - ], - "internalType": "struct Order", - "name": "order", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - } - ], - "internalType": "struct FillOrderParams[]", - "name": "normalFills", - "type": "tuple[]" - }, - { - "components": [ - { - "components": [ - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "enum IPLimitOrderType.OrderType", - "name": "orderType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "YT", - "type": "address" - }, - { - "internalType": "address", - "name": "maker", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lnImpliedRate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "failSafeRate", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "permit", - "type": "bytes" - } - ], - "internalType": "struct Order", - "name": "order", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - } - ], - "internalType": "struct FillOrderParams[]", - "name": "flashFills", - "type": "tuple[]" - }, - { - "internalType": "bytes", - "name": "optData", - "type": "bytes" - } - ], - "internalType": "struct LimitOrderData", - "name": "limit", - "type": "tuple" - } - ], - "name": "swapExactSyForYt", - "outputs": [ - { - "internalType": "uint256", - "name": "netYtOut", - "type": "uint256" - }, - { "internalType": "uint256", "name": "netSyFee", "type": "uint256" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { "internalType": "address", "name": "market", "type": "address" }, - { - "internalType": "uint256", - "name": "minYtOut", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "guessMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "guessMax", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "guessOffchain", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxIteration", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "eps", - "type": "uint256" - } - ], - "internalType": "struct ApproxParams", - "name": "guessYtOut", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "tokenIn", - "type": "address" - }, - { - "internalType": "uint256", - "name": "netTokenIn", - "type": "uint256" - }, - { - "internalType": "address", - "name": "tokenMintSy", - "type": "address" - }, - { - "internalType": "address", - "name": "pendleSwap", - "type": "address" - }, - { - "components": [ - { - "internalType": "enum SwapType", - "name": "swapType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "extRouter", - "type": "address" - }, - { - "internalType": "bytes", - "name": "extCalldata", - "type": "bytes" - }, - { - "internalType": "bool", - "name": "needScale", - "type": "bool" - } - ], - "internalType": "struct SwapData", - "name": "swapData", - "type": "tuple" - } - ], - "internalType": "struct TokenInput", - "name": "input", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "limitRouter", - "type": "address" - }, - { - "internalType": "uint256", - "name": "epsSkipMarket", - "type": "uint256" - }, - { - "components": [ - { - "components": [ - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "enum IPLimitOrderType.OrderType", - "name": "orderType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "YT", - "type": "address" - }, - { - "internalType": "address", - "name": "maker", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lnImpliedRate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "failSafeRate", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "permit", - "type": "bytes" - } - ], - "internalType": "struct Order", - "name": "order", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - } - ], - "internalType": "struct FillOrderParams[]", - "name": "normalFills", - "type": "tuple[]" - }, - { - "components": [ - { - "components": [ - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "enum IPLimitOrderType.OrderType", - "name": "orderType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "YT", - "type": "address" - }, - { - "internalType": "address", - "name": "maker", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lnImpliedRate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "failSafeRate", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "permit", - "type": "bytes" - } - ], - "internalType": "struct Order", - "name": "order", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - } - ], - "internalType": "struct FillOrderParams[]", - "name": "flashFills", - "type": "tuple[]" - }, - { - "internalType": "bytes", - "name": "optData", - "type": "bytes" - } - ], - "internalType": "struct LimitOrderData", - "name": "limit", - "type": "tuple" - } - ], - "name": "swapExactTokenForYt", - "outputs": [ - { - "internalType": "uint256", - "name": "netYtOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "netSyFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "netSyInterm", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { "internalType": "address", "name": "market", "type": "address" }, - { - "internalType": "uint256", - "name": "exactYtIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minPtOut", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "guessMin", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "guessMax", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "guessOffchain", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxIteration", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "eps", - "type": "uint256" - } - ], - "internalType": "struct ApproxParams", - "name": "guessTotalPtFromSwap", - "type": "tuple" - } - ], - "name": "swapExactYtForPt", - "outputs": [ - { - "internalType": "uint256", - "name": "netPtOut", - "type": "uint256" - }, - { "internalType": "uint256", "name": "netSyFee", "type": "uint256" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { "internalType": "address", "name": "market", "type": "address" }, - { - "internalType": "uint256", - "name": "exactYtIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minSyOut", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "address", - "name": "limitRouter", - "type": "address" - }, - { - "internalType": "uint256", - "name": "epsSkipMarket", - "type": "uint256" - }, - { - "components": [ - { - "components": [ - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "enum IPLimitOrderType.OrderType", - "name": "orderType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "YT", - "type": "address" - }, - { - "internalType": "address", - "name": "maker", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lnImpliedRate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "failSafeRate", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "permit", - "type": "bytes" - } - ], - "internalType": "struct Order", - "name": "order", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - } - ], - "internalType": "struct FillOrderParams[]", - "name": "normalFills", - "type": "tuple[]" - }, - { - "components": [ - { - "components": [ - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "enum IPLimitOrderType.OrderType", - "name": "orderType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "YT", - "type": "address" - }, - { - "internalType": "address", - "name": "maker", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lnImpliedRate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "failSafeRate", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "permit", - "type": "bytes" - } - ], - "internalType": "struct Order", - "name": "order", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - } - ], - "internalType": "struct FillOrderParams[]", - "name": "flashFills", - "type": "tuple[]" - }, - { - "internalType": "bytes", - "name": "optData", - "type": "bytes" - } - ], - "internalType": "struct LimitOrderData", - "name": "limit", - "type": "tuple" - } - ], - "name": "swapExactYtForSy", - "outputs": [ - { - "internalType": "uint256", - "name": "netSyOut", - "type": "uint256" - }, - { "internalType": "uint256", "name": "netSyFee", "type": "uint256" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { "internalType": "address", "name": "market", "type": "address" }, - { - "internalType": "uint256", - "name": "exactYtIn", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "address", - "name": "tokenOut", - "type": "address" - }, - { - "internalType": "uint256", - "name": "minTokenOut", - "type": "uint256" - }, - { - "internalType": "address", - "name": "tokenRedeemSy", - "type": "address" - }, - { - "internalType": "address", - "name": "pendleSwap", - "type": "address" - }, - { - "components": [ - { - "internalType": "enum SwapType", - "name": "swapType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "extRouter", - "type": "address" - }, - { - "internalType": "bytes", - "name": "extCalldata", - "type": "bytes" - }, - { - "internalType": "bool", - "name": "needScale", - "type": "bool" - } - ], - "internalType": "struct SwapData", - "name": "swapData", - "type": "tuple" - } - ], - "internalType": "struct TokenOutput", - "name": "output", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "limitRouter", - "type": "address" - }, - { - "internalType": "uint256", - "name": "epsSkipMarket", - "type": "uint256" - }, - { - "components": [ - { - "components": [ - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "enum IPLimitOrderType.OrderType", - "name": "orderType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "YT", - "type": "address" - }, - { - "internalType": "address", - "name": "maker", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lnImpliedRate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "failSafeRate", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "permit", - "type": "bytes" - } - ], - "internalType": "struct Order", - "name": "order", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - } - ], - "internalType": "struct FillOrderParams[]", - "name": "normalFills", - "type": "tuple[]" - }, - { - "components": [ - { - "components": [ - { - "internalType": "uint256", - "name": "salt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "enum IPLimitOrderType.OrderType", - "name": "orderType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "YT", - "type": "address" - }, - { - "internalType": "address", - "name": "maker", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lnImpliedRate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "failSafeRate", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "permit", - "type": "bytes" - } - ], - "internalType": "struct Order", - "name": "order", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "makingAmount", - "type": "uint256" - } - ], - "internalType": "struct FillOrderParams[]", - "name": "flashFills", - "type": "tuple[]" - }, - { - "internalType": "bytes", - "name": "optData", - "type": "bytes" - } - ], - "internalType": "struct LimitOrderData", - "name": "limit", - "type": "tuple" - } - ], - "name": "swapExactYtForToken", - "outputs": [ - { - "internalType": "uint256", - "name": "netTokenOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "netSyFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "netSyInterm", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/services/decoder/protocols/pendle/abis/pendle-router-v3.abi.ts b/services/decoder/protocols/pendle/abis/pendle-router-v3.abi.ts new file mode 100644 index 0000000..9d475c0 --- /dev/null +++ b/services/decoder/protocols/pendle/abis/pendle-router-v3.abi.ts @@ -0,0 +1,2725 @@ +export const pendleRouterV3ABI = [ + { inputs: [], name: "ApproxFail", type: "error" }, + { + inputs: [ + { + internalType: "uint256", + name: "guessMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "guessMax", + type: "uint256", + }, + { internalType: "uint256", name: "eps", type: "uint256" }, + ], + name: "ApproxParamsInvalid", + type: "error", + }, + { + inputs: [ + { + internalType: "int256", + name: "exchangeRate", + type: "int256", + }, + ], + name: "MarketExchangeRateBelowOne", + type: "error", + }, + { inputs: [], name: "MarketExpired", type: "error" }, + { + inputs: [], + name: "MarketProportionMustNotEqualOne", + type: "error", + }, + { + inputs: [ + { + internalType: "int256", + name: "proportion", + type: "int256", + }, + { + internalType: "int256", + name: "maxProportion", + type: "int256", + }, + ], + name: "MarketProportionTooHigh", + type: "error", + }, + { + inputs: [ + { internalType: "int256", name: "rateScalar", type: "int256" }, + ], + name: "MarketRateScalarBelowZero", + type: "error", + }, + { + inputs: [ + { internalType: "int256", name: "totalPt", type: "int256" }, + { internalType: "int256", name: "totalAsset", type: "int256" }, + ], + name: "MarketZeroTotalPtOrTotalAsset", + type: "error", + }, + { + inputs: [ + { + internalType: "uint256", + name: "actualPtOut", + type: "uint256", + }, + { + internalType: "uint256", + name: "requiredPtOut", + type: "uint256", + }, + ], + name: "RouterInsufficientPtOut", + type: "error", + }, + { + inputs: [ + { + internalType: "uint256", + name: "actualSyOut", + type: "uint256", + }, + { + internalType: "uint256", + name: "requiredSyOut", + type: "uint256", + }, + ], + name: "RouterInsufficientSyOut", + type: "error", + }, + { + inputs: [ + { + internalType: "uint256", + name: "actualTokenOut", + type: "uint256", + }, + { + internalType: "uint256", + name: "requiredTokenOut", + type: "uint256", + }, + ], + name: "RouterInsufficientTokenOut", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "caller", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "market", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "receiver", + type: "address", + }, + { + indexed: false, + internalType: "int256", + name: "netPtToAccount", + type: "int256", + }, + { + indexed: false, + internalType: "int256", + name: "netSyToAccount", + type: "int256", + }, + ], + name: "SwapPtAndSy", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "caller", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "market", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "receiver", + type: "address", + }, + { + indexed: false, + internalType: "int256", + name: "netPtToAccount", + type: "int256", + }, + { + indexed: false, + internalType: "int256", + name: "netTokenToAccount", + type: "int256", + }, + { + indexed: false, + internalType: "uint256", + name: "netSyInterm", + type: "uint256", + }, + ], + name: "SwapPtAndToken", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + { internalType: "address", name: "market", type: "address" }, + { + internalType: "uint256", + name: "exactPtIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "minSyOut", + type: "uint256", + }, + { + components: [ + { + internalType: "address", + name: "limitRouter", + type: "address", + }, + { + internalType: "uint256", + name: "epsSkipMarket", + type: "uint256", + }, + { + components: [ + { + components: [ + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiry", + type: "uint256", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: + "enum IPLimitOrderType.OrderType", + name: "orderType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "YT", + type: "address", + }, + { + internalType: "address", + name: "maker", + type: "address", + }, + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "lnImpliedRate", + type: "uint256", + }, + { + internalType: "uint256", + name: "failSafeRate", + type: "uint256", + }, + { + internalType: "bytes", + name: "permit", + type: "bytes", + }, + ], + internalType: "struct Order", + name: "order", + type: "tuple", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + ], + internalType: "struct FillOrderParams[]", + name: "normalFills", + type: "tuple[]", + }, + { + components: [ + { + components: [ + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiry", + type: "uint256", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: + "enum IPLimitOrderType.OrderType", + name: "orderType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "YT", + type: "address", + }, + { + internalType: "address", + name: "maker", + type: "address", + }, + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "lnImpliedRate", + type: "uint256", + }, + { + internalType: "uint256", + name: "failSafeRate", + type: "uint256", + }, + { + internalType: "bytes", + name: "permit", + type: "bytes", + }, + ], + internalType: "struct Order", + name: "order", + type: "tuple", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + ], + internalType: "struct FillOrderParams[]", + name: "flashFills", + type: "tuple[]", + }, + { + internalType: "bytes", + name: "optData", + type: "bytes", + }, + ], + internalType: "struct LimitOrderData", + name: "limit", + type: "tuple", + }, + ], + name: "swapExactPtForSy", + outputs: [ + { + internalType: "uint256", + name: "netSyOut", + type: "uint256", + }, + { internalType: "uint256", name: "netSyFee", type: "uint256" }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + { internalType: "address", name: "market", type: "address" }, + { + internalType: "uint256", + name: "exactPtIn", + type: "uint256", + }, + { + components: [ + { + internalType: "address", + name: "tokenOut", + type: "address", + }, + { + internalType: "uint256", + name: "minTokenOut", + type: "uint256", + }, + { + internalType: "address", + name: "tokenRedeemSy", + type: "address", + }, + { + internalType: "address", + name: "pendleSwap", + type: "address", + }, + { + components: [ + { + internalType: "enum SwapType", + name: "swapType", + type: "uint8", + }, + { + internalType: "address", + name: "extRouter", + type: "address", + }, + { + internalType: "bytes", + name: "extCalldata", + type: "bytes", + }, + { + internalType: "bool", + name: "needScale", + type: "bool", + }, + ], + internalType: "struct SwapData", + name: "swapData", + type: "tuple", + }, + ], + internalType: "struct TokenOutput", + name: "output", + type: "tuple", + }, + { + components: [ + { + internalType: "address", + name: "limitRouter", + type: "address", + }, + { + internalType: "uint256", + name: "epsSkipMarket", + type: "uint256", + }, + { + components: [ + { + components: [ + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiry", + type: "uint256", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: + "enum IPLimitOrderType.OrderType", + name: "orderType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "YT", + type: "address", + }, + { + internalType: "address", + name: "maker", + type: "address", + }, + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "lnImpliedRate", + type: "uint256", + }, + { + internalType: "uint256", + name: "failSafeRate", + type: "uint256", + }, + { + internalType: "bytes", + name: "permit", + type: "bytes", + }, + ], + internalType: "struct Order", + name: "order", + type: "tuple", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + ], + internalType: "struct FillOrderParams[]", + name: "normalFills", + type: "tuple[]", + }, + { + components: [ + { + components: [ + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiry", + type: "uint256", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: + "enum IPLimitOrderType.OrderType", + name: "orderType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "YT", + type: "address", + }, + { + internalType: "address", + name: "maker", + type: "address", + }, + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "lnImpliedRate", + type: "uint256", + }, + { + internalType: "uint256", + name: "failSafeRate", + type: "uint256", + }, + { + internalType: "bytes", + name: "permit", + type: "bytes", + }, + ], + internalType: "struct Order", + name: "order", + type: "tuple", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + ], + internalType: "struct FillOrderParams[]", + name: "flashFills", + type: "tuple[]", + }, + { + internalType: "bytes", + name: "optData", + type: "bytes", + }, + ], + internalType: "struct LimitOrderData", + name: "limit", + type: "tuple", + }, + ], + name: "swapExactPtForToken", + outputs: [ + { + internalType: "uint256", + name: "netTokenOut", + type: "uint256", + }, + { + internalType: "uint256", + name: "netSyFee", + type: "uint256", + }, + { + internalType: "uint256", + name: "netSyInterm", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + { internalType: "address", name: "market", type: "address" }, + { + internalType: "uint256", + name: "exactSyIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "minPtOut", + type: "uint256", + }, + { + components: [ + { + internalType: "uint256", + name: "guessMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "guessMax", + type: "uint256", + }, + { + internalType: "uint256", + name: "guessOffchain", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxIteration", + type: "uint256", + }, + { + internalType: "uint256", + name: "eps", + type: "uint256", + }, + ], + internalType: "struct ApproxParams", + name: "guessPtOut", + type: "tuple", + }, + { + components: [ + { + internalType: "address", + name: "limitRouter", + type: "address", + }, + { + internalType: "uint256", + name: "epsSkipMarket", + type: "uint256", + }, + { + components: [ + { + components: [ + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiry", + type: "uint256", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: + "enum IPLimitOrderType.OrderType", + name: "orderType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "YT", + type: "address", + }, + { + internalType: "address", + name: "maker", + type: "address", + }, + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "lnImpliedRate", + type: "uint256", + }, + { + internalType: "uint256", + name: "failSafeRate", + type: "uint256", + }, + { + internalType: "bytes", + name: "permit", + type: "bytes", + }, + ], + internalType: "struct Order", + name: "order", + type: "tuple", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + ], + internalType: "struct FillOrderParams[]", + name: "normalFills", + type: "tuple[]", + }, + { + components: [ + { + components: [ + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiry", + type: "uint256", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: + "enum IPLimitOrderType.OrderType", + name: "orderType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "YT", + type: "address", + }, + { + internalType: "address", + name: "maker", + type: "address", + }, + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "lnImpliedRate", + type: "uint256", + }, + { + internalType: "uint256", + name: "failSafeRate", + type: "uint256", + }, + { + internalType: "bytes", + name: "permit", + type: "bytes", + }, + ], + internalType: "struct Order", + name: "order", + type: "tuple", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + ], + internalType: "struct FillOrderParams[]", + name: "flashFills", + type: "tuple[]", + }, + { + internalType: "bytes", + name: "optData", + type: "bytes", + }, + ], + internalType: "struct LimitOrderData", + name: "limit", + type: "tuple", + }, + ], + name: "swapExactSyForPt", + outputs: [ + { + internalType: "uint256", + name: "netPtOut", + type: "uint256", + }, + { internalType: "uint256", name: "netSyFee", type: "uint256" }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + { internalType: "address", name: "market", type: "address" }, + { + internalType: "uint256", + name: "minPtOut", + type: "uint256", + }, + { + components: [ + { + internalType: "uint256", + name: "guessMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "guessMax", + type: "uint256", + }, + { + internalType: "uint256", + name: "guessOffchain", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxIteration", + type: "uint256", + }, + { + internalType: "uint256", + name: "eps", + type: "uint256", + }, + ], + internalType: "struct ApproxParams", + name: "guessPtOut", + type: "tuple", + }, + { + components: [ + { + internalType: "address", + name: "tokenIn", + type: "address", + }, + { + internalType: "uint256", + name: "netTokenIn", + type: "uint256", + }, + { + internalType: "address", + name: "tokenMintSy", + type: "address", + }, + { + internalType: "address", + name: "pendleSwap", + type: "address", + }, + { + components: [ + { + internalType: "enum SwapType", + name: "swapType", + type: "uint8", + }, + { + internalType: "address", + name: "extRouter", + type: "address", + }, + { + internalType: "bytes", + name: "extCalldata", + type: "bytes", + }, + { + internalType: "bool", + name: "needScale", + type: "bool", + }, + ], + internalType: "struct SwapData", + name: "swapData", + type: "tuple", + }, + ], + internalType: "struct TokenInput", + name: "input", + type: "tuple", + }, + { + components: [ + { + internalType: "address", + name: "limitRouter", + type: "address", + }, + { + internalType: "uint256", + name: "epsSkipMarket", + type: "uint256", + }, + { + components: [ + { + components: [ + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiry", + type: "uint256", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: + "enum IPLimitOrderType.OrderType", + name: "orderType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "YT", + type: "address", + }, + { + internalType: "address", + name: "maker", + type: "address", + }, + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "lnImpliedRate", + type: "uint256", + }, + { + internalType: "uint256", + name: "failSafeRate", + type: "uint256", + }, + { + internalType: "bytes", + name: "permit", + type: "bytes", + }, + ], + internalType: "struct Order", + name: "order", + type: "tuple", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + ], + internalType: "struct FillOrderParams[]", + name: "normalFills", + type: "tuple[]", + }, + { + components: [ + { + components: [ + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiry", + type: "uint256", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: + "enum IPLimitOrderType.OrderType", + name: "orderType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "YT", + type: "address", + }, + { + internalType: "address", + name: "maker", + type: "address", + }, + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "lnImpliedRate", + type: "uint256", + }, + { + internalType: "uint256", + name: "failSafeRate", + type: "uint256", + }, + { + internalType: "bytes", + name: "permit", + type: "bytes", + }, + ], + internalType: "struct Order", + name: "order", + type: "tuple", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + ], + internalType: "struct FillOrderParams[]", + name: "flashFills", + type: "tuple[]", + }, + { + internalType: "bytes", + name: "optData", + type: "bytes", + }, + ], + internalType: "struct LimitOrderData", + name: "limit", + type: "tuple", + }, + ], + name: "swapExactTokenForPt", + outputs: [ + { + internalType: "uint256", + name: "netPtOut", + type: "uint256", + }, + { + internalType: "uint256", + name: "netSyFee", + type: "uint256", + }, + { + internalType: "uint256", + name: "netSyInterm", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { inputs: [], name: "ApproxFail", type: "error" }, + { + inputs: [ + { + internalType: "uint256", + name: "guessMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "guessMax", + type: "uint256", + }, + { internalType: "uint256", name: "eps", type: "uint256" }, + ], + name: "ApproxParamsInvalid", + type: "error", + }, + { + inputs: [ + { + internalType: "int256", + name: "exchangeRate", + type: "int256", + }, + ], + name: "MarketExchangeRateBelowOne", + type: "error", + }, + { inputs: [], name: "MarketExpired", type: "error" }, + { + inputs: [], + name: "MarketProportionMustNotEqualOne", + type: "error", + }, + { + inputs: [ + { + internalType: "int256", + name: "proportion", + type: "int256", + }, + { + internalType: "int256", + name: "maxProportion", + type: "int256", + }, + ], + name: "MarketProportionTooHigh", + type: "error", + }, + { + inputs: [ + { internalType: "int256", name: "rateScalar", type: "int256" }, + ], + name: "MarketRateScalarBelowZero", + type: "error", + }, + { + inputs: [ + { internalType: "int256", name: "totalPt", type: "int256" }, + { internalType: "int256", name: "totalAsset", type: "int256" }, + ], + name: "MarketZeroTotalPtOrTotalAsset", + type: "error", + }, + { + inputs: [ + { + internalType: "uint256", + name: "actualPtOut", + type: "uint256", + }, + { + internalType: "uint256", + name: "requiredPtOut", + type: "uint256", + }, + ], + name: "RouterInsufficientPtOut", + type: "error", + }, + { + inputs: [ + { + internalType: "uint256", + name: "actualSyOut", + type: "uint256", + }, + { + internalType: "uint256", + name: "requiredSyOut", + type: "uint256", + }, + ], + name: "RouterInsufficientSyOut", + type: "error", + }, + { + inputs: [ + { + internalType: "uint256", + name: "actualTokenOut", + type: "uint256", + }, + { + internalType: "uint256", + name: "requiredTokenOut", + type: "uint256", + }, + ], + name: "RouterInsufficientTokenOut", + type: "error", + }, + { + inputs: [ + { + internalType: "uint256", + name: "actualYtOut", + type: "uint256", + }, + { + internalType: "uint256", + name: "requiredYtOut", + type: "uint256", + }, + ], + name: "RouterInsufficientYtOut", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "caller", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "market", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "receiver", + type: "address", + }, + { + indexed: false, + internalType: "int256", + name: "netPtToAccount", + type: "int256", + }, + { + indexed: false, + internalType: "int256", + name: "netYtToAccount", + type: "int256", + }, + ], + name: "SwapPtAndYt", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "caller", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "market", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "receiver", + type: "address", + }, + { + indexed: false, + internalType: "int256", + name: "netYtToAccount", + type: "int256", + }, + { + indexed: false, + internalType: "int256", + name: "netSyToAccount", + type: "int256", + }, + ], + name: "SwapYtAndSy", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "caller", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "market", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "receiver", + type: "address", + }, + { + indexed: false, + internalType: "int256", + name: "netYtToAccount", + type: "int256", + }, + { + indexed: false, + internalType: "int256", + name: "netTokenToAccount", + type: "int256", + }, + { + indexed: false, + internalType: "uint256", + name: "netSyInterm", + type: "uint256", + }, + ], + name: "SwapYtAndToken", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + { internalType: "address", name: "market", type: "address" }, + { + internalType: "uint256", + name: "exactPtIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "minYtOut", + type: "uint256", + }, + { + components: [ + { + internalType: "uint256", + name: "guessMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "guessMax", + type: "uint256", + }, + { + internalType: "uint256", + name: "guessOffchain", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxIteration", + type: "uint256", + }, + { + internalType: "uint256", + name: "eps", + type: "uint256", + }, + ], + internalType: "struct ApproxParams", + name: "guessTotalPtToSwap", + type: "tuple", + }, + ], + name: "swapExactPtForYt", + outputs: [ + { + internalType: "uint256", + name: "netYtOut", + type: "uint256", + }, + { internalType: "uint256", name: "netSyFee", type: "uint256" }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + { internalType: "address", name: "market", type: "address" }, + { + internalType: "uint256", + name: "exactSyIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "minYtOut", + type: "uint256", + }, + { + components: [ + { + internalType: "uint256", + name: "guessMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "guessMax", + type: "uint256", + }, + { + internalType: "uint256", + name: "guessOffchain", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxIteration", + type: "uint256", + }, + { + internalType: "uint256", + name: "eps", + type: "uint256", + }, + ], + internalType: "struct ApproxParams", + name: "guessYtOut", + type: "tuple", + }, + { + components: [ + { + internalType: "address", + name: "limitRouter", + type: "address", + }, + { + internalType: "uint256", + name: "epsSkipMarket", + type: "uint256", + }, + { + components: [ + { + components: [ + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiry", + type: "uint256", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: + "enum IPLimitOrderType.OrderType", + name: "orderType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "YT", + type: "address", + }, + { + internalType: "address", + name: "maker", + type: "address", + }, + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "lnImpliedRate", + type: "uint256", + }, + { + internalType: "uint256", + name: "failSafeRate", + type: "uint256", + }, + { + internalType: "bytes", + name: "permit", + type: "bytes", + }, + ], + internalType: "struct Order", + name: "order", + type: "tuple", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + ], + internalType: "struct FillOrderParams[]", + name: "normalFills", + type: "tuple[]", + }, + { + components: [ + { + components: [ + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiry", + type: "uint256", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: + "enum IPLimitOrderType.OrderType", + name: "orderType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "YT", + type: "address", + }, + { + internalType: "address", + name: "maker", + type: "address", + }, + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "lnImpliedRate", + type: "uint256", + }, + { + internalType: "uint256", + name: "failSafeRate", + type: "uint256", + }, + { + internalType: "bytes", + name: "permit", + type: "bytes", + }, + ], + internalType: "struct Order", + name: "order", + type: "tuple", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + ], + internalType: "struct FillOrderParams[]", + name: "flashFills", + type: "tuple[]", + }, + { + internalType: "bytes", + name: "optData", + type: "bytes", + }, + ], + internalType: "struct LimitOrderData", + name: "limit", + type: "tuple", + }, + ], + name: "swapExactSyForYt", + outputs: [ + { + internalType: "uint256", + name: "netYtOut", + type: "uint256", + }, + { internalType: "uint256", name: "netSyFee", type: "uint256" }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + { internalType: "address", name: "market", type: "address" }, + { + internalType: "uint256", + name: "minYtOut", + type: "uint256", + }, + { + components: [ + { + internalType: "uint256", + name: "guessMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "guessMax", + type: "uint256", + }, + { + internalType: "uint256", + name: "guessOffchain", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxIteration", + type: "uint256", + }, + { + internalType: "uint256", + name: "eps", + type: "uint256", + }, + ], + internalType: "struct ApproxParams", + name: "guessYtOut", + type: "tuple", + }, + { + components: [ + { + internalType: "address", + name: "tokenIn", + type: "address", + }, + { + internalType: "uint256", + name: "netTokenIn", + type: "uint256", + }, + { + internalType: "address", + name: "tokenMintSy", + type: "address", + }, + { + internalType: "address", + name: "pendleSwap", + type: "address", + }, + { + components: [ + { + internalType: "enum SwapType", + name: "swapType", + type: "uint8", + }, + { + internalType: "address", + name: "extRouter", + type: "address", + }, + { + internalType: "bytes", + name: "extCalldata", + type: "bytes", + }, + { + internalType: "bool", + name: "needScale", + type: "bool", + }, + ], + internalType: "struct SwapData", + name: "swapData", + type: "tuple", + }, + ], + internalType: "struct TokenInput", + name: "input", + type: "tuple", + }, + { + components: [ + { + internalType: "address", + name: "limitRouter", + type: "address", + }, + { + internalType: "uint256", + name: "epsSkipMarket", + type: "uint256", + }, + { + components: [ + { + components: [ + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiry", + type: "uint256", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: + "enum IPLimitOrderType.OrderType", + name: "orderType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "YT", + type: "address", + }, + { + internalType: "address", + name: "maker", + type: "address", + }, + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "lnImpliedRate", + type: "uint256", + }, + { + internalType: "uint256", + name: "failSafeRate", + type: "uint256", + }, + { + internalType: "bytes", + name: "permit", + type: "bytes", + }, + ], + internalType: "struct Order", + name: "order", + type: "tuple", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + ], + internalType: "struct FillOrderParams[]", + name: "normalFills", + type: "tuple[]", + }, + { + components: [ + { + components: [ + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiry", + type: "uint256", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: + "enum IPLimitOrderType.OrderType", + name: "orderType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "YT", + type: "address", + }, + { + internalType: "address", + name: "maker", + type: "address", + }, + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "lnImpliedRate", + type: "uint256", + }, + { + internalType: "uint256", + name: "failSafeRate", + type: "uint256", + }, + { + internalType: "bytes", + name: "permit", + type: "bytes", + }, + ], + internalType: "struct Order", + name: "order", + type: "tuple", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + ], + internalType: "struct FillOrderParams[]", + name: "flashFills", + type: "tuple[]", + }, + { + internalType: "bytes", + name: "optData", + type: "bytes", + }, + ], + internalType: "struct LimitOrderData", + name: "limit", + type: "tuple", + }, + ], + name: "swapExactTokenForYt", + outputs: [ + { + internalType: "uint256", + name: "netYtOut", + type: "uint256", + }, + { + internalType: "uint256", + name: "netSyFee", + type: "uint256", + }, + { + internalType: "uint256", + name: "netSyInterm", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + { internalType: "address", name: "market", type: "address" }, + { + internalType: "uint256", + name: "exactYtIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "minPtOut", + type: "uint256", + }, + { + components: [ + { + internalType: "uint256", + name: "guessMin", + type: "uint256", + }, + { + internalType: "uint256", + name: "guessMax", + type: "uint256", + }, + { + internalType: "uint256", + name: "guessOffchain", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxIteration", + type: "uint256", + }, + { + internalType: "uint256", + name: "eps", + type: "uint256", + }, + ], + internalType: "struct ApproxParams", + name: "guessTotalPtFromSwap", + type: "tuple", + }, + ], + name: "swapExactYtForPt", + outputs: [ + { + internalType: "uint256", + name: "netPtOut", + type: "uint256", + }, + { internalType: "uint256", name: "netSyFee", type: "uint256" }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + { internalType: "address", name: "market", type: "address" }, + { + internalType: "uint256", + name: "exactYtIn", + type: "uint256", + }, + { + internalType: "uint256", + name: "minSyOut", + type: "uint256", + }, + { + components: [ + { + internalType: "address", + name: "limitRouter", + type: "address", + }, + { + internalType: "uint256", + name: "epsSkipMarket", + type: "uint256", + }, + { + components: [ + { + components: [ + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiry", + type: "uint256", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: + "enum IPLimitOrderType.OrderType", + name: "orderType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "YT", + type: "address", + }, + { + internalType: "address", + name: "maker", + type: "address", + }, + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "lnImpliedRate", + type: "uint256", + }, + { + internalType: "uint256", + name: "failSafeRate", + type: "uint256", + }, + { + internalType: "bytes", + name: "permit", + type: "bytes", + }, + ], + internalType: "struct Order", + name: "order", + type: "tuple", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + ], + internalType: "struct FillOrderParams[]", + name: "normalFills", + type: "tuple[]", + }, + { + components: [ + { + components: [ + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiry", + type: "uint256", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: + "enum IPLimitOrderType.OrderType", + name: "orderType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "YT", + type: "address", + }, + { + internalType: "address", + name: "maker", + type: "address", + }, + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "lnImpliedRate", + type: "uint256", + }, + { + internalType: "uint256", + name: "failSafeRate", + type: "uint256", + }, + { + internalType: "bytes", + name: "permit", + type: "bytes", + }, + ], + internalType: "struct Order", + name: "order", + type: "tuple", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + ], + internalType: "struct FillOrderParams[]", + name: "flashFills", + type: "tuple[]", + }, + { + internalType: "bytes", + name: "optData", + type: "bytes", + }, + ], + internalType: "struct LimitOrderData", + name: "limit", + type: "tuple", + }, + ], + name: "swapExactYtForSy", + outputs: [ + { + internalType: "uint256", + name: "netSyOut", + type: "uint256", + }, + { internalType: "uint256", name: "netSyFee", type: "uint256" }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + { internalType: "address", name: "market", type: "address" }, + { + internalType: "uint256", + name: "exactYtIn", + type: "uint256", + }, + { + components: [ + { + internalType: "address", + name: "tokenOut", + type: "address", + }, + { + internalType: "uint256", + name: "minTokenOut", + type: "uint256", + }, + { + internalType: "address", + name: "tokenRedeemSy", + type: "address", + }, + { + internalType: "address", + name: "pendleSwap", + type: "address", + }, + { + components: [ + { + internalType: "enum SwapType", + name: "swapType", + type: "uint8", + }, + { + internalType: "address", + name: "extRouter", + type: "address", + }, + { + internalType: "bytes", + name: "extCalldata", + type: "bytes", + }, + { + internalType: "bool", + name: "needScale", + type: "bool", + }, + ], + internalType: "struct SwapData", + name: "swapData", + type: "tuple", + }, + ], + internalType: "struct TokenOutput", + name: "output", + type: "tuple", + }, + { + components: [ + { + internalType: "address", + name: "limitRouter", + type: "address", + }, + { + internalType: "uint256", + name: "epsSkipMarket", + type: "uint256", + }, + { + components: [ + { + components: [ + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiry", + type: "uint256", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: + "enum IPLimitOrderType.OrderType", + name: "orderType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "YT", + type: "address", + }, + { + internalType: "address", + name: "maker", + type: "address", + }, + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "lnImpliedRate", + type: "uint256", + }, + { + internalType: "uint256", + name: "failSafeRate", + type: "uint256", + }, + { + internalType: "bytes", + name: "permit", + type: "bytes", + }, + ], + internalType: "struct Order", + name: "order", + type: "tuple", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + ], + internalType: "struct FillOrderParams[]", + name: "normalFills", + type: "tuple[]", + }, + { + components: [ + { + components: [ + { + internalType: "uint256", + name: "salt", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiry", + type: "uint256", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: + "enum IPLimitOrderType.OrderType", + name: "orderType", + type: "uint8", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "YT", + type: "address", + }, + { + internalType: "address", + name: "maker", + type: "address", + }, + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "lnImpliedRate", + type: "uint256", + }, + { + internalType: "uint256", + name: "failSafeRate", + type: "uint256", + }, + { + internalType: "bytes", + name: "permit", + type: "bytes", + }, + ], + internalType: "struct Order", + name: "order", + type: "tuple", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + { + internalType: "uint256", + name: "makingAmount", + type: "uint256", + }, + ], + internalType: "struct FillOrderParams[]", + name: "flashFills", + type: "tuple[]", + }, + { + internalType: "bytes", + name: "optData", + type: "bytes", + }, + ], + internalType: "struct LimitOrderData", + name: "limit", + type: "tuple", + }, + ], + name: "swapExactYtForToken", + outputs: [ + { + internalType: "uint256", + name: "netTokenOut", + type: "uint256", + }, + { + internalType: "uint256", + name: "netSyFee", + type: "uint256", + }, + { + internalType: "uint256", + name: "netSyInterm", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +] as const; diff --git a/services/decoder/protocols/pendle/abis/ve-pendle.abi.ts b/services/decoder/protocols/pendle/abis/ve-pendle.abi.ts new file mode 100644 index 0000000..ad4603b --- /dev/null +++ b/services/decoder/protocols/pendle/abis/ve-pendle.abi.ts @@ -0,0 +1,535 @@ +export const vePendleABI = [ + { + inputs: [ + { + internalType: "contract IERC20", + name: "_pendle", + type: "address", + }, + { + internalType: "address", + name: "_pendleMsgSendEndpoint", + type: "address", + }, + { + internalType: "uint256", + name: "initialApproxDestinationGas", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { inputs: [], name: "ArrayEmpty", type: "error" }, + { + inputs: [{ internalType: "uint256", name: "chainId", type: "uint256" }], + name: "ChainNotSupported", + type: "error", + }, + { + inputs: [{ internalType: "uint256", name: "expiry", type: "uint256" }], + name: "ExpiryInThePast", + type: "error", + }, + { + inputs: [ + { + internalType: "uint256", + name: "currentFee", + type: "uint256", + }, + { + internalType: "uint256", + name: "requiredFee", + type: "uint256", + }, + ], + name: "InsufficientFeeToSendMsg", + type: "error", + }, + { + inputs: [{ internalType: "uint256", name: "wTime", type: "uint256" }], + name: "InvalidWTime", + type: "error", + }, + { inputs: [], name: "VEExceededMaxLockTime", type: "error" }, + { inputs: [], name: "VEInsufficientLockTime", type: "error" }, + { inputs: [], name: "VENotAllowedReduceExpiry", type: "error" }, + { inputs: [], name: "VEPositionNotExpired", type: "error" }, + { inputs: [], name: "VEZeroAmountLocked", type: "error" }, + { inputs: [], name: "VEZeroPosition", type: "error" }, + { inputs: [], name: "ZeroAddress", type: "error" }, + { + anonymous: false, + inputs: [ + { + components: [ + { + internalType: "uint128", + name: "bias", + type: "uint128", + }, + { + internalType: "uint128", + name: "slope", + type: "uint128", + }, + ], + indexed: false, + internalType: "struct VeBalance", + name: "newTotalSupply", + type: "tuple", + }, + { + indexed: false, + internalType: "uint256[]", + name: "chainIds", + type: "uint256[]", + }, + ], + name: "BroadcastTotalSupply", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "uint256[]", + name: "chainIds", + type: "uint256[]", + }, + ], + name: "BroadcastUserPosition", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "version", + type: "uint8", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "expiry", + type: "uint128", + }, + ], + name: "NewLockPosition", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "Withdraw", + type: "event", + }, + { + inputs: [], + name: "MAX_LOCK_TIME", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MIN_LOCK_TIME", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "WEEK", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + { internalType: "uint256", name: "_chainId", type: "uint256" }, + ], + name: "addDestinationContract", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "approxDstExecutionGas", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "user", type: "address" }], + name: "balanceOf", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "chainIds", + type: "uint256[]", + }, + ], + name: "broadcastTotalSupply", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "user", type: "address" }, + { + internalType: "uint256[]", + name: "chainIds", + type: "uint256[]", + }, + ], + name: "broadcastUserPosition", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "claimOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getAllDestinationContracts", + outputs: [ + { + internalType: "uint256[]", + name: "chainIds", + type: "uint256[]", + }, + { + internalType: "address[]", + name: "addrs", + type: "address[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "chainIds", + type: "uint256[]", + }, + ], + name: "getBroadcastPositionFee", + outputs: [{ internalType: "uint256", name: "fee", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "chainIds", + type: "uint256[]", + }, + ], + name: "getBroadcastSupplyFee", + outputs: [{ internalType: "uint256", name: "fee", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "user", type: "address" }, + { internalType: "uint256", name: "index", type: "uint256" }, + ], + name: "getUserHistoryAt", + outputs: [ + { + components: [ + { + internalType: "uint128", + name: "timestamp", + type: "uint128", + }, + { + components: [ + { + internalType: "uint128", + name: "bias", + type: "uint128", + }, + { + internalType: "uint128", + name: "slope", + type: "uint128", + }, + ], + internalType: "struct VeBalance", + name: "value", + type: "tuple", + }, + ], + internalType: "struct Checkpoint", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "user", type: "address" }], + name: "getUserHistoryLength", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "additionalAmountToLock", + type: "uint128", + }, + { + internalType: "uint128", + name: "newExpiry", + type: "uint128", + }, + ], + name: "increaseLockPosition", + outputs: [ + { + internalType: "uint128", + name: "newVeBalance", + type: "uint128", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "additionalAmountToLock", + type: "uint128", + }, + { + internalType: "uint128", + name: "newExpiry", + type: "uint128", + }, + { + internalType: "uint256[]", + name: "chainIds", + type: "uint256[]", + }, + ], + name: "increaseLockPositionAndBroadcast", + outputs: [ + { + internalType: "uint128", + name: "newVeBalance", + type: "uint128", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "lastSlopeChangeAppliedAt", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "pendingOwner", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "pendle", + outputs: [ + { internalType: "contract IERC20", name: "", type: "address" }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "pendleMsgSendEndpoint", + outputs: [ + { + internalType: "contract IPMsgSendEndpoint", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "", type: "address" }], + name: "positionData", + outputs: [ + { internalType: "uint128", name: "amount", type: "uint128" }, + { internalType: "uint128", name: "expiry", type: "uint128" }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "gas", type: "uint256" }], + name: "setApproxDstExecutionGas", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "uint128", name: "", type: "uint128" }], + name: "slopeChanges", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "user", type: "address" }], + name: "totalSupplyAndBalanceCurrent", + outputs: [ + { internalType: "uint128", name: "", type: "uint128" }, + { internalType: "uint128", name: "", type: "uint128" }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "uint128", name: "", type: "uint128" }], + name: "totalSupplyAt", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupplyCurrent", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "totalSupplyStored", + outputs: [{ internalType: "uint128", name: "", type: "uint128" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + { internalType: "bool", name: "direct", type: "bool" }, + { internalType: "bool", name: "renounce", type: "bool" }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "withdraw", + outputs: [{ internalType: "uint128", name: "amount", type: "uint128" }], + stateMutability: "nonpayable", + type: "function", + }, +] as const; diff --git a/services/decoder/protocols/pendle/abis/vePendle.abi.json b/services/decoder/protocols/pendle/abis/vePendle.abi.json deleted file mode 100644 index 3ac9865..0000000 --- a/services/decoder/protocols/pendle/abis/vePendle.abi.json +++ /dev/null @@ -1,587 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_pendle", - "type": "address" - }, - { - "internalType": "address", - "name": "_pendleMsgSendEndpoint", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialApproxDestinationGas", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { "inputs": [], "name": "ArrayEmpty", "type": "error" }, - { - "inputs": [ - { "internalType": "uint256", "name": "chainId", "type": "uint256" } - ], - "name": "ChainNotSupported", - "type": "error" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "expiry", "type": "uint256" } - ], - "name": "ExpiryInThePast", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "currentFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "requiredFee", - "type": "uint256" - } - ], - "name": "InsufficientFeeToSendMsg", - "type": "error" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "wTime", "type": "uint256" } - ], - "name": "InvalidWTime", - "type": "error" - }, - { "inputs": [], "name": "VEExceededMaxLockTime", "type": "error" }, - { "inputs": [], "name": "VEInsufficientLockTime", "type": "error" }, - { "inputs": [], "name": "VENotAllowedReduceExpiry", "type": "error" }, - { "inputs": [], "name": "VEPositionNotExpired", "type": "error" }, - { "inputs": [], "name": "VEZeroAmountLocked", "type": "error" }, - { "inputs": [], "name": "VEZeroPosition", "type": "error" }, - { "inputs": [], "name": "ZeroAddress", "type": "error" }, - { - "anonymous": false, - "inputs": [ - { - "components": [ - { - "internalType": "uint128", - "name": "bias", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "slope", - "type": "uint128" - } - ], - "indexed": false, - "internalType": "struct VeBalance", - "name": "newTotalSupply", - "type": "tuple" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "chainIds", - "type": "uint256[]" - } - ], - "name": "BroadcastTotalSupply", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "chainIds", - "type": "uint256[]" - } - ], - "name": "BroadcastUserPosition", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "expiry", - "type": "uint128" - } - ], - "name": "NewLockPosition", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "Withdraw", - "type": "event" - }, - { - "inputs": [], - "name": "MAX_LOCK_TIME", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MIN_LOCK_TIME", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WEEK", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - }, - { "internalType": "uint256", "name": "_chainId", "type": "uint256" } - ], - "name": "addDestinationContract", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "approxDstExecutionGas", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "user", "type": "address" } - ], - "name": "balanceOf", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "chainIds", - "type": "uint256[]" - } - ], - "name": "broadcastTotalSupply", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "user", "type": "address" }, - { - "internalType": "uint256[]", - "name": "chainIds", - "type": "uint256[]" - } - ], - "name": "broadcastUserPosition", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "claimOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getAllDestinationContracts", - "outputs": [ - { - "internalType": "uint256[]", - "name": "chainIds", - "type": "uint256[]" - }, - { - "internalType": "address[]", - "name": "addrs", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "chainIds", - "type": "uint256[]" - } - ], - "name": "getBroadcastPositionFee", - "outputs": [ - { "internalType": "uint256", "name": "fee", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "chainIds", - "type": "uint256[]" - } - ], - "name": "getBroadcastSupplyFee", - "outputs": [ - { "internalType": "uint256", "name": "fee", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "user", "type": "address" }, - { "internalType": "uint256", "name": "index", "type": "uint256" } - ], - "name": "getUserHistoryAt", - "outputs": [ - { - "components": [ - { - "internalType": "uint128", - "name": "timestamp", - "type": "uint128" - }, - { - "components": [ - { - "internalType": "uint128", - "name": "bias", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "slope", - "type": "uint128" - } - ], - "internalType": "struct VeBalance", - "name": "value", - "type": "tuple" - } - ], - "internalType": "struct Checkpoint", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "user", "type": "address" } - ], - "name": "getUserHistoryLength", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "additionalAmountToLock", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "newExpiry", - "type": "uint128" - } - ], - "name": "increaseLockPosition", - "outputs": [ - { - "internalType": "uint128", - "name": "newVeBalance", - "type": "uint128" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint128", - "name": "additionalAmountToLock", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "newExpiry", - "type": "uint128" - }, - { - "internalType": "uint256[]", - "name": "chainIds", - "type": "uint256[]" - } - ], - "name": "increaseLockPositionAndBroadcast", - "outputs": [ - { - "internalType": "uint128", - "name": "newVeBalance", - "type": "uint128" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "lastSlopeChangeAppliedAt", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendingOwner", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendle", - "outputs": [ - { "internalType": "contract IERC20", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendleMsgSendEndpoint", - "outputs": [ - { - "internalType": "contract IPMsgSendEndpoint", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "name": "positionData", - "outputs": [ - { "internalType": "uint128", "name": "amount", "type": "uint128" }, - { "internalType": "uint128", "name": "expiry", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "gas", "type": "uint256" } - ], - "name": "setApproxDstExecutionGas", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "name": "slopeChanges", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "user", "type": "address" } - ], - "name": "totalSupplyAndBalanceCurrent", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" }, - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "name": "totalSupplyAt", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupplyCurrent", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupplyStored", - "outputs": [ - { "internalType": "uint128", "name": "", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - }, - { "internalType": "bool", "name": "direct", "type": "bool" }, - { "internalType": "bool", "name": "renounce", "type": "bool" } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "withdraw", - "outputs": [ - { "internalType": "uint128", "name": "amount", "type": "uint128" } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/services/decoder/protocols/pendle/pendle.decoders.ts b/services/decoder/protocols/pendle/pendle.decoders.ts index 7a1e532..6a0ae9c 100644 --- a/services/decoder/protocols/pendle/pendle.decoders.ts +++ b/services/decoder/protocols/pendle/pendle.decoders.ts @@ -1,15 +1,15 @@ +import { prettifyCurrency } from "@covalenthq/client-sdk"; +import { decodeEventLog, type Abi } from "viem"; +import { timestampParser } from "../../../../utils/functions"; import { GoldRushDecoder } from "../../decoder"; -import type { EventDetails, EventTokens } from "../../decoder.types"; -import { type EventType } from "../../decoder.types"; import { DECODED_ACTION, DECODED_EVENT_CATEGORY, } from "../../decoder.constants"; -import { decodeEventLog, type Abi } from "viem"; -import ROUTER_V3_ABI from "./abis/pendle-router-v3.abi.json"; -import VEPENDLE_ABI from "./abis/vePendle.abi.json"; -import { timestampParser } from "../../../../utils/functions"; -import { prettifyCurrency } from "@covalenthq/client-sdk"; +import type { EventDetails, EventTokens } from "../../decoder.types"; +import { type EventType } from "../../decoder.types"; +import { pendleRouterV3ABI } from "./abis/pendle-router-v3.abi"; +import { vePendleABI } from "./abis/ve-pendle.abi"; const PT_TOKEN_ADDRESS = "0xc69Ad9baB1dEE23F4605a82b3354F8E40d1E5966"; const SY_TOKEN_ADDRESS = "0xAC0047886a985071476a1186bE89222659970d65"; const YT_TOKEN_ADDRESS = "0xfb35Fd0095dD1096b1Ca49AD44d8C5812A201677"; @@ -18,7 +18,7 @@ const PENDLE_TOKEN_ADDRESS = "0x808507121B80c02388fAd14726482e061B8da827"; GoldRushDecoder.on( "pendle:SwapPtAndToken", ["eth-mainnet"], - ROUTER_V3_ABI as Abi, + pendleRouterV3ABI as Abi, async ( log_event, tx, @@ -29,22 +29,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: ROUTER_V3_ABI, + abi: pendleRouterV3ABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "SwapPtAndToken", - }) as { - eventName: "SwapPtAndToken"; - args: { - caller: string; - market: string; - token: string; - receiver: string; - netPtToAccount: bigint; - netTokenToAccount: bigint; - netSyInterm: bigint; - }; - }; + }); const date = timestampParser(tx.block_signed_at, "YYYY-MM-DD"); @@ -175,7 +164,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "pendle:SwapYtAndSy", ["eth-mainnet"], - ROUTER_V3_ABI as Abi, + pendleRouterV3ABI as Abi, async ( log_event, tx, @@ -186,20 +175,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: ROUTER_V3_ABI, + abi: pendleRouterV3ABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "SwapYtAndSy", - }) as { - eventName: "SwapYtAndSy"; - args: { - caller: string; - market: string; - receiver: string; - netYtToAccount: bigint; - netSyToAccount: bigint; - }; - }; + }); const date = timestampParser(tx.block_signed_at, "YYYY-MM-DD"); @@ -294,7 +274,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "pendle:SwapYtAndToken", ["eth-mainnet"], - ROUTER_V3_ABI as Abi, + pendleRouterV3ABI as Abi, async ( log_event, tx, @@ -305,22 +285,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: ROUTER_V3_ABI, + abi: pendleRouterV3ABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "SwapYtAndToken", - }) as { - eventName: "SwapYtAndToken"; - args: { - caller: string; - market: string; - token: string; - receiver: string; - netYtToAccount: bigint; - netTokenToAccount: bigint; - netSyInterm: bigint; - }; - }; + }); const date = timestampParser(tx.block_signed_at, "YYYY-MM-DD"); @@ -451,7 +420,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "pendle:NewLockPosition", ["eth-mainnet"], - VEPENDLE_ABI as Abi, + vePendleABI as Abi, async ( log_event, tx, @@ -462,18 +431,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: VEPENDLE_ABI, + abi: vePendleABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "NewLockPosition", - }) as { - eventName: "NewLockPosition"; - args: { - user: string; - amount: bigint; - expiry: bigint; - }; - }; + }); const date = timestampParser(tx.block_signed_at, "YYYY-MM-DD"); @@ -540,7 +502,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "pendle:BroadcastUserPosition", ["eth-mainnet"], - VEPENDLE_ABI as Abi, + vePendleABI as Abi, async ( log_event, tx, @@ -551,17 +513,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: VEPENDLE_ABI, + abi: vePendleABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "BroadcastUserPosition", - }) as { - eventName: "BroadcastUserPosition"; - args: { - user: string; - chainIds: Array; - }; - }; + }); const details: EventDetails = [ { @@ -593,7 +549,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "pendle:BroadcastTotalSupply", ["eth-mainnet"], - VEPENDLE_ABI as Abi, + vePendleABI as Abi, async ( log_event, tx, @@ -604,20 +560,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: VEPENDLE_ABI, + abi: vePendleABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "BroadcastTotalSupply", - }) as { - eventName: "BroadcastTotalSupply"; - args: { - newTotalSupply: { - bias: bigint; - slope: bigint; - }; - chainIds: Array; - }; - }; + }); const details: EventDetails = [ { diff --git a/services/decoder/protocols/renzo/abis/eigen-layer-strategy-manager.abi.ts b/services/decoder/protocols/renzo/abis/eigen-layer-strategy-manager.abi.ts new file mode 100644 index 0000000..5604f60 --- /dev/null +++ b/services/decoder/protocols/renzo/abis/eigen-layer-strategy-manager.abi.ts @@ -0,0 +1,1104 @@ +export const eigenLayerStrategyManagerABI = [ + { + inputs: [ + { + internalType: "contract IDelegationManager", + name: "_delegation", + type: "address", + }, + { + internalType: "contract IEigenPodManager", + name: "_eigenPodManager", + type: "address", + }, + { + internalType: "contract ISlasher", + name: "_slasher", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "depositor", + type: "address", + }, + { + indexed: false, + internalType: "contract IERC20", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "contract IStrategy", + name: "strategy", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "shares", + type: "uint256", + }, + ], + name: "Deposit", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "version", + type: "uint8", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "newPausedStatus", + type: "uint256", + }, + ], + name: "Paused", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "contract IPauserRegistry", + name: "pauserRegistry", + type: "address", + }, + { + indexed: false, + internalType: "contract IPauserRegistry", + name: "newPauserRegistry", + type: "address", + }, + ], + name: "PauserRegistrySet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "depositor", + type: "address", + }, + { + indexed: false, + internalType: "uint96", + name: "nonce", + type: "uint96", + }, + { + indexed: false, + internalType: "contract IStrategy", + name: "strategy", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "shares", + type: "uint256", + }, + ], + name: "ShareWithdrawalQueued", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "contract IStrategy", + name: "strategy", + type: "address", + }, + ], + name: "StrategyAddedToDepositWhitelist", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "contract IStrategy", + name: "strategy", + type: "address", + }, + ], + name: "StrategyRemovedFromDepositWhitelist", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "previousAddress", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newAddress", + type: "address", + }, + ], + name: "StrategyWhitelisterChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "newPausedStatus", + type: "uint256", + }, + ], + name: "Unpaused", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "depositor", + type: "address", + }, + { + indexed: false, + internalType: "uint96", + name: "nonce", + type: "uint96", + }, + { + indexed: true, + internalType: "address", + name: "withdrawer", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "withdrawalRoot", + type: "bytes32", + }, + ], + name: "WithdrawalCompleted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "previousValue", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newValue", + type: "uint256", + }, + ], + name: "WithdrawalDelayBlocksSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "depositor", + type: "address", + }, + { + indexed: false, + internalType: "uint96", + name: "nonce", + type: "uint96", + }, + { + indexed: false, + internalType: "address", + name: "withdrawer", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "delegatedAddress", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "withdrawalRoot", + type: "bytes32", + }, + ], + name: "WithdrawalQueued", + type: "event", + }, + { + inputs: [], + name: "DEPOSIT_TYPEHASH", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "DOMAIN_TYPEHASH", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MAX_WITHDRAWAL_DELAY_BLOCKS", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IStrategy[]", + name: "strategiesToWhitelist", + type: "address[]", + }, + ], + name: "addStrategiesToDepositWhitelist", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "", type: "address" }], + name: "beaconChainETHSharesToDecrementOnWithdrawal", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "beaconChainETHStrategy", + outputs: [ + { + internalType: "contract IStrategy", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "contract IStrategy[]", + name: "strategies", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "shares", + type: "uint256[]", + }, + { + internalType: "address", + name: "depositor", + type: "address", + }, + { + components: [ + { + internalType: "address", + name: "withdrawer", + type: "address", + }, + { + internalType: "uint96", + name: "nonce", + type: "uint96", + }, + ], + internalType: + "struct IStrategyManager.WithdrawerAndNonce", + name: "withdrawerAndNonce", + type: "tuple", + }, + { + internalType: "uint32", + name: "withdrawalStartBlock", + type: "uint32", + }, + { + internalType: "address", + name: "delegatedAddress", + type: "address", + }, + ], + internalType: "struct IStrategyManager.QueuedWithdrawal", + name: "queuedWithdrawal", + type: "tuple", + }, + ], + name: "calculateWithdrawalRoot", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "contract IStrategy[]", + name: "strategies", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "shares", + type: "uint256[]", + }, + { + internalType: "address", + name: "depositor", + type: "address", + }, + { + components: [ + { + internalType: "address", + name: "withdrawer", + type: "address", + }, + { + internalType: "uint96", + name: "nonce", + type: "uint96", + }, + ], + internalType: + "struct IStrategyManager.WithdrawerAndNonce", + name: "withdrawerAndNonce", + type: "tuple", + }, + { + internalType: "uint32", + name: "withdrawalStartBlock", + type: "uint32", + }, + { + internalType: "address", + name: "delegatedAddress", + type: "address", + }, + ], + internalType: "struct IStrategyManager.QueuedWithdrawal", + name: "queuedWithdrawal", + type: "tuple", + }, + { + internalType: "contract IERC20[]", + name: "tokens", + type: "address[]", + }, + { + internalType: "uint256", + name: "middlewareTimesIndex", + type: "uint256", + }, + { + internalType: "bool", + name: "receiveAsTokens", + type: "bool", + }, + ], + name: "completeQueuedWithdrawal", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "contract IStrategy[]", + name: "strategies", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "shares", + type: "uint256[]", + }, + { + internalType: "address", + name: "depositor", + type: "address", + }, + { + components: [ + { + internalType: "address", + name: "withdrawer", + type: "address", + }, + { + internalType: "uint96", + name: "nonce", + type: "uint96", + }, + ], + internalType: + "struct IStrategyManager.WithdrawerAndNonce", + name: "withdrawerAndNonce", + type: "tuple", + }, + { + internalType: "uint32", + name: "withdrawalStartBlock", + type: "uint32", + }, + { + internalType: "address", + name: "delegatedAddress", + type: "address", + }, + ], + internalType: "struct IStrategyManager.QueuedWithdrawal[]", + name: "queuedWithdrawals", + type: "tuple[]", + }, + { + internalType: "contract IERC20[][]", + name: "tokens", + type: "address[][]", + }, + { + internalType: "uint256[]", + name: "middlewareTimesIndexes", + type: "uint256[]", + }, + { + internalType: "bool[]", + name: "receiveAsTokens", + type: "bool[]", + }, + ], + name: "completeQueuedWithdrawals", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "delegation", + outputs: [ + { + internalType: "contract IDelegationManager", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "staker", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "depositBeaconChainETH", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IStrategy", + name: "strategy", + type: "address", + }, + { + internalType: "contract IERC20", + name: "token", + type: "address", + }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "depositIntoStrategy", + outputs: [{ internalType: "uint256", name: "shares", type: "uint256" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IStrategy", + name: "strategy", + type: "address", + }, + { + internalType: "contract IERC20", + name: "token", + type: "address", + }, + { internalType: "uint256", name: "amount", type: "uint256" }, + { internalType: "address", name: "staker", type: "address" }, + { internalType: "uint256", name: "expiry", type: "uint256" }, + { internalType: "bytes", name: "signature", type: "bytes" }, + ], + name: "depositIntoStrategyWithSignature", + outputs: [{ internalType: "uint256", name: "shares", type: "uint256" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "eigenPodManager", + outputs: [ + { + internalType: "contract IEigenPodManager", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "depositor", + type: "address", + }, + ], + name: "getDeposits", + outputs: [ + { + internalType: "contract IStrategy[]", + name: "", + type: "address[]", + }, + { internalType: "uint256[]", name: "", type: "uint256[]" }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "initialOwner", + type: "address", + }, + { + internalType: "address", + name: "initialStrategyWhitelister", + type: "address", + }, + { + internalType: "contract IPauserRegistry", + name: "_pauserRegistry", + type: "address", + }, + { + internalType: "uint256", + name: "initialPausedStatus", + type: "uint256", + }, + { + internalType: "uint256", + name: "_withdrawalDelayBlocks", + type: "uint256", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "", type: "address" }], + name: "nonces", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "", type: "address" }], + name: "numWithdrawalsQueued", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "newPausedStatus", + type: "uint256", + }, + ], + name: "pause", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "pauseAll", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "uint8", name: "index", type: "uint8" }], + name: "paused", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "paused", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "pauserRegistry", + outputs: [ + { + internalType: "contract IPauserRegistry", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "strategyIndexes", + type: "uint256[]", + }, + { + internalType: "contract IStrategy[]", + name: "strategies", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "shares", + type: "uint256[]", + }, + { + internalType: "address", + name: "withdrawer", + type: "address", + }, + { + internalType: "bool", + name: "undelegateIfPossible", + type: "bool", + }, + ], + name: "queueWithdrawal", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "overcommittedPodOwner", + type: "address", + }, + { + internalType: "uint256", + name: "beaconChainETHStrategyIndex", + type: "uint256", + }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "recordOvercommittedBeaconChainETH", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IStrategy[]", + name: "strategiesToRemoveFromWhitelist", + type: "address[]", + }, + ], + name: "removeStrategiesFromDepositWhitelist", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IPauserRegistry", + name: "newPauserRegistry", + type: "address", + }, + ], + name: "setPauserRegistry", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newStrategyWhitelister", + type: "address", + }, + ], + name: "setStrategyWhitelister", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_withdrawalDelayBlocks", + type: "uint256", + }, + ], + name: "setWithdrawalDelayBlocks", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + components: [ + { + internalType: "contract IStrategy[]", + name: "strategies", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "shares", + type: "uint256[]", + }, + { + internalType: "address", + name: "depositor", + type: "address", + }, + { + components: [ + { + internalType: "address", + name: "withdrawer", + type: "address", + }, + { + internalType: "uint96", + name: "nonce", + type: "uint96", + }, + ], + internalType: + "struct IStrategyManager.WithdrawerAndNonce", + name: "withdrawerAndNonce", + type: "tuple", + }, + { + internalType: "uint32", + name: "withdrawalStartBlock", + type: "uint32", + }, + { + internalType: "address", + name: "delegatedAddress", + type: "address", + }, + ], + internalType: "struct IStrategyManager.QueuedWithdrawal", + name: "queuedWithdrawal", + type: "tuple", + }, + { + internalType: "contract IERC20[]", + name: "tokens", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "indicesToSkip", + type: "uint256[]", + }, + ], + name: "slashQueuedWithdrawal", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "slashedAddress", + type: "address", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "contract IStrategy[]", + name: "strategies", + type: "address[]", + }, + { + internalType: "contract IERC20[]", + name: "tokens", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "strategyIndexes", + type: "uint256[]", + }, + { + internalType: "uint256[]", + name: "shareAmounts", + type: "uint256[]", + }, + ], + name: "slashShares", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "slasher", + outputs: [ + { + internalType: "contract ISlasher", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "", type: "address" }, + { internalType: "uint256", name: "", type: "uint256" }, + ], + name: "stakerStrategyList", + outputs: [ + { + internalType: "contract IStrategy", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "staker", type: "address" }], + name: "stakerStrategyListLength", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "", type: "address" }, + { + internalType: "contract IStrategy", + name: "", + type: "address", + }, + ], + name: "stakerStrategyShares", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IStrategy", + name: "", + type: "address", + }, + ], + name: "strategyIsWhitelistedForDeposit", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "strategyWhitelister", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "newOwner", type: "address" }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "undelegate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "newPausedStatus", + type: "uint256", + }, + ], + name: "unpause", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "withdrawalDelayBlocks", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + name: "withdrawalRootPending", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, +] as const; diff --git a/services/decoder/protocols/renzo/abis/renzo.deposit-queue-abi.json b/services/decoder/protocols/renzo/abis/renzo.deposit-queue-abi.json deleted file mode 100644 index 7c556b9..0000000 --- a/services/decoder/protocols/renzo/abis/renzo.deposit-queue-abi.json +++ /dev/null @@ -1,283 +0,0 @@ -[ - { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, - { "inputs": [], "name": "InvalidZeroInput", "type": "error" }, - { "inputs": [], "name": "NotERC20RewardsAdmin", "type": "error" }, - { "inputs": [], "name": "NotNativeEthRestakeAdmin", "type": "error" }, - { "inputs": [], "name": "NotRestakeManager", "type": "error" }, - { "inputs": [], "name": "NotRestakeManagerAdmin", "type": "error" }, - { "inputs": [], "name": "OverMaxBasisPoints", "type": "error" }, - { "inputs": [], "name": "TransferFailed", "type": "error" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "ETHDepositedFromProtocol", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract IOperatorDelegator", - "name": "operatorDelegator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "pubkey", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountStaked", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountQueued", - "type": "uint256" - } - ], - "name": "ETHStakedFromQueue", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "feeAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeBasisPoints", - "type": "uint256" - } - ], - "name": "FeeConfigUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "destination", - "type": "address" - } - ], - "name": "ProtocolFeesPaid", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract IRestakeManager", - "name": "restakeManager", - "type": "address" - } - ], - "name": "RestakeManagerUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "RewardsDeposited", - "type": "event" - }, - { - "inputs": [], - "name": "depositETHFromProtocol", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "feeAddress", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "feeBasisPoints", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IRoleManager", - "name": "_roleManager", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "restakeManager", - "outputs": [ - { - "internalType": "contract IRestakeManager", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "roleManager", - "outputs": [ - { - "internalType": "contract IRoleManager", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_feeAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_feeBasisPoints", - "type": "uint256" - } - ], - "name": "setFeeConfig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IRestakeManager", - "name": "_restakeManager", - "type": "address" - } - ], - "name": "setRestakeManager", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IOperatorDelegator", - "name": "operatorDelegator", - "type": "address" - }, - { "internalType": "bytes", "name": "pubkey", "type": "bytes" }, - { "internalType": "bytes", "name": "signature", "type": "bytes" }, - { - "internalType": "bytes32", - "name": "depositDataRoot", - "type": "bytes32" - } - ], - "name": "stakeEthFromQueue", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - } - ], - "name": "sweepERC20", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "name": "totalEarned", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { "stateMutability": "payable", "type": "receive" } -] diff --git a/services/decoder/protocols/renzo/abis/renzo.eigen-layer-strategy-manager.json b/services/decoder/protocols/renzo/abis/renzo.eigen-layer-strategy-manager.json deleted file mode 100644 index 28b7ad1..0000000 --- a/services/decoder/protocols/renzo/abis/renzo.eigen-layer-strategy-manager.json +++ /dev/null @@ -1,1146 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "contract IDelegationManager", - "name": "_delegation", - "type": "address" - }, - { - "internalType": "contract IEigenPodManager", - "name": "_eigenPodManager", - "type": "address" - }, - { - "internalType": "contract ISlasher", - "name": "_slasher", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "depositor", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IStrategy", - "name": "strategy", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newPausedStatus", - "type": "uint256" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract IPauserRegistry", - "name": "pauserRegistry", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IPauserRegistry", - "name": "newPauserRegistry", - "type": "address" - } - ], - "name": "PauserRegistrySet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "depositor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint96", - "name": "nonce", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "contract IStrategy", - "name": "strategy", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "name": "ShareWithdrawalQueued", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract IStrategy", - "name": "strategy", - "type": "address" - } - ], - "name": "StrategyAddedToDepositWhitelist", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract IStrategy", - "name": "strategy", - "type": "address" - } - ], - "name": "StrategyRemovedFromDepositWhitelist", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "StrategyWhitelisterChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newPausedStatus", - "type": "uint256" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "depositor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint96", - "name": "nonce", - "type": "uint96" - }, - { - "indexed": true, - "internalType": "address", - "name": "withdrawer", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "withdrawalRoot", - "type": "bytes32" - } - ], - "name": "WithdrawalCompleted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "previousValue", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newValue", - "type": "uint256" - } - ], - "name": "WithdrawalDelayBlocksSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "depositor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint96", - "name": "nonce", - "type": "uint96" - }, - { - "indexed": false, - "internalType": "address", - "name": "withdrawer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "delegatedAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "withdrawalRoot", - "type": "bytes32" - } - ], - "name": "WithdrawalQueued", - "type": "event" - }, - { - "inputs": [], - "name": "DEPOSIT_TYPEHASH", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DOMAIN_TYPEHASH", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_WITHDRAWAL_DELAY_BLOCKS", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IStrategy[]", - "name": "strategiesToWhitelist", - "type": "address[]" - } - ], - "name": "addStrategiesToDepositWhitelist", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "name": "beaconChainETHSharesToDecrementOnWithdrawal", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "beaconChainETHStrategy", - "outputs": [ - { - "internalType": "contract IStrategy", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "contract IStrategy[]", - "name": "strategies", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "shares", - "type": "uint256[]" - }, - { - "internalType": "address", - "name": "depositor", - "type": "address" - }, - { - "components": [ - { - "internalType": "address", - "name": "withdrawer", - "type": "address" - }, - { - "internalType": "uint96", - "name": "nonce", - "type": "uint96" - } - ], - "internalType": "struct IStrategyManager.WithdrawerAndNonce", - "name": "withdrawerAndNonce", - "type": "tuple" - }, - { - "internalType": "uint32", - "name": "withdrawalStartBlock", - "type": "uint32" - }, - { - "internalType": "address", - "name": "delegatedAddress", - "type": "address" - } - ], - "internalType": "struct IStrategyManager.QueuedWithdrawal", - "name": "queuedWithdrawal", - "type": "tuple" - } - ], - "name": "calculateWithdrawalRoot", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "contract IStrategy[]", - "name": "strategies", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "shares", - "type": "uint256[]" - }, - { - "internalType": "address", - "name": "depositor", - "type": "address" - }, - { - "components": [ - { - "internalType": "address", - "name": "withdrawer", - "type": "address" - }, - { - "internalType": "uint96", - "name": "nonce", - "type": "uint96" - } - ], - "internalType": "struct IStrategyManager.WithdrawerAndNonce", - "name": "withdrawerAndNonce", - "type": "tuple" - }, - { - "internalType": "uint32", - "name": "withdrawalStartBlock", - "type": "uint32" - }, - { - "internalType": "address", - "name": "delegatedAddress", - "type": "address" - } - ], - "internalType": "struct IStrategyManager.QueuedWithdrawal", - "name": "queuedWithdrawal", - "type": "tuple" - }, - { - "internalType": "contract IERC20[]", - "name": "tokens", - "type": "address[]" - }, - { - "internalType": "uint256", - "name": "middlewareTimesIndex", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "receiveAsTokens", - "type": "bool" - } - ], - "name": "completeQueuedWithdrawal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "contract IStrategy[]", - "name": "strategies", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "shares", - "type": "uint256[]" - }, - { - "internalType": "address", - "name": "depositor", - "type": "address" - }, - { - "components": [ - { - "internalType": "address", - "name": "withdrawer", - "type": "address" - }, - { - "internalType": "uint96", - "name": "nonce", - "type": "uint96" - } - ], - "internalType": "struct IStrategyManager.WithdrawerAndNonce", - "name": "withdrawerAndNonce", - "type": "tuple" - }, - { - "internalType": "uint32", - "name": "withdrawalStartBlock", - "type": "uint32" - }, - { - "internalType": "address", - "name": "delegatedAddress", - "type": "address" - } - ], - "internalType": "struct IStrategyManager.QueuedWithdrawal[]", - "name": "queuedWithdrawals", - "type": "tuple[]" - }, - { - "internalType": "contract IERC20[][]", - "name": "tokens", - "type": "address[][]" - }, - { - "internalType": "uint256[]", - "name": "middlewareTimesIndexes", - "type": "uint256[]" - }, - { - "internalType": "bool[]", - "name": "receiveAsTokens", - "type": "bool[]" - } - ], - "name": "completeQueuedWithdrawals", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "delegation", - "outputs": [ - { - "internalType": "contract IDelegationManager", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "staker", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "depositBeaconChainETH", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IStrategy", - "name": "strategy", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "depositIntoStrategy", - "outputs": [ - { "internalType": "uint256", "name": "shares", "type": "uint256" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IStrategy", - "name": "strategy", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { "internalType": "address", "name": "staker", "type": "address" }, - { "internalType": "uint256", "name": "expiry", "type": "uint256" }, - { "internalType": "bytes", "name": "signature", "type": "bytes" } - ], - "name": "depositIntoStrategyWithSignature", - "outputs": [ - { "internalType": "uint256", "name": "shares", "type": "uint256" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "eigenPodManager", - "outputs": [ - { - "internalType": "contract IEigenPodManager", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "depositor", - "type": "address" - } - ], - "name": "getDeposits", - "outputs": [ - { - "internalType": "contract IStrategy[]", - "name": "", - "type": "address[]" - }, - { "internalType": "uint256[]", "name": "", "type": "uint256[]" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "initialOwner", - "type": "address" - }, - { - "internalType": "address", - "name": "initialStrategyWhitelister", - "type": "address" - }, - { - "internalType": "contract IPauserRegistry", - "name": "_pauserRegistry", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialPausedStatus", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_withdrawalDelayBlocks", - "type": "uint256" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "name": "nonces", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "name": "numWithdrawalsQueued", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newPausedStatus", - "type": "uint256" - } - ], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pauseAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint8", "name": "index", "type": "uint8" } - ], - "name": "paused", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pauserRegistry", - "outputs": [ - { - "internalType": "contract IPauserRegistry", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "strategyIndexes", - "type": "uint256[]" - }, - { - "internalType": "contract IStrategy[]", - "name": "strategies", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "shares", - "type": "uint256[]" - }, - { - "internalType": "address", - "name": "withdrawer", - "type": "address" - }, - { - "internalType": "bool", - "name": "undelegateIfPossible", - "type": "bool" - } - ], - "name": "queueWithdrawal", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "overcommittedPodOwner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "beaconChainETHStrategyIndex", - "type": "uint256" - }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "recordOvercommittedBeaconChainETH", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IStrategy[]", - "name": "strategiesToRemoveFromWhitelist", - "type": "address[]" - } - ], - "name": "removeStrategiesFromDepositWhitelist", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IPauserRegistry", - "name": "newPauserRegistry", - "type": "address" - } - ], - "name": "setPauserRegistry", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newStrategyWhitelister", - "type": "address" - } - ], - "name": "setStrategyWhitelister", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_withdrawalDelayBlocks", - "type": "uint256" - } - ], - "name": "setWithdrawalDelayBlocks", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "components": [ - { - "internalType": "contract IStrategy[]", - "name": "strategies", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "shares", - "type": "uint256[]" - }, - { - "internalType": "address", - "name": "depositor", - "type": "address" - }, - { - "components": [ - { - "internalType": "address", - "name": "withdrawer", - "type": "address" - }, - { - "internalType": "uint96", - "name": "nonce", - "type": "uint96" - } - ], - "internalType": "struct IStrategyManager.WithdrawerAndNonce", - "name": "withdrawerAndNonce", - "type": "tuple" - }, - { - "internalType": "uint32", - "name": "withdrawalStartBlock", - "type": "uint32" - }, - { - "internalType": "address", - "name": "delegatedAddress", - "type": "address" - } - ], - "internalType": "struct IStrategyManager.QueuedWithdrawal", - "name": "queuedWithdrawal", - "type": "tuple" - }, - { - "internalType": "contract IERC20[]", - "name": "tokens", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "indicesToSkip", - "type": "uint256[]" - } - ], - "name": "slashQueuedWithdrawal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "slashedAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "contract IStrategy[]", - "name": "strategies", - "type": "address[]" - }, - { - "internalType": "contract IERC20[]", - "name": "tokens", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "strategyIndexes", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "shareAmounts", - "type": "uint256[]" - } - ], - "name": "slashShares", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "slasher", - "outputs": [ - { - "internalType": "contract ISlasher", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "name": "stakerStrategyList", - "outputs": [ - { - "internalType": "contract IStrategy", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "staker", "type": "address" } - ], - "name": "stakerStrategyListLength", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "", "type": "address" }, - { - "internalType": "contract IStrategy", - "name": "", - "type": "address" - } - ], - "name": "stakerStrategyShares", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IStrategy", - "name": "", - "type": "address" - } - ], - "name": "strategyIsWhitelistedForDeposit", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "strategyWhitelister", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "newOwner", "type": "address" } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "undelegate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newPausedStatus", - "type": "uint256" - } - ], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "withdrawalDelayBlocks", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "name": "withdrawalRootPending", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - } -] diff --git a/services/decoder/protocols/renzo/abis/renzo.restake-manager-abi.json b/services/decoder/protocols/renzo/abis/renzo.restake-manager-abi.json deleted file mode 100644 index 8c5a6d3..0000000 --- a/services/decoder/protocols/renzo/abis/renzo.restake-manager-abi.json +++ /dev/null @@ -1,765 +0,0 @@ -[ - { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, - { "inputs": [], "name": "AlreadyAdded", "type": "error" }, - { "inputs": [], "name": "ContractPaused", "type": "error" }, - { - "inputs": [ - { "internalType": "uint8", "name": "expected", "type": "uint8" }, - { "internalType": "uint8", "name": "actual", "type": "uint8" } - ], - "name": "InvalidTokenDecimals", - "type": "error" - }, - { "inputs": [], "name": "InvalidZeroInput", "type": "error" }, - { "inputs": [], "name": "MaxTVLReached", "type": "error" }, - { "inputs": [], "name": "MaxTokenTVLReached", "type": "error" }, - { "inputs": [], "name": "NotDepositQueue", "type": "error" }, - { "inputs": [], "name": "NotDepositWithdrawPauser", "type": "error" }, - { "inputs": [], "name": "NotFound", "type": "error" }, - { "inputs": [], "name": "NotRestakeManagerAdmin", "type": "error" }, - { "inputs": [], "name": "OverMaxBasisPoints", "type": "error" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - } - ], - "name": "CollateralTokenAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - } - ], - "name": "CollateralTokenRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tvl", - "type": "uint256" - } - ], - "name": "CollateralTokenTvlUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "depositor", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "ezETHMinted", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "referralId", - "type": "uint256" - } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract IOperatorDelegator", - "name": "od", - "type": "address" - } - ], - "name": "OperatorDelegatorAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract IOperatorDelegator", - "name": "od", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "allocation", - "type": "uint256" - } - ], - "name": "OperatorDelegatorAllocationUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract IOperatorDelegator", - "name": "od", - "type": "address" - } - ], - "name": "OperatorDelegatorRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "withdrawalRoot", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "address", - "name": "withdrawer", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "ezETHBurned", - "type": "uint256" - } - ], - "name": "UserWithdrawCompleted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "withdrawalRoot", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "address", - "name": "withdrawer", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract IERC20", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "ezETHToBurn", - "type": "uint256" - } - ], - "name": "UserWithdrawStarted", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_newCollateralToken", - "type": "address" - } - ], - "name": "addCollateralToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IOperatorDelegator", - "name": "_newOperatorDelegator", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_allocationBasisPoints", - "type": "uint256" - } - ], - "name": "addOperatorDelegator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "calculateTVLs", - "outputs": [ - { - "internalType": "uint256[][]", - "name": "", - "type": "uint256[][]" - }, - { "internalType": "uint256[]", "name": "", "type": "uint256[]" }, - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "tvls", - "type": "uint256[]" - }, - { "internalType": "uint256", "name": "totalTVL", "type": "uint256" } - ], - "name": "chooseOperatorDelegatorForDeposit", - "outputs": [ - { - "internalType": "contract IOperatorDelegator", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "ezETHValue", - "type": "uint256" - }, - { - "internalType": "uint256[][]", - "name": "operatorDelegatorTokenTVLs", - "type": "uint256[][]" - }, - { - "internalType": "uint256[]", - "name": "operatorDelegatorTVLs", - "type": "uint256[]" - }, - { "internalType": "uint256", "name": "totalTVL", "type": "uint256" } - ], - "name": "chooseOperatorDelegatorForWithdraw", - "outputs": [ - { - "internalType": "contract IOperatorDelegator", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "contract IERC20", "name": "", "type": "address" } - ], - "name": "collateralTokenTvlLimits", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "name": "collateralTokens", - "outputs": [ - { "internalType": "contract IERC20", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "delegationManager", - "outputs": [ - { - "internalType": "contract IDelegationManager", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_collateralToken", - "type": "address" - }, - { "internalType": "uint256", "name": "_amount", "type": "uint256" }, - { - "internalType": "uint256", - "name": "_referralId", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_collateralToken", - "type": "address" - }, - { "internalType": "uint256", "name": "_amount", "type": "uint256" } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_referralId", - "type": "uint256" - } - ], - "name": "depositETH", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "depositETH", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "depositQueue", - "outputs": [ - { - "internalType": "contract IDepositQueue", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - }, - { "internalType": "uint256", "name": "_amount", "type": "uint256" } - ], - "name": "depositTokenRewardsFromProtocol", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "ezETH", - "outputs": [ - { - "internalType": "contract IEzEthToken", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_collateralToken", - "type": "address" - } - ], - "name": "getCollateralTokenIndex", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getCollateralTokensLength", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getOperatorDelegatorsLength", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalRewardsEarned", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IRoleManager", - "name": "_roleManager", - "type": "address" - }, - { - "internalType": "contract IEzEthToken", - "name": "_ezETH", - "type": "address" - }, - { - "internalType": "contract IRenzoOracle", - "name": "_renzoOracle", - "type": "address" - }, - { - "internalType": "contract IStrategyManager", - "name": "_strategyManager", - "type": "address" - }, - { - "internalType": "contract IDelegationManager", - "name": "_delegationManager", - "type": "address" - }, - { - "internalType": "contract IDepositQueue", - "name": "_depositQueue", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "maxDepositTVL", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IOperatorDelegator", - "name": "", - "type": "address" - } - ], - "name": "operatorDelegatorAllocations", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "name": "operatorDelegators", - "outputs": [ - { - "internalType": "contract IOperatorDelegator", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "name": "pendingWithdrawals", - "outputs": [ - { - "internalType": "uint256", - "name": "ezETHToBurn", - "type": "uint256" - }, - { - "internalType": "address", - "name": "withdrawer", - "type": "address" - }, - { - "internalType": "contract IERC20", - "name": "tokenToWithdraw", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenAmountToWithdraw", - "type": "uint256" - }, - { - "internalType": "contract IOperatorDelegator", - "name": "operatorDelegator", - "type": "address" - }, - { "internalType": "bool", "name": "completed", "type": "bool" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_collateralTokenToRemove", - "type": "address" - } - ], - "name": "removeCollateralToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IOperatorDelegator", - "name": "_operatorDelegatorToRemove", - "type": "address" - } - ], - "name": "removeOperatorDelegator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renzoOracle", - "outputs": [ - { - "internalType": "contract IRenzoOracle", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "roleManager", - "outputs": [ - { - "internalType": "contract IRoleManager", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_maxDepositTVL", - "type": "uint256" - } - ], - "name": "setMaxDepositTVL", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IOperatorDelegator", - "name": "_operatorDelegator", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_allocationBasisPoints", - "type": "uint256" - } - ], - "name": "setOperatorDelegatorAllocation", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bool", "name": "_paused", "type": "bool" } - ], - "name": "setPaused", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - }, - { "internalType": "uint256", "name": "_limit", "type": "uint256" } - ], - "name": "setTokenTvlLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IOperatorDelegator", - "name": "operatorDelegator", - "type": "address" - }, - { "internalType": "bytes", "name": "pubkey", "type": "bytes" }, - { "internalType": "bytes", "name": "signature", "type": "bytes" }, - { - "internalType": "bytes32", - "name": "depositDataRoot", - "type": "bytes32" - } - ], - "name": "stakeEthInOperatorDelegator", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "strategyManager", - "outputs": [ - { - "internalType": "contract IStrategyManager", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/services/decoder/protocols/renzo/abis/restake-manager.abi.ts b/services/decoder/protocols/renzo/abis/restake-manager.abi.ts new file mode 100644 index 0000000..1e19ed0 --- /dev/null +++ b/services/decoder/protocols/renzo/abis/restake-manager.abi.ts @@ -0,0 +1,743 @@ +export const restakeManagerABI = [ + { inputs: [], stateMutability: "nonpayable", type: "constructor" }, + { inputs: [], name: "AlreadyAdded", type: "error" }, + { inputs: [], name: "ContractPaused", type: "error" }, + { + inputs: [ + { internalType: "uint8", name: "expected", type: "uint8" }, + { internalType: "uint8", name: "actual", type: "uint8" }, + ], + name: "InvalidTokenDecimals", + type: "error", + }, + { inputs: [], name: "InvalidZeroInput", type: "error" }, + { inputs: [], name: "MaxTVLReached", type: "error" }, + { inputs: [], name: "MaxTokenTVLReached", type: "error" }, + { inputs: [], name: "NotDepositQueue", type: "error" }, + { inputs: [], name: "NotDepositWithdrawPauser", type: "error" }, + { inputs: [], name: "NotFound", type: "error" }, + { inputs: [], name: "NotRestakeManagerAdmin", type: "error" }, + { inputs: [], name: "OverMaxBasisPoints", type: "error" }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "contract IERC20", + name: "token", + type: "address", + }, + ], + name: "CollateralTokenAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "contract IERC20", + name: "token", + type: "address", + }, + ], + name: "CollateralTokenRemoved", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "contract IERC20", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "tvl", + type: "uint256", + }, + ], + name: "CollateralTokenTvlUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "depositor", + type: "address", + }, + { + indexed: false, + internalType: "contract IERC20", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "ezETHMinted", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "referralId", + type: "uint256", + }, + ], + name: "Deposit", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "version", + type: "uint8", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "contract IOperatorDelegator", + name: "od", + type: "address", + }, + ], + name: "OperatorDelegatorAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "contract IOperatorDelegator", + name: "od", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "allocation", + type: "uint256", + }, + ], + name: "OperatorDelegatorAllocationUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "contract IOperatorDelegator", + name: "od", + type: "address", + }, + ], + name: "OperatorDelegatorRemoved", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "withdrawalRoot", + type: "bytes32", + }, + { + indexed: false, + internalType: "address", + name: "withdrawer", + type: "address", + }, + { + indexed: false, + internalType: "contract IERC20", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "ezETHBurned", + type: "uint256", + }, + ], + name: "UserWithdrawCompleted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "withdrawalRoot", + type: "bytes32", + }, + { + indexed: false, + internalType: "address", + name: "withdrawer", + type: "address", + }, + { + indexed: false, + internalType: "contract IERC20", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "ezETHToBurn", + type: "uint256", + }, + ], + name: "UserWithdrawStarted", + type: "event", + }, + { + inputs: [ + { + internalType: "contract IERC20", + name: "_newCollateralToken", + type: "address", + }, + ], + name: "addCollateralToken", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IOperatorDelegator", + name: "_newOperatorDelegator", + type: "address", + }, + { + internalType: "uint256", + name: "_allocationBasisPoints", + type: "uint256", + }, + ], + name: "addOperatorDelegator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "calculateTVLs", + outputs: [ + { + internalType: "uint256[][]", + name: "", + type: "uint256[][]", + }, + { internalType: "uint256[]", name: "", type: "uint256[]" }, + { internalType: "uint256", name: "", type: "uint256" }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[]", + name: "tvls", + type: "uint256[]", + }, + { internalType: "uint256", name: "totalTVL", type: "uint256" }, + ], + name: "chooseOperatorDelegatorForDeposit", + outputs: [ + { + internalType: "contract IOperatorDelegator", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "tokenIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "ezETHValue", + type: "uint256", + }, + { + internalType: "uint256[][]", + name: "operatorDelegatorTokenTVLs", + type: "uint256[][]", + }, + { + internalType: "uint256[]", + name: "operatorDelegatorTVLs", + type: "uint256[]", + }, + { internalType: "uint256", name: "totalTVL", type: "uint256" }, + ], + name: "chooseOperatorDelegatorForWithdraw", + outputs: [ + { + internalType: "contract IOperatorDelegator", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "contract IERC20", name: "", type: "address" }, + ], + name: "collateralTokenTvlLimits", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "", type: "uint256" }], + name: "collateralTokens", + outputs: [ + { internalType: "contract IERC20", name: "", type: "address" }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "delegationManager", + outputs: [ + { + internalType: "contract IDelegationManager", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IERC20", + name: "_collateralToken", + type: "address", + }, + { internalType: "uint256", name: "_amount", type: "uint256" }, + { + internalType: "uint256", + name: "_referralId", + type: "uint256", + }, + ], + name: "deposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IERC20", + name: "_collateralToken", + type: "address", + }, + { internalType: "uint256", name: "_amount", type: "uint256" }, + ], + name: "deposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_referralId", + type: "uint256", + }, + ], + name: "depositETH", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "depositETH", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "depositQueue", + outputs: [ + { + internalType: "contract IDepositQueue", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IERC20", + name: "_token", + type: "address", + }, + { internalType: "uint256", name: "_amount", type: "uint256" }, + ], + name: "depositTokenRewardsFromProtocol", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "ezETH", + outputs: [ + { + internalType: "contract IEzEthToken", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IERC20", + name: "_collateralToken", + type: "address", + }, + ], + name: "getCollateralTokenIndex", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getCollateralTokensLength", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getOperatorDelegatorsLength", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getTotalRewardsEarned", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IRoleManager", + name: "_roleManager", + type: "address", + }, + { + internalType: "contract IEzEthToken", + name: "_ezETH", + type: "address", + }, + { + internalType: "contract IRenzoOracle", + name: "_renzoOracle", + type: "address", + }, + { + internalType: "contract IStrategyManager", + name: "_strategyManager", + type: "address", + }, + { + internalType: "contract IDelegationManager", + name: "_delegationManager", + type: "address", + }, + { + internalType: "contract IDepositQueue", + name: "_depositQueue", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "maxDepositTVL", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IOperatorDelegator", + name: "", + type: "address", + }, + ], + name: "operatorDelegatorAllocations", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "", type: "uint256" }], + name: "operatorDelegators", + outputs: [ + { + internalType: "contract IOperatorDelegator", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "paused", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + name: "pendingWithdrawals", + outputs: [ + { + internalType: "uint256", + name: "ezETHToBurn", + type: "uint256", + }, + { + internalType: "address", + name: "withdrawer", + type: "address", + }, + { + internalType: "contract IERC20", + name: "tokenToWithdraw", + type: "address", + }, + { + internalType: "uint256", + name: "tokenAmountToWithdraw", + type: "uint256", + }, + { + internalType: "contract IOperatorDelegator", + name: "operatorDelegator", + type: "address", + }, + { internalType: "bool", name: "completed", type: "bool" }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IERC20", + name: "_collateralTokenToRemove", + type: "address", + }, + ], + name: "removeCollateralToken", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IOperatorDelegator", + name: "_operatorDelegatorToRemove", + type: "address", + }, + ], + name: "removeOperatorDelegator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "renzoOracle", + outputs: [ + { + internalType: "contract IRenzoOracle", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "roleManager", + outputs: [ + { + internalType: "contract IRoleManager", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_maxDepositTVL", + type: "uint256", + }, + ], + name: "setMaxDepositTVL", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IOperatorDelegator", + name: "_operatorDelegator", + type: "address", + }, + { + internalType: "uint256", + name: "_allocationBasisPoints", + type: "uint256", + }, + ], + name: "setOperatorDelegatorAllocation", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "bool", name: "_paused", type: "bool" }], + name: "setPaused", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IERC20", + name: "_token", + type: "address", + }, + { internalType: "uint256", name: "_limit", type: "uint256" }, + ], + name: "setTokenTvlLimit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IOperatorDelegator", + name: "operatorDelegator", + type: "address", + }, + { internalType: "bytes", name: "pubkey", type: "bytes" }, + { internalType: "bytes", name: "signature", type: "bytes" }, + { + internalType: "bytes32", + name: "depositDataRoot", + type: "bytes32", + }, + ], + name: "stakeEthInOperatorDelegator", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "strategyManager", + outputs: [ + { + internalType: "contract IStrategyManager", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, +] as const; diff --git a/services/decoder/protocols/renzo/renzo.decoders.ts b/services/decoder/protocols/renzo/renzo.decoders.ts index 461083c..a012818 100644 --- a/services/decoder/protocols/renzo/renzo.decoders.ts +++ b/services/decoder/protocols/renzo/renzo.decoders.ts @@ -1,20 +1,20 @@ +import { prettifyCurrency } from "@covalenthq/client-sdk"; +import { decodeEventLog, type Abi } from "viem"; +import { timestampParser } from "../../../../utils/functions"; import { GoldRushDecoder } from "../../decoder"; -import type { EventDetails, EventTokens } from "../../decoder.types"; -import { type EventType } from "../../decoder.types"; import { DECODED_ACTION, DECODED_EVENT_CATEGORY, } from "../../decoder.constants"; -import { decodeEventLog, type Abi } from "viem"; -import STRATEGY_MANAGER_ABI from "./abis/renzo.eigen-layer-strategy-manager.json"; -import RESTAKE_STRATEGY_ABI from "./abis/renzo.restake-manager-abi.json"; -import { timestampParser } from "../../../../utils/functions"; -import { prettifyCurrency } from "@covalenthq/client-sdk"; +import type { EventDetails, EventTokens } from "../../decoder.types"; +import { type EventType } from "../../decoder.types"; +import { eigenLayerStrategyManagerABI } from "./abis/eigen-layer-strategy-manager.abi"; +import { restakeManagerABI } from "./abis/restake-manager.abi"; GoldRushDecoder.on( "renzo:ShareWithdrawalQueued", ["eth-mainnet"], - STRATEGY_MANAGER_ABI as Abi, + eigenLayerStrategyManagerABI as Abi, async ( log_event, tx, @@ -25,19 +25,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: STRATEGY_MANAGER_ABI, + abi: eigenLayerStrategyManagerABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "ShareWithdrawalQueued", - }) as { - eventName: "ShareWithdrawalQueued"; - args: { - depositor: string; - nonce: bigint; - strategy: string; - shares: bigint; - }; - }; + }); const details: EventDetails = [ { @@ -79,7 +71,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "renzo:WithdrawalQueued", ["eth-mainnet"], - STRATEGY_MANAGER_ABI as Abi, + eigenLayerStrategyManagerABI as Abi, async ( log_event, tx, @@ -90,20 +82,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: STRATEGY_MANAGER_ABI, + abi: eigenLayerStrategyManagerABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "WithdrawalQueued", - }) as { - eventName: "WithdrawalQueued"; - args: { - depositor: string; - nonce: bigint; - withdrawer: string; - delegatedAddress: string; - withdrawalRoot: string; - }; - }; + }); const details: EventDetails = [ { @@ -150,7 +133,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "renzo:WithdrawalCompleted", ["eth-mainnet"], - STRATEGY_MANAGER_ABI as Abi, + eigenLayerStrategyManagerABI as Abi, async ( log_event, tx, @@ -161,19 +144,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: STRATEGY_MANAGER_ABI, + abi: eigenLayerStrategyManagerABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "WithdrawalCompleted", - }) as { - eventName: "WithdrawalCompleted"; - args: { - depositor: string; - nonce: bigint; - withdrawer: string; - withdrawalRoot: string; - }; - }; + }); const details: EventDetails = [ { @@ -215,7 +190,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "renzo:Deposit", ["eth-mainnet"], - RESTAKE_STRATEGY_ABI as Abi, + restakeManagerABI as Abi, async ( log_event, tx, @@ -226,20 +201,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: RESTAKE_STRATEGY_ABI, + abi: restakeManagerABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "Deposit", - }) as { - eventName: "Deposit"; - args: { - depositor: string; - token: string; - amount: bigint; - ezETHMinted: bigint; - referralId: bigint; - }; - }; + }); const details: EventDetails = [ { diff --git a/services/decoder/protocols/uniswap-v2/abis/factory.abi.ts b/services/decoder/protocols/uniswap-v2/abis/factory.abi.ts new file mode 100644 index 0000000..0fb2703 --- /dev/null +++ b/services/decoder/protocols/uniswap-v2/abis/factory.abi.ts @@ -0,0 +1,193 @@ +export const factoryABI = [ + { + inputs: [ + { + internalType: "address", + name: "_feeToSetter", + type: "address", + }, + ], + payable: false, + 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: "allPairsLength", + type: "uint256", + }, + ], + name: "PairCreated", + type: "event", + }, + { + constant: true, + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "allPairs", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "allPairsLength", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "tokenA", + type: "address", + }, + { + internalType: "address", + name: "tokenB", + type: "address", + }, + ], + name: "createPair", + outputs: [ + { + internalType: "address", + name: "pair", + type: "address", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "feeTo", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "feeToSetter", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "getPair", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "_feeTo", + type: "address", + }, + ], + name: "setFeeTo", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "_feeToSetter", + type: "address", + }, + ], + name: "setFeeToSetter", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, +] as const; diff --git a/services/decoder/protocols/uniswap-v2/abis/pair.abi.ts b/services/decoder/protocols/uniswap-v2/abis/pair.abi.ts new file mode 100644 index 0000000..b5d1749 --- /dev/null +++ b/services/decoder/protocols/uniswap-v2/abis/pair.abi.ts @@ -0,0 +1,485 @@ +export const pairABI = [ + { + inputs: [], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "Burn", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + ], + name: "Mint", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount0In", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount1In", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount0Out", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount1Out", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "Swap", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint112", + name: "reserve0", + type: "uint112", + }, + { + indexed: false, + internalType: "uint112", + name: "reserve1", + type: "uint112", + }, + ], + name: "Sync", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + constant: true, + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "MINIMUM_LIQUIDITY", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "PERMIT_TYPEHASH", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { internalType: "address", name: "", type: "address" }, + { internalType: "address", name: "", type: "address" }, + ], + name: "allowance", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "value", type: "uint256" }, + ], + name: "approve", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [{ internalType: "address", name: "", type: "address" }], + name: "balanceOf", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "address", name: "to", type: "address" }], + name: "burn", + outputs: [ + { internalType: "uint256", name: "amount0", type: "uint256" }, + { internalType: "uint256", name: "amount1", type: "uint256" }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "decimals", + outputs: [{ internalType: "uint8", name: "", type: "uint8" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "factory", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getReserves", + outputs: [ + { + internalType: "uint112", + name: "_reserve0", + type: "uint112", + }, + { + internalType: "uint112", + name: "_reserve1", + type: "uint112", + }, + { + internalType: "uint32", + name: "_blockTimestampLast", + type: "uint32", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "_token0", type: "address" }, + { internalType: "address", name: "_token1", type: "address" }, + ], + name: "initialize", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "kLast", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "address", name: "to", type: "address" }], + name: "mint", + outputs: [ + { + internalType: "uint256", + name: "liquidity", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "name", + outputs: [{ internalType: "string", name: "", type: "string" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [{ internalType: "address", name: "", type: "address" }], + name: "nonces", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "owner", type: "address" }, + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "value", type: "uint256" }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { internalType: "uint8", name: "v", type: "uint8" }, + { internalType: "bytes32", name: "r", type: "bytes32" }, + { internalType: "bytes32", name: "s", type: "bytes32" }, + ], + name: "permit", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "price0CumulativeLast", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "price1CumulativeLast", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [{ internalType: "address", name: "to", type: "address" }], + name: "skim", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "amount0Out", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount1Out", + type: "uint256", + }, + { internalType: "address", name: "to", type: "address" }, + { internalType: "bytes", name: "data", type: "bytes" }, + ], + name: "swap", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "symbol", + outputs: [{ internalType: "string", name: "", type: "string" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "sync", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "token0", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "token1", + outputs: [{ internalType: "address", name: "", type: "address" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "totalSupply", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "to", type: "address" }, + { internalType: "uint256", name: "value", type: "uint256" }, + ], + name: "transfer", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { internalType: "address", name: "from", type: "address" }, + { internalType: "address", name: "to", type: "address" }, + { internalType: "uint256", name: "value", type: "uint256" }, + ], + name: "transferFrom", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, +] as const; diff --git a/services/decoder/protocols/uniswap-v2/abis/uniswap-v2.factory.abi.json b/services/decoder/protocols/uniswap-v2/abis/uniswap-v2.factory.abi.json deleted file mode 100644 index 68cd3f7..0000000 --- a/services/decoder/protocols/uniswap-v2/abis/uniswap-v2.factory.abi.json +++ /dev/null @@ -1,193 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "_feeToSetter", - "type": "address" - } - ], - "payable": false, - "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": "allPairsLength", - "type": "uint256" - } - ], - "name": "PairCreated", - "type": "event" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "allPairs", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "allPairsLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "tokenA", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenB", - "type": "address" - } - ], - "name": "createPair", - "outputs": [ - { - "internalType": "address", - "name": "pair", - "type": "address" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "feeTo", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "feeToSetter", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "getPair", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_feeTo", - "type": "address" - } - ], - "name": "setFeeTo", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_feeToSetter", - "type": "address" - } - ], - "name": "setFeeToSetter", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/services/decoder/protocols/uniswap-v2/abis/uniswap-v2.pair.abi.json b/services/decoder/protocols/uniswap-v2/abis/uniswap-v2.pair.abi.json deleted file mode 100644 index 71e05a1..0000000 --- a/services/decoder/protocols/uniswap-v2/abis/uniswap-v2.pair.abi.json +++ /dev/null @@ -1,521 +0,0 @@ -[ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "Burn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount0In", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount1In", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount0Out", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount1Out", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "Swap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint112", - "name": "reserve0", - "type": "uint112" - }, - { - "indexed": false, - "internalType": "uint112", - "name": "reserve1", - "type": "uint112" - } - ], - "name": "Sync", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "MINIMUM_LIQUIDITY", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "PERMIT_TYPEHASH", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "address", "name": "", "type": "address" } - ], - "name": "allowance", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "approve", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "name": "balanceOf", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "to", "type": "address" } - ], - "name": "burn", - "outputs": [ - { "internalType": "uint256", "name": "amount0", "type": "uint256" }, - { "internalType": "uint256", "name": "amount1", "type": "uint256" } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "factory", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getReserves", - "outputs": [ - { - "internalType": "uint112", - "name": "_reserve0", - "type": "uint112" - }, - { - "internalType": "uint112", - "name": "_reserve1", - "type": "uint112" - }, - { - "internalType": "uint32", - "name": "_blockTimestampLast", - "type": "uint32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "_token0", "type": "address" }, - { "internalType": "address", "name": "_token1", "type": "address" } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "kLast", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "to", "type": "address" } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "liquidity", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "name": "nonces", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "value", "type": "uint256" }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { "internalType": "uint8", "name": "v", "type": "uint8" }, - { "internalType": "bytes32", "name": "r", "type": "bytes32" }, - { "internalType": "bytes32", "name": "s", "type": "bytes32" } - ], - "name": "permit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "price0CumulativeLast", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "price1CumulativeLast", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "to", "type": "address" } - ], - "name": "skim", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "amount0Out", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1Out", - "type": "uint256" - }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "bytes", "name": "data", "type": "bytes" } - ], - "name": "swap", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "sync", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "token0", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "token1", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "from", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/services/decoder/protocols/uniswap-v2/uniswap-v2.decoders.ts b/services/decoder/protocols/uniswap-v2/uniswap-v2.decoders.ts index 21dda7b..b4ac324 100644 --- a/services/decoder/protocols/uniswap-v2/uniswap-v2.decoders.ts +++ b/services/decoder/protocols/uniswap-v2/uniswap-v2.decoders.ts @@ -1,18 +1,18 @@ import { prettifyCurrency, type Token } from "@covalenthq/client-sdk"; import { type Abi, decodeEventLog } from "viem"; import { GoldRushDecoder } from "../../decoder"; -import { type EventType } from "../../decoder.types"; -import PairABI from "./abis/uniswap-v2.pair.abi.json"; -import FactoryABI from "./abis/uniswap-v2.factory.abi.json"; import { DECODED_ACTION, DECODED_EVENT_CATEGORY, } from "../../decoder.constants"; +import { type EventDetails, type EventType } from "../../decoder.types"; +import { factoryABI } from "./abis/factory.abi"; +import { pairABI } from "./abis/pair.abi"; GoldRushDecoder.on( "uniswap-v2:Swap", ["eth-mainnet", "defi-kingdoms-mainnet"], - PairABI as Abi, + pairABI as Abi, async ( log_event, tx, @@ -27,21 +27,11 @@ GoldRushDecoder.on( } = log_event; const { args: decoded } = decodeEventLog({ - abi: PairABI, + abi: pairABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "Swap", - }) as { - eventName: "Swap"; - args: { - sender: string; - amount0In: bigint; - amount1In: bigint; - amount0Out: bigint; - amount1Out: bigint; - to: string; - }; - }; + }); let inputToken: Token | null = null, outputToken: Token | null = null, @@ -135,7 +125,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "uniswap-v2:Mint", ["eth-mainnet"], - PairABI as Abi, + pairABI as Abi, async ( log_event, tx, @@ -150,18 +140,11 @@ GoldRushDecoder.on( } = log_event; const { args: decoded } = decodeEventLog({ - abi: PairABI, + abi: pairABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "Mint", - }) as { - eventName: "Mint"; - args: { - sender: string; - amount0: bigint; - amount1: bigint; - }; - }; + }); const { data } = await covalent_client.XykService.getPoolByAddress( chain_name, @@ -240,7 +223,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "uniswap-v2:Burn", ["eth-mainnet"], - PairABI as Abi, + pairABI as Abi, async ( log_event, tx, @@ -255,19 +238,11 @@ GoldRushDecoder.on( } = log_event; const { args: decoded } = decodeEventLog({ - abi: PairABI, + abi: pairABI, topics: raw_log_topics as [], data: raw_log_data as "0x${string}", eventName: "Burn", - }) as { - eventName: "Burn"; - args: { - sender: string; - amount0: bigint; - amount1: bigint; - to: string; - }; - }; + }); const { data } = await covalent_client.XykService.getPoolByAddress( chain_name, @@ -351,7 +326,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "uniswap-v2:Sync", ["eth-mainnet"], - PairABI as Abi, + pairABI as Abi, async ( log_event, tx, @@ -366,17 +341,11 @@ GoldRushDecoder.on( } = log_event; const { args: decoded } = decodeEventLog({ - abi: PairABI, + abi: pairABI, topics: raw_log_topics as [], data: raw_log_data as "0x${string}", eventName: "Sync", - }) as { - eventName: "Sync"; - args: { - reserve0: bigint; - reserve1: bigint; - }; - }; + }); const { data } = await covalent_client.XykService.getPoolByAddress( chain_name, @@ -448,7 +417,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "uniswap-v2:PairCreated", ["eth-mainnet"], - FactoryABI as Abi, + factoryABI as Abi, async ( log_event, tx, @@ -459,37 +428,23 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: FactoryABI, + abi: factoryABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "PairCreated", strict: false, - }) as { - eventName: "PairCreated"; - args: { - token0: string; - token1: string; - pair: string; - allPairsLength: bigint; - }; - }; + }); - const { data } = await covalent_client.XykService.getPoolByAddress( - chain_name, - "uniswap_v2", - decoded.pair - ); + const details: EventDetails = []; - return { - action: DECODED_ACTION.CREATE, - category: DECODED_EVENT_CATEGORY.DEX, - name: "Pair Created", - protocol: { - logo: log_event.sender_logo_url as string, - name: log_event.sender_name as string, - }, - ...(options.raw_logs ? { raw_log: log_event } : {}), - details: [ + if (decoded.pair) { + const { data } = await covalent_client.XykService.getPoolByAddress( + chain_name, + "uniswap_v2", + decoded.pair + ); + + details.push( { heading: "Token 0 Name", value: data?.items?.[0]?.token_0?.contract_name || "", @@ -540,8 +495,20 @@ GoldRushDecoder.on( heading: "Pair Address", value: decoded.pair, type: "address", - }, - ], + } + ); + } + + return { + action: DECODED_ACTION.CREATE, + category: DECODED_EVENT_CATEGORY.DEX, + name: "Pair Created", + protocol: { + logo: log_event.sender_logo_url as string, + name: log_event.sender_name as string, + }, + ...(options.raw_logs ? { raw_log: log_event } : {}), + details, }; } ); diff --git a/services/decoder/protocols/uniswap-v3/abis/factory.abi.ts b/services/decoder/protocols/uniswap-v3/abis/factory.abi.ts new file mode 100644 index 0000000..6d7ba29 --- /dev/null +++ b/services/decoder/protocols/uniswap-v3/abis/factory.abi.ts @@ -0,0 +1,236 @@ +export const factoryABI = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint24", + name: "fee", + type: "uint24", + }, + { + indexed: true, + internalType: "int24", + name: "tickSpacing", + type: "int24", + }, + ], + name: "FeeAmountEnabled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "oldOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnerChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "token0", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "token1", + type: "address", + }, + { + indexed: true, + internalType: "uint24", + name: "fee", + type: "uint24", + }, + { + indexed: false, + internalType: "int24", + name: "tickSpacing", + type: "int24", + }, + { + indexed: false, + internalType: "address", + name: "pool", + type: "address", + }, + ], + name: "PoolCreated", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "tokenA", + type: "address", + }, + { + internalType: "address", + name: "tokenB", + type: "address", + }, + { + internalType: "uint24", + name: "fee", + type: "uint24", + }, + ], + name: "createPool", + outputs: [ + { + internalType: "address", + name: "pool", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint24", + name: "fee", + type: "uint24", + }, + { + internalType: "int24", + name: "tickSpacing", + type: "int24", + }, + ], + name: "enableFeeAmount", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint24", + name: "", + type: "uint24", + }, + ], + name: "feeAmountTickSpacing", + outputs: [ + { + internalType: "int24", + name: "", + type: "int24", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "uint24", + name: "", + type: "uint24", + }, + ], + name: "getPool", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "parameters", + outputs: [ + { + internalType: "address", + name: "factory", + type: "address", + }, + { + internalType: "address", + name: "token0", + type: "address", + }, + { + internalType: "address", + name: "token1", + type: "address", + }, + { + internalType: "uint24", + name: "fee", + type: "uint24", + }, + { + internalType: "int24", + name: "tickSpacing", + type: "int24", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_owner", + type: "address", + }, + ], + name: "setOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; diff --git a/services/decoder/protocols/uniswap-v3/abis/non-fungible-position-manager.abi.ts b/services/decoder/protocols/uniswap-v3/abis/non-fungible-position-manager.abi.ts new file mode 100644 index 0000000..ac5c754 --- /dev/null +++ b/services/decoder/protocols/uniswap-v3/abis/non-fungible-position-manager.abi.ts @@ -0,0 +1,1224 @@ +export const nonFungiblePositionManagerABI = [ + { + inputs: [ + { + internalType: "address", + name: "_factory", + type: "address", + }, + { + internalType: "address", + name: "_WETH9", + type: "address", + }, + { + internalType: "address", + name: "_tokenDescriptor_", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "approved", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "operator", + type: "address", + }, + { + indexed: false, + internalType: "bool", + name: "approved", + type: "bool", + }, + ], + name: "ApprovalForAll", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "recipient", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + ], + name: "Collect", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint128", + name: "liquidity", + type: "uint128", + }, + { + indexed: false, + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + ], + name: "DecreaseLiquidity", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint128", + name: "liquidity", + type: "uint128", + }, + { + indexed: false, + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + ], + name: "IncreaseLiquidity", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "PERMIT_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "WETH9", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "approve", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "baseURI", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "burn", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint128", + name: "amount0Max", + type: "uint128", + }, + { + internalType: "uint128", + name: "amount1Max", + type: "uint128", + }, + ], + internalType: + "struct INonfungiblePositionManager.CollectParams", + name: "params", + type: "tuple", + }, + ], + name: "collect", + outputs: [ + { + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token0", + type: "address", + }, + { + internalType: "address", + name: "token1", + type: "address", + }, + { + internalType: "uint24", + name: "fee", + type: "uint24", + }, + { + internalType: "uint160", + name: "sqrtPriceX96", + type: "uint160", + }, + ], + name: "createAndInitializePoolIfNecessary", + outputs: [ + { + internalType: "address", + name: "pool", + type: "address", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "uint128", + name: "liquidity", + type: "uint128", + }, + { + internalType: "uint256", + name: "amount0Min", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount1Min", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + internalType: + "struct INonfungiblePositionManager.DecreaseLiquidityParams", + name: "params", + type: "tuple", + }, + ], + name: "decreaseLiquidity", + outputs: [ + { + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "factory", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "getApproved", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount0Desired", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount1Desired", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount0Min", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount1Min", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + internalType: + "struct INonfungiblePositionManager.IncreaseLiquidityParams", + name: "params", + type: "tuple", + }, + ], + name: "increaseLiquidity", + outputs: [ + { + internalType: "uint128", + name: "liquidity", + type: "uint128", + }, + { + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "operator", + type: "address", + }, + ], + name: "isApprovedForAll", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "token0", + type: "address", + }, + { + internalType: "address", + name: "token1", + type: "address", + }, + { + internalType: "uint24", + name: "fee", + type: "uint24", + }, + { + internalType: "int24", + name: "tickLower", + type: "int24", + }, + { + internalType: "int24", + name: "tickUpper", + type: "int24", + }, + { + internalType: "uint256", + name: "amount0Desired", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount1Desired", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount0Min", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount1Min", + type: "uint256", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + ], + internalType: "struct INonfungiblePositionManager.MintParams", + name: "params", + type: "tuple", + }, + ], + name: "mint", + outputs: [ + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "uint128", + name: "liquidity", + type: "uint128", + }, + { + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes[]", + name: "data", + type: "bytes[]", + }, + ], + name: "multicall", + outputs: [ + { + internalType: "bytes[]", + name: "results", + type: "bytes[]", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "ownerOf", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "permit", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "positions", + outputs: [ + { + internalType: "uint96", + name: "nonce", + type: "uint96", + }, + { + internalType: "address", + name: "operator", + type: "address", + }, + { + internalType: "address", + name: "token0", + type: "address", + }, + { + internalType: "address", + name: "token1", + type: "address", + }, + { + internalType: "uint24", + name: "fee", + type: "uint24", + }, + { + internalType: "int24", + name: "tickLower", + type: "int24", + }, + { + internalType: "int24", + name: "tickUpper", + type: "int24", + }, + { + internalType: "uint128", + name: "liquidity", + type: "uint128", + }, + { + internalType: "uint256", + name: "feeGrowthInside0LastX128", + type: "uint256", + }, + { + internalType: "uint256", + name: "feeGrowthInside1LastX128", + type: "uint256", + }, + { + internalType: "uint128", + name: "tokensOwed0", + type: "uint128", + }, + { + internalType: "uint128", + name: "tokensOwed1", + type: "uint128", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "refundETH", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "safeTransferFrom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + name: "safeTransferFrom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "selfPermit", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiry", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "selfPermitAllowed", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiry", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "selfPermitAllowedIfNecessary", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "selfPermitIfNecessary", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "operator", + type: "address", + }, + { + internalType: "bool", + name: "approved", + type: "bool", + }, + ], + name: "setApprovalForAll", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "amountMinimum", + type: "uint256", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + ], + name: "sweepToken", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "index", + type: "uint256", + }, + ], + name: "tokenByIndex", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "uint256", + name: "index", + type: "uint256", + }, + ], + name: "tokenOfOwnerByIndex", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "tokenURI", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amount0Owed", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount1Owed", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "uniswapV3MintCallback", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "amountMinimum", + type: "uint256", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + ], + name: "unwrapWETH9", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + stateMutability: "payable", + type: "receive", + }, +] as const; diff --git a/services/decoder/protocols/uniswap-v3/abis/pair.abi.ts b/services/decoder/protocols/uniswap-v3/abis/pair.abi.ts new file mode 100644 index 0000000..913fedc --- /dev/null +++ b/services/decoder/protocols/uniswap-v3/abis/pair.abi.ts @@ -0,0 +1,988 @@ +export const pairABI = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "int24", + name: "tickLower", + type: "int24", + }, + { + indexed: true, + internalType: "int24", + name: "tickUpper", + type: "int24", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + { + indexed: false, + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + ], + name: "Burn", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "recipient", + type: "address", + }, + { + indexed: true, + internalType: "int24", + name: "tickLower", + type: "int24", + }, + { + indexed: true, + internalType: "int24", + name: "tickUpper", + type: "int24", + }, + { + indexed: false, + internalType: "uint128", + name: "amount0", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "amount1", + type: "uint128", + }, + ], + name: "Collect", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "recipient", + type: "address", + }, + { + indexed: false, + internalType: "uint128", + name: "amount0", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "amount1", + type: "uint128", + }, + ], + name: "CollectProtocol", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "recipient", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "paid0", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "paid1", + type: "uint256", + }, + ], + name: "Flash", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint16", + name: "observationCardinalityNextOld", + type: "uint16", + }, + { + indexed: false, + internalType: "uint16", + name: "observationCardinalityNextNew", + type: "uint16", + }, + ], + name: "IncreaseObservationCardinalityNext", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint160", + name: "sqrtPriceX96", + type: "uint160", + }, + { + indexed: false, + internalType: "int24", + name: "tick", + type: "int24", + }, + ], + name: "Initialize", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "int24", + name: "tickLower", + type: "int24", + }, + { + indexed: true, + internalType: "int24", + name: "tickUpper", + type: "int24", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + { + indexed: false, + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + ], + name: "Mint", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "feeProtocol0Old", + type: "uint8", + }, + { + indexed: false, + internalType: "uint8", + name: "feeProtocol1Old", + type: "uint8", + }, + { + indexed: false, + internalType: "uint8", + name: "feeProtocol0New", + type: "uint8", + }, + { + indexed: false, + internalType: "uint8", + name: "feeProtocol1New", + type: "uint8", + }, + ], + name: "SetFeeProtocol", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "recipient", + type: "address", + }, + { + indexed: false, + internalType: "int256", + name: "amount0", + type: "int256", + }, + { + indexed: false, + internalType: "int256", + name: "amount1", + type: "int256", + }, + { + indexed: false, + internalType: "uint160", + name: "sqrtPriceX96", + type: "uint160", + }, + { + indexed: false, + internalType: "uint128", + name: "liquidity", + type: "uint128", + }, + { + indexed: false, + internalType: "int24", + name: "tick", + type: "int24", + }, + ], + name: "Swap", + type: "event", + }, + { + inputs: [ + { + internalType: "int24", + name: "tickLower", + type: "int24", + }, + { + internalType: "int24", + name: "tickUpper", + type: "int24", + }, + { + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "burn", + outputs: [ + { + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "int24", + name: "tickLower", + type: "int24", + }, + { + internalType: "int24", + name: "tickUpper", + type: "int24", + }, + { + internalType: "uint128", + name: "amount0Requested", + type: "uint128", + }, + { + internalType: "uint128", + name: "amount1Requested", + type: "uint128", + }, + ], + name: "collect", + outputs: [ + { + internalType: "uint128", + name: "amount0", + type: "uint128", + }, + { + internalType: "uint128", + name: "amount1", + type: "uint128", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint128", + name: "amount0Requested", + type: "uint128", + }, + { + internalType: "uint128", + name: "amount1Requested", + type: "uint128", + }, + ], + name: "collectProtocol", + outputs: [ + { + internalType: "uint128", + name: "amount0", + type: "uint128", + }, + { + internalType: "uint128", + name: "amount1", + type: "uint128", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "factory", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "fee", + outputs: [ + { + internalType: "uint24", + name: "", + type: "uint24", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "feeGrowthGlobal0X128", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "feeGrowthGlobal1X128", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "flash", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint16", + name: "observationCardinalityNext", + type: "uint16", + }, + ], + name: "increaseObservationCardinalityNext", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint160", + name: "sqrtPriceX96", + type: "uint160", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "liquidity", + outputs: [ + { + internalType: "uint128", + name: "", + type: "uint128", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "maxLiquidityPerTick", + outputs: [ + { + internalType: "uint128", + name: "", + type: "uint128", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "int24", + name: "tickLower", + type: "int24", + }, + { + internalType: "int24", + name: "tickUpper", + type: "int24", + }, + { + internalType: "uint128", + name: "amount", + type: "uint128", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "mint", + outputs: [ + { + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "observations", + outputs: [ + { + internalType: "uint32", + name: "blockTimestamp", + type: "uint32", + }, + { + internalType: "int56", + name: "tickCumulative", + type: "int56", + }, + { + internalType: "uint160", + name: "secondsPerLiquidityCumulativeX128", + type: "uint160", + }, + { + internalType: "bool", + name: "initialized", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint32[]", + name: "secondsAgos", + type: "uint32[]", + }, + ], + name: "observe", + outputs: [ + { + internalType: "int56[]", + name: "tickCumulatives", + type: "int56[]", + }, + { + internalType: "uint160[]", + name: "secondsPerLiquidityCumulativeX128s", + type: "uint160[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + name: "positions", + outputs: [ + { + internalType: "uint128", + name: "liquidity", + type: "uint128", + }, + { + internalType: "uint256", + name: "feeGrowthInside0LastX128", + type: "uint256", + }, + { + internalType: "uint256", + name: "feeGrowthInside1LastX128", + type: "uint256", + }, + { + internalType: "uint128", + name: "tokensOwed0", + type: "uint128", + }, + { + internalType: "uint128", + name: "tokensOwed1", + type: "uint128", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "protocolFees", + outputs: [ + { + internalType: "uint128", + name: "token0", + type: "uint128", + }, + { + internalType: "uint128", + name: "token1", + type: "uint128", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint8", + name: "feeProtocol0", + type: "uint8", + }, + { + internalType: "uint8", + name: "feeProtocol1", + type: "uint8", + }, + ], + name: "setFeeProtocol", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "slot0", + outputs: [ + { + internalType: "uint160", + name: "sqrtPriceX96", + type: "uint160", + }, + { + internalType: "int24", + name: "tick", + type: "int24", + }, + { + internalType: "uint16", + name: "observationIndex", + type: "uint16", + }, + { + internalType: "uint16", + name: "observationCardinality", + type: "uint16", + }, + { + internalType: "uint16", + name: "observationCardinalityNext", + type: "uint16", + }, + { + internalType: "uint8", + name: "feeProtocol", + type: "uint8", + }, + { + internalType: "bool", + name: "unlocked", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "int24", + name: "tickLower", + type: "int24", + }, + { + internalType: "int24", + name: "tickUpper", + type: "int24", + }, + ], + name: "snapshotCumulativesInside", + outputs: [ + { + internalType: "int56", + name: "tickCumulativeInside", + type: "int56", + }, + { + internalType: "uint160", + name: "secondsPerLiquidityInsideX128", + type: "uint160", + }, + { + internalType: "uint32", + name: "secondsInside", + type: "uint32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "bool", + name: "zeroForOne", + type: "bool", + }, + { + internalType: "int256", + name: "amountSpecified", + type: "int256", + }, + { + internalType: "uint160", + name: "sqrtPriceLimitX96", + type: "uint160", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "swap", + outputs: [ + { + internalType: "int256", + name: "amount0", + type: "int256", + }, + { + internalType: "int256", + name: "amount1", + type: "int256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "int16", + name: "", + type: "int16", + }, + ], + name: "tickBitmap", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "tickSpacing", + outputs: [ + { + internalType: "int24", + name: "", + type: "int24", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "int24", + name: "", + type: "int24", + }, + ], + name: "ticks", + outputs: [ + { + internalType: "uint128", + name: "liquidityGross", + type: "uint128", + }, + { + internalType: "int128", + name: "liquidityNet", + type: "int128", + }, + { + internalType: "uint256", + name: "feeGrowthOutside0X128", + type: "uint256", + }, + { + internalType: "uint256", + name: "feeGrowthOutside1X128", + type: "uint256", + }, + { + internalType: "int56", + name: "tickCumulativeOutside", + type: "int56", + }, + { + internalType: "uint160", + name: "secondsPerLiquidityOutsideX128", + type: "uint160", + }, + { + internalType: "uint32", + name: "secondsOutside", + type: "uint32", + }, + { + internalType: "bool", + name: "initialized", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "token0", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "token1", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, +] as const; diff --git a/services/decoder/protocols/uniswap-v3/abis/uniswap-v3.NonfungiblePositionManager.abi.json b/services/decoder/protocols/uniswap-v3/abis/uniswap-v3.NonfungiblePositionManager.abi.json deleted file mode 100644 index 5f41631..0000000 --- a/services/decoder/protocols/uniswap-v3/abis/uniswap-v3.NonfungiblePositionManager.abi.json +++ /dev/null @@ -1,1221 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "_factory", - "type": "address" - }, - { - "internalType": "address", - "name": "_WETH9", - "type": "address" - }, - { - "internalType": "address", - "name": "_tokenDescriptor_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "approved", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "ApprovalForAll", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - } - ], - "name": "Collect", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "liquidity", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - } - ], - "name": "DecreaseLiquidity", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "liquidity", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - } - ], - "name": "IncreaseLiquidity", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PERMIT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WETH9", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "baseURI", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint128", - "name": "amount0Max", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "amount1Max", - "type": "uint128" - } - ], - "internalType": "struct INonfungiblePositionManager.CollectParams", - "name": "params", - "type": "tuple" - } - ], - "name": "collect", - "outputs": [ - { - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token0", - "type": "address" - }, - { - "internalType": "address", - "name": "token1", - "type": "address" - }, - { - "internalType": "uint24", - "name": "fee", - "type": "uint24" - }, - { - "internalType": "uint160", - "name": "sqrtPriceX96", - "type": "uint160" - } - ], - "name": "createAndInitializePoolIfNecessary", - "outputs": [ - { - "internalType": "address", - "name": "pool", - "type": "address" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "liquidity", - "type": "uint128" - }, - { - "internalType": "uint256", - "name": "amount0Min", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1Min", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "internalType": "struct INonfungiblePositionManager.DecreaseLiquidityParams", - "name": "params", - "type": "tuple" - } - ], - "name": "decreaseLiquidity", - "outputs": [ - { - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "factory", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "getApproved", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount0Desired", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1Desired", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount0Min", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1Min", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "internalType": "struct INonfungiblePositionManager.IncreaseLiquidityParams", - "name": "params", - "type": "tuple" - } - ], - "name": "increaseLiquidity", - "outputs": [ - { - "internalType": "uint128", - "name": "liquidity", - "type": "uint128" - }, - { - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "isApprovedForAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "token0", - "type": "address" - }, - { - "internalType": "address", - "name": "token1", - "type": "address" - }, - { - "internalType": "uint24", - "name": "fee", - "type": "uint24" - }, - { - "internalType": "int24", - "name": "tickLower", - "type": "int24" - }, - { - "internalType": "int24", - "name": "tickUpper", - "type": "int24" - }, - { - "internalType": "uint256", - "name": "amount0Desired", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1Desired", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount0Min", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1Min", - "type": "uint256" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "internalType": "struct INonfungiblePositionManager.MintParams", - "name": "params", - "type": "tuple" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "liquidity", - "type": "uint128" - }, - { - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes[]", - "name": "data", - "type": "bytes[]" - } - ], - "name": "multicall", - "outputs": [ - { - "internalType": "bytes[]", - "name": "results", - "type": "bytes[]" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "ownerOf", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "permit", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "positions", - "outputs": [ - { - "internalType": "uint96", - "name": "nonce", - "type": "uint96" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "address", - "name": "token0", - "type": "address" - }, - { - "internalType": "address", - "name": "token1", - "type": "address" - }, - { - "internalType": "uint24", - "name": "fee", - "type": "uint24" - }, - { - "internalType": "int24", - "name": "tickLower", - "type": "int24" - }, - { - "internalType": "int24", - "name": "tickUpper", - "type": "int24" - }, - { - "internalType": "uint128", - "name": "liquidity", - "type": "uint128" - }, - { - "internalType": "uint256", - "name": "feeGrowthInside0LastX128", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "feeGrowthInside1LastX128", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "tokensOwed0", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "tokensOwed1", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "refundETH", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "safeTransferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "selfPermit", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "selfPermitAllowed", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "selfPermitAllowedIfNecessary", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "selfPermitIfNecessary", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "bool", - "name": "approved", - "type": "bool" - } - ], - "name": "setApprovalForAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amountMinimum", - "type": "uint256" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "name": "sweepToken", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "tokenByIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "tokenOfOwnerByIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "tokenURI", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount0Owed", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1Owed", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "uniswapV3MintCallback", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountMinimum", - "type": "uint256" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "name": "unwrapWETH9", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } -] diff --git a/services/decoder/protocols/uniswap-v3/abis/uniswap-v3.factory.abi.json b/services/decoder/protocols/uniswap-v3/abis/uniswap-v3.factory.abi.json deleted file mode 100644 index 6147118..0000000 --- a/services/decoder/protocols/uniswap-v3/abis/uniswap-v3.factory.abi.json +++ /dev/null @@ -1,236 +0,0 @@ -[ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint24", - "name": "fee", - "type": "uint24" - }, - { - "indexed": true, - "internalType": "int24", - "name": "tickSpacing", - "type": "int24" - } - ], - "name": "FeeAmountEnabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnerChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "token1", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint24", - "name": "fee", - "type": "uint24" - }, - { - "indexed": false, - "internalType": "int24", - "name": "tickSpacing", - "type": "int24" - }, - { - "indexed": false, - "internalType": "address", - "name": "pool", - "type": "address" - } - ], - "name": "PoolCreated", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenA", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenB", - "type": "address" - }, - { - "internalType": "uint24", - "name": "fee", - "type": "uint24" - } - ], - "name": "createPool", - "outputs": [ - { - "internalType": "address", - "name": "pool", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint24", - "name": "fee", - "type": "uint24" - }, - { - "internalType": "int24", - "name": "tickSpacing", - "type": "int24" - } - ], - "name": "enableFeeAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint24", - "name": "", - "type": "uint24" - } - ], - "name": "feeAmountTickSpacing", - "outputs": [ - { - "internalType": "int24", - "name": "", - "type": "int24" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint24", - "name": "", - "type": "uint24" - } - ], - "name": "getPool", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "parameters", - "outputs": [ - { - "internalType": "address", - "name": "factory", - "type": "address" - }, - { - "internalType": "address", - "name": "token0", - "type": "address" - }, - { - "internalType": "address", - "name": "token1", - "type": "address" - }, - { - "internalType": "uint24", - "name": "fee", - "type": "uint24" - }, - { - "internalType": "int24", - "name": "tickSpacing", - "type": "int24" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_owner", - "type": "address" - } - ], - "name": "setOwner", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/services/decoder/protocols/uniswap-v3/abis/uniswap-v3.pair.abi.json b/services/decoder/protocols/uniswap-v3/abis/uniswap-v3.pair.abi.json deleted file mode 100644 index 4c22885..0000000 --- a/services/decoder/protocols/uniswap-v3/abis/uniswap-v3.pair.abi.json +++ /dev/null @@ -1,988 +0,0 @@ -[ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "int24", - "name": "tickLower", - "type": "int24" - }, - { - "indexed": true, - "internalType": "int24", - "name": "tickUpper", - "type": "int24" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - } - ], - "name": "Burn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": true, - "internalType": "int24", - "name": "tickLower", - "type": "int24" - }, - { - "indexed": true, - "internalType": "int24", - "name": "tickUpper", - "type": "int24" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount0", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount1", - "type": "uint128" - } - ], - "name": "Collect", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount0", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount1", - "type": "uint128" - } - ], - "name": "CollectProtocol", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "paid0", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "paid1", - "type": "uint256" - } - ], - "name": "Flash", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint16", - "name": "observationCardinalityNextOld", - "type": "uint16" - }, - { - "indexed": false, - "internalType": "uint16", - "name": "observationCardinalityNextNew", - "type": "uint16" - } - ], - "name": "IncreaseObservationCardinalityNext", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint160", - "name": "sqrtPriceX96", - "type": "uint160" - }, - { - "indexed": false, - "internalType": "int24", - "name": "tick", - "type": "int24" - } - ], - "name": "Initialize", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "int24", - "name": "tickLower", - "type": "int24" - }, - { - "indexed": true, - "internalType": "int24", - "name": "tickUpper", - "type": "int24" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "amount", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "feeProtocol0Old", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "feeProtocol1Old", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "feeProtocol0New", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "feeProtocol1New", - "type": "uint8" - } - ], - "name": "SetFeeProtocol", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "int256", - "name": "amount0", - "type": "int256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "amount1", - "type": "int256" - }, - { - "indexed": false, - "internalType": "uint160", - "name": "sqrtPriceX96", - "type": "uint160" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "liquidity", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "int24", - "name": "tick", - "type": "int24" - } - ], - "name": "Swap", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "int24", - "name": "tickLower", - "type": "int24" - }, - { - "internalType": "int24", - "name": "tickUpper", - "type": "int24" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - } - ], - "name": "burn", - "outputs": [ - { - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "int24", - "name": "tickLower", - "type": "int24" - }, - { - "internalType": "int24", - "name": "tickUpper", - "type": "int24" - }, - { - "internalType": "uint128", - "name": "amount0Requested", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "amount1Requested", - "type": "uint128" - } - ], - "name": "collect", - "outputs": [ - { - "internalType": "uint128", - "name": "amount0", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "amount1", - "type": "uint128" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint128", - "name": "amount0Requested", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "amount1Requested", - "type": "uint128" - } - ], - "name": "collectProtocol", - "outputs": [ - { - "internalType": "uint128", - "name": "amount0", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "amount1", - "type": "uint128" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "factory", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "fee", - "outputs": [ - { - "internalType": "uint24", - "name": "", - "type": "uint24" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "feeGrowthGlobal0X128", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "feeGrowthGlobal1X128", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "flash", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "observationCardinalityNext", - "type": "uint16" - } - ], - "name": "increaseObservationCardinalityNext", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint160", - "name": "sqrtPriceX96", - "type": "uint160" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "liquidity", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxLiquidityPerTick", - "outputs": [ - { - "internalType": "uint128", - "name": "", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "int24", - "name": "tickLower", - "type": "int24" - }, - { - "internalType": "int24", - "name": "tickUpper", - "type": "int24" - }, - { - "internalType": "uint128", - "name": "amount", - "type": "uint128" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "amount0", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount1", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "observations", - "outputs": [ - { - "internalType": "uint32", - "name": "blockTimestamp", - "type": "uint32" - }, - { - "internalType": "int56", - "name": "tickCumulative", - "type": "int56" - }, - { - "internalType": "uint160", - "name": "secondsPerLiquidityCumulativeX128", - "type": "uint160" - }, - { - "internalType": "bool", - "name": "initialized", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32[]", - "name": "secondsAgos", - "type": "uint32[]" - } - ], - "name": "observe", - "outputs": [ - { - "internalType": "int56[]", - "name": "tickCumulatives", - "type": "int56[]" - }, - { - "internalType": "uint160[]", - "name": "secondsPerLiquidityCumulativeX128s", - "type": "uint160[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "positions", - "outputs": [ - { - "internalType": "uint128", - "name": "liquidity", - "type": "uint128" - }, - { - "internalType": "uint256", - "name": "feeGrowthInside0LastX128", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "feeGrowthInside1LastX128", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "tokensOwed0", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "tokensOwed1", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "protocolFees", - "outputs": [ - { - "internalType": "uint128", - "name": "token0", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "token1", - "type": "uint128" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "feeProtocol0", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "feeProtocol1", - "type": "uint8" - } - ], - "name": "setFeeProtocol", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "slot0", - "outputs": [ - { - "internalType": "uint160", - "name": "sqrtPriceX96", - "type": "uint160" - }, - { - "internalType": "int24", - "name": "tick", - "type": "int24" - }, - { - "internalType": "uint16", - "name": "observationIndex", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "observationCardinality", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "observationCardinalityNext", - "type": "uint16" - }, - { - "internalType": "uint8", - "name": "feeProtocol", - "type": "uint8" - }, - { - "internalType": "bool", - "name": "unlocked", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "int24", - "name": "tickLower", - "type": "int24" - }, - { - "internalType": "int24", - "name": "tickUpper", - "type": "int24" - } - ], - "name": "snapshotCumulativesInside", - "outputs": [ - { - "internalType": "int56", - "name": "tickCumulativeInside", - "type": "int56" - }, - { - "internalType": "uint160", - "name": "secondsPerLiquidityInsideX128", - "type": "uint160" - }, - { - "internalType": "uint32", - "name": "secondsInside", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "bool", - "name": "zeroForOne", - "type": "bool" - }, - { - "internalType": "int256", - "name": "amountSpecified", - "type": "int256" - }, - { - "internalType": "uint160", - "name": "sqrtPriceLimitX96", - "type": "uint160" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "swap", - "outputs": [ - { - "internalType": "int256", - "name": "amount0", - "type": "int256" - }, - { - "internalType": "int256", - "name": "amount1", - "type": "int256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "int16", - "name": "", - "type": "int16" - } - ], - "name": "tickBitmap", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "tickSpacing", - "outputs": [ - { - "internalType": "int24", - "name": "", - "type": "int24" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "int24", - "name": "", - "type": "int24" - } - ], - "name": "ticks", - "outputs": [ - { - "internalType": "uint128", - "name": "liquidityGross", - "type": "uint128" - }, - { - "internalType": "int128", - "name": "liquidityNet", - "type": "int128" - }, - { - "internalType": "uint256", - "name": "feeGrowthOutside0X128", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "feeGrowthOutside1X128", - "type": "uint256" - }, - { - "internalType": "int56", - "name": "tickCumulativeOutside", - "type": "int56" - }, - { - "internalType": "uint160", - "name": "secondsPerLiquidityOutsideX128", - "type": "uint160" - }, - { - "internalType": "uint32", - "name": "secondsOutside", - "type": "uint32" - }, - { - "internalType": "bool", - "name": "initialized", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "token0", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "token1", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/services/decoder/protocols/uniswap-v3/uniswap-v3.decoders.ts b/services/decoder/protocols/uniswap-v3/uniswap-v3.decoders.ts index f2f766b..07ce380 100644 --- a/services/decoder/protocols/uniswap-v3/uniswap-v3.decoders.ts +++ b/services/decoder/protocols/uniswap-v3/uniswap-v3.decoders.ts @@ -1,20 +1,20 @@ +import { decodeEventLog, type Abi } from "viem"; +import { timestampParser } from "../../../../utils/functions"; import { GoldRushDecoder } from "../../decoder"; -import type { EventDetails, EventTokens } from "../../decoder.types"; -import { type EventType } from "../../decoder.types"; import { DECODED_ACTION, DECODED_EVENT_CATEGORY, } from "../../decoder.constants"; -import { decodeEventLog, type Abi } from "viem"; -import FactoryABI from "./abis/uniswap-v3.factory.abi.json"; -import PairABI from "./abis/uniswap-v3.pair.abi.json"; -import PositionManagerABI from "./abis/uniswap-v3.NonfungiblePositionManager.abi.json"; -import { timestampParser } from "../../../../utils/functions"; +import type { EventDetails, EventTokens } from "../../decoder.types"; +import { type EventType } from "../../decoder.types"; +import { factoryABI } from "./abis/factory.abi"; +import { nonFungiblePositionManagerABI } from "./abis/non-fungible-position-manager.abi"; +import { pairABI } from "./abis/pair.abi"; GoldRushDecoder.on( "uniswap-v3:PoolCreated", ["eth-mainnet"], - FactoryABI as Abi, + factoryABI as Abi, async ( log_event, tx, @@ -25,20 +25,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: FactoryABI, + abi: factoryABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "PoolCreated", - }) as { - eventName: "PoolCreated"; - args: { - token0: string; - token1: string; - fee: bigint; - tickSpacing: bigint; - pool: string; - }; - }; + }); const details: EventDetails = [ { @@ -131,7 +122,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "uniswap-v3:Burn", ["eth-mainnet"], - PairABI as Abi, + pairABI as Abi, async ( log_event, tx, @@ -142,21 +133,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: PairABI, + abi: pairABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "Burn", - }) as { - eventName: "Burn"; - args: { - owner: string; - tickLower: bigint; - tickUpper: bigint; - amount: bigint; - amount0: bigint; - amount1: bigint; - }; - }; + }); const details: EventDetails = [ { @@ -208,7 +189,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "uniswap-v3:Mint", ["eth-mainnet"], - PairABI as Abi, + pairABI as Abi, async ( log_event, tx, @@ -219,22 +200,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: PairABI, + abi: pairABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "Mint", - }) as { - eventName: "Mint"; - args: { - sender: string; - owner: string; - tickLower: bigint; - tickUpper: bigint; - amount: bigint; - amount0: bigint; - amount1: bigint; - }; - }; + }); const details: EventDetails = [ { @@ -291,7 +261,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "uniswap-v3:Swap", ["eth-mainnet"], - PairABI as Abi, + pairABI as Abi, async ( log_event, tx, @@ -302,22 +272,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: PairABI, + abi: pairABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "Swap", - }) as { - eventName: "Swap"; - args: { - sender: string; - recipient: string; - amount0: bigint; - amount1: bigint; - sqrtPriceX96: bigint; - liquidity: bigint; - tick: bigint; - }; - }; + }); const details: EventDetails = [ { @@ -374,7 +333,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "uniswap-v3:Collect", ["eth-mainnet"], - PairABI as Abi, + pairABI as Abi, async ( log_event, tx, @@ -385,21 +344,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: PairABI, + abi: pairABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "Collect", - }) as { - eventName: "Collect"; - args: { - owner: string; - recipient: string; - tickLower: bigint; - tickUpper: bigint; - amount0: bigint; - amount1: bigint; - }; - }; + }); const details: EventDetails = [ { @@ -451,7 +400,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "uniswap-v3:Flash", ["eth-mainnet"], - PairABI as Abi, + pairABI as Abi, async ( log_event, tx, @@ -462,21 +411,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: PairABI, + abi: pairABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "Flash", - }) as { - eventName: "Flash"; - args: { - sender: string; - recipient: string; - amount0: bigint; - amount1: bigint; - paid0: bigint; - paid1: bigint; - }; - }; + }); const details: EventDetails = [ { @@ -528,7 +467,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "uniswap-v3:DecreaseLiquidity", ["eth-mainnet"], - PositionManagerABI as Abi, + nonFungiblePositionManagerABI as Abi, async ( log_event, tx, @@ -539,19 +478,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: PositionManagerABI, + abi: nonFungiblePositionManagerABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "DecreaseLiquidity", - }) as { - eventName: "DecreaseLiquidity"; - args: { - tokenId: bigint; - liquidity: bigint; - amount0: bigint; - amount1: bigint; - }; - }; + }); const details: EventDetails = [ { @@ -593,7 +524,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "uniswap-v3:IncreaseLiquidity", ["eth-mainnet"], - PositionManagerABI as Abi, + nonFungiblePositionManagerABI as Abi, async ( log_event, tx, @@ -604,19 +535,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: PositionManagerABI, + abi: nonFungiblePositionManagerABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "IncreaseLiquidity", - }) as { - eventName: "IncreaseLiquidity"; - args: { - tokenId: bigint; - liquidity: bigint; - amount0: bigint; - amount1: bigint; - }; - }; + }); const details: EventDetails = [ { @@ -658,7 +581,7 @@ GoldRushDecoder.on( GoldRushDecoder.on( "uniswap-v3:Collect", ["eth-mainnet"], - PositionManagerABI as Abi, + nonFungiblePositionManagerABI as Abi, async ( log_event, tx, @@ -669,19 +592,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: PositionManagerABI, + abi: nonFungiblePositionManagerABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "Collect", - }) as { - eventName: "Collect"; - args: { - tokenId: bigint; - recipient: string; - amount0: bigint; - amount1: bigint; - }; - }; + }); const details: EventDetails = [ { diff --git a/services/decoder/protocols/wormhole/abis/bridge-implementation.abi.ts b/services/decoder/protocols/wormhole/abis/bridge-implementation.abi.ts new file mode 100644 index 0000000..35d8a25 --- /dev/null +++ b/services/decoder/protocols/wormhole/abis/bridge-implementation.abi.ts @@ -0,0 +1,879 @@ +export const bridgeImplementationABI = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "previousAdmin", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newAdmin", + type: "address", + }, + ], + name: "AdminChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "beacon", + type: "address", + }, + ], + name: "BeaconUpgraded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "oldContract", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newContract", + type: "address", + }, + ], + name: "ContractUpgraded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint16", + name: "emitterChainId", + type: "uint16", + }, + { + indexed: true, + internalType: "bytes32", + name: "emitterAddress", + type: "bytes32", + }, + { + indexed: true, + internalType: "uint64", + name: "sequence", + type: "uint64", + }, + ], + name: "TransferRedeemed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "implementation", + type: "address", + }, + ], + name: "Upgraded", + type: "event", + }, + { + inputs: [], + name: "WETH", + outputs: [ + { internalType: "contract IWETH", name: "", type: "address" }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "bytes", name: "encoded", type: "bytes" }], + name: "_parseTransferCommon", + outputs: [ + { + components: [ + { + internalType: "uint8", + name: "payloadID", + type: "uint8", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes32", + name: "tokenAddress", + type: "bytes32", + }, + { + internalType: "uint16", + name: "tokenChain", + type: "uint16", + }, + { + internalType: "bytes32", + name: "to", + type: "bytes32", + }, + { + internalType: "uint16", + name: "toChain", + type: "uint16", + }, + { + internalType: "uint256", + name: "fee", + type: "uint256", + }, + ], + internalType: "struct BridgeStructs.Transfer", + name: "transfer", + type: "tuple", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "tokenAddress", + type: "address", + }, + { internalType: "uint32", name: "nonce", type: "uint32" }, + ], + name: "attestToken", + outputs: [{ internalType: "uint64", name: "sequence", type: "uint64" }], + stateMutability: "payable", + type: "function", + }, + { + inputs: [{ internalType: "uint16", name: "chainId_", type: "uint16" }], + name: "bridgeContracts", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "chainId", + outputs: [{ internalType: "uint16", name: "", type: "uint16" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "bytes", name: "encodedVm", type: "bytes" }], + name: "completeTransfer", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "bytes", name: "encodedVm", type: "bytes" }], + name: "completeTransferAndUnwrapETH", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "bytes", name: "encodedVm", type: "bytes" }], + name: "completeTransferAndUnwrapETHWithPayload", + outputs: [{ internalType: "bytes", name: "", type: "bytes" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "bytes", name: "encodedVm", type: "bytes" }], + name: "completeTransferWithPayload", + outputs: [{ internalType: "bytes", name: "", type: "bytes" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "bytes", name: "encodedVm", type: "bytes" }], + name: "createWrapped", + outputs: [{ internalType: "address", name: "token", type: "address" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint8", + name: "payloadID", + type: "uint8", + }, + { + internalType: "bytes32", + name: "tokenAddress", + type: "bytes32", + }, + { + internalType: "uint16", + name: "tokenChain", + type: "uint16", + }, + { + internalType: "uint8", + name: "decimals", + type: "uint8", + }, + { + internalType: "bytes32", + name: "symbol", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "name", + type: "bytes32", + }, + ], + internalType: "struct BridgeStructs.AssetMeta", + name: "meta", + type: "tuple", + }, + ], + name: "encodeAssetMeta", + outputs: [{ internalType: "bytes", name: "encoded", type: "bytes" }], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint8", + name: "payloadID", + type: "uint8", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes32", + name: "tokenAddress", + type: "bytes32", + }, + { + internalType: "uint16", + name: "tokenChain", + type: "uint16", + }, + { + internalType: "bytes32", + name: "to", + type: "bytes32", + }, + { + internalType: "uint16", + name: "toChain", + type: "uint16", + }, + { + internalType: "uint256", + name: "fee", + type: "uint256", + }, + ], + internalType: "struct BridgeStructs.Transfer", + name: "transfer", + type: "tuple", + }, + ], + name: "encodeTransfer", + outputs: [{ internalType: "bytes", name: "encoded", type: "bytes" }], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint8", + name: "payloadID", + type: "uint8", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes32", + name: "tokenAddress", + type: "bytes32", + }, + { + internalType: "uint16", + name: "tokenChain", + type: "uint16", + }, + { + internalType: "bytes32", + name: "to", + type: "bytes32", + }, + { + internalType: "uint16", + name: "toChain", + type: "uint16", + }, + { + internalType: "bytes32", + name: "fromAddress", + type: "bytes32", + }, + { + internalType: "bytes", + name: "payload", + type: "bytes", + }, + ], + internalType: "struct BridgeStructs.TransferWithPayload", + name: "transfer", + type: "tuple", + }, + ], + name: "encodeTransferWithPayload", + outputs: [{ internalType: "bytes", name: "encoded", type: "bytes" }], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "evmChainId", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "finality", + outputs: [{ internalType: "uint8", name: "", type: "uint8" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "bytes32", name: "hash", type: "bytes32" }], + name: "governanceActionIsConsumed", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "governanceChainId", + outputs: [{ internalType: "uint16", name: "", type: "uint16" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "governanceContract", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "implementation", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "isFork", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "impl", type: "address" }], + name: "isInitialized", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "bytes32", name: "hash", type: "bytes32" }], + name: "isTransferCompleted", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "token", type: "address" }], + name: "isWrappedAsset", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "token", type: "address" }], + name: "outstandingBridged", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "bytes", name: "encoded", type: "bytes" }], + name: "parseAssetMeta", + outputs: [ + { + components: [ + { + internalType: "uint8", + name: "payloadID", + type: "uint8", + }, + { + internalType: "bytes32", + name: "tokenAddress", + type: "bytes32", + }, + { + internalType: "uint16", + name: "tokenChain", + type: "uint16", + }, + { + internalType: "uint8", + name: "decimals", + type: "uint8", + }, + { + internalType: "bytes32", + name: "symbol", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "name", + type: "bytes32", + }, + ], + internalType: "struct BridgeStructs.AssetMeta", + name: "meta", + type: "tuple", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [{ internalType: "bytes", name: "encoded", type: "bytes" }], + name: "parsePayloadID", + outputs: [{ internalType: "uint8", name: "payloadID", type: "uint8" }], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "encodedRecoverChainId", + type: "bytes", + }, + ], + name: "parseRecoverChainId", + outputs: [ + { + components: [ + { + internalType: "bytes32", + name: "module", + type: "bytes32", + }, + { + internalType: "uint8", + name: "action", + type: "uint8", + }, + { + internalType: "uint256", + name: "evmChainId", + type: "uint256", + }, + { + internalType: "uint16", + name: "newChainId", + type: "uint16", + }, + ], + internalType: "struct BridgeStructs.RecoverChainId", + name: "rci", + type: "tuple", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [{ internalType: "bytes", name: "encoded", type: "bytes" }], + name: "parseRegisterChain", + outputs: [ + { + components: [ + { + internalType: "bytes32", + name: "module", + type: "bytes32", + }, + { + internalType: "uint8", + name: "action", + type: "uint8", + }, + { + internalType: "uint16", + name: "chainId", + type: "uint16", + }, + { + internalType: "uint16", + name: "emitterChainID", + type: "uint16", + }, + { + internalType: "bytes32", + name: "emitterAddress", + type: "bytes32", + }, + ], + internalType: "struct BridgeStructs.RegisterChain", + name: "chain", + type: "tuple", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [{ internalType: "bytes", name: "encoded", type: "bytes" }], + name: "parseTransfer", + outputs: [ + { + components: [ + { + internalType: "uint8", + name: "payloadID", + type: "uint8", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes32", + name: "tokenAddress", + type: "bytes32", + }, + { + internalType: "uint16", + name: "tokenChain", + type: "uint16", + }, + { + internalType: "bytes32", + name: "to", + type: "bytes32", + }, + { + internalType: "uint16", + name: "toChain", + type: "uint16", + }, + { + internalType: "uint256", + name: "fee", + type: "uint256", + }, + ], + internalType: "struct BridgeStructs.Transfer", + name: "transfer", + type: "tuple", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [{ internalType: "bytes", name: "encoded", type: "bytes" }], + name: "parseTransferWithPayload", + outputs: [ + { + components: [ + { + internalType: "uint8", + name: "payloadID", + type: "uint8", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes32", + name: "tokenAddress", + type: "bytes32", + }, + { + internalType: "uint16", + name: "tokenChain", + type: "uint16", + }, + { + internalType: "bytes32", + name: "to", + type: "bytes32", + }, + { + internalType: "uint16", + name: "toChain", + type: "uint16", + }, + { + internalType: "bytes32", + name: "fromAddress", + type: "bytes32", + }, + { + internalType: "bytes", + name: "payload", + type: "bytes", + }, + ], + internalType: "struct BridgeStructs.TransferWithPayload", + name: "transfer", + type: "tuple", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [{ internalType: "bytes", name: "encoded", type: "bytes" }], + name: "parseUpgrade", + outputs: [ + { + components: [ + { + internalType: "bytes32", + name: "module", + type: "bytes32", + }, + { + internalType: "uint8", + name: "action", + type: "uint8", + }, + { + internalType: "uint16", + name: "chainId", + type: "uint16", + }, + { + internalType: "bytes32", + name: "newContract", + type: "bytes32", + }, + ], + internalType: "struct BridgeStructs.UpgradeContract", + name: "chain", + type: "tuple", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [{ internalType: "bytes", name: "encodedVM", type: "bytes" }], + name: "registerChain", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "bytes", name: "encodedVM", type: "bytes" }], + name: "submitRecoverChainId", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "tokenImplementation", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "token", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + { + internalType: "uint16", + name: "recipientChain", + type: "uint16", + }, + { + internalType: "bytes32", + name: "recipient", + type: "bytes32", + }, + { + internalType: "uint256", + name: "arbiterFee", + type: "uint256", + }, + { internalType: "uint32", name: "nonce", type: "uint32" }, + ], + name: "transferTokens", + outputs: [{ internalType: "uint64", name: "sequence", type: "uint64" }], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "token", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + { + internalType: "uint16", + name: "recipientChain", + type: "uint16", + }, + { + internalType: "bytes32", + name: "recipient", + type: "bytes32", + }, + { internalType: "uint32", name: "nonce", type: "uint32" }, + { internalType: "bytes", name: "payload", type: "bytes" }, + ], + name: "transferTokensWithPayload", + outputs: [{ internalType: "uint64", name: "sequence", type: "uint64" }], + stateMutability: "payable", + type: "function", + }, + { + inputs: [{ internalType: "bytes", name: "encodedVm", type: "bytes" }], + name: "updateWrapped", + outputs: [{ internalType: "address", name: "token", type: "address" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "bytes", name: "encodedVM", type: "bytes" }], + name: "upgrade", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "wormhole", + outputs: [ + { + internalType: "contract IWormhole", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint16", + name: "recipientChain", + type: "uint16", + }, + { + internalType: "bytes32", + name: "recipient", + type: "bytes32", + }, + { + internalType: "uint256", + name: "arbiterFee", + type: "uint256", + }, + { internalType: "uint32", name: "nonce", type: "uint32" }, + ], + name: "wrapAndTransferETH", + outputs: [{ internalType: "uint64", name: "sequence", type: "uint64" }], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint16", + name: "recipientChain", + type: "uint16", + }, + { + internalType: "bytes32", + name: "recipient", + type: "bytes32", + }, + { internalType: "uint32", name: "nonce", type: "uint32" }, + { internalType: "bytes", name: "payload", type: "bytes" }, + ], + name: "wrapAndTransferETHWithPayload", + outputs: [{ internalType: "uint64", name: "sequence", type: "uint64" }], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint16", + name: "tokenChainId", + type: "uint16", + }, + { + internalType: "bytes32", + name: "tokenAddress", + type: "bytes32", + }, + ], + name: "wrappedAsset", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { stateMutability: "payable", type: "receive" }, +] as const; diff --git a/services/decoder/protocols/wormhole/abis/wormhole-eth-core.abi.json b/services/decoder/protocols/wormhole/abis/wormhole-eth-core.abi.json deleted file mode 100644 index b131484..0000000 --- a/services/decoder/protocols/wormhole/abis/wormhole-eth-core.abi.json +++ /dev/null @@ -1,812 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldContract", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newContract", - "type": "address" - } - ], - "name": "ContractUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint32", - "name": "index", - "type": "uint32" - } - ], - "name": "GuardianSetAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "sequence", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "nonce", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "payload", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint8", - "name": "consistencyLevel", - "type": "uint8" - } - ], - "name": "LogMessagePublished", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { "stateMutability": "payable", "type": "fallback" }, - { - "inputs": [], - "name": "chainId", - "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getCurrentGuardianSetIndex", - "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint32", "name": "index", "type": "uint32" } - ], - "name": "getGuardianSet", - "outputs": [ - { - "components": [ - { - "internalType": "address[]", - "name": "keys", - "type": "address[]" - }, - { - "internalType": "uint32", - "name": "expirationTime", - "type": "uint32" - } - ], - "internalType": "struct Structs.GuardianSet", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getGuardianSetExpiry", - "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "hash", "type": "bytes32" } - ], - "name": "governanceActionIsConsumed", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governanceChainId", - "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governanceContract", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "impl", "type": "address" } - ], - "name": "isInitialized", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "messageFee", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "emitter", "type": "address" } - ], - "name": "nextSequence", - "outputs": [{ "internalType": "uint64", "name": "", "type": "uint64" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "encodedVM", "type": "bytes" } - ], - "name": "parseAndVerifyVM", - "outputs": [ - { - "components": [ - { - "internalType": "uint8", - "name": "version", - "type": "uint8" - }, - { - "internalType": "uint32", - "name": "timestamp", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "nonce", - "type": "uint32" - }, - { - "internalType": "uint16", - "name": "emitterChainId", - "type": "uint16" - }, - { - "internalType": "bytes32", - "name": "emitterAddress", - "type": "bytes32" - }, - { - "internalType": "uint64", - "name": "sequence", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "consistencyLevel", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "payload", - "type": "bytes" - }, - { - "internalType": "uint32", - "name": "guardianSetIndex", - "type": "uint32" - }, - { - "components": [ - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "guardianIndex", - "type": "uint8" - } - ], - "internalType": "struct Structs.Signature[]", - "name": "signatures", - "type": "tuple[]" - }, - { - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" - } - ], - "internalType": "struct Structs.VM", - "name": "vm", - "type": "tuple" - }, - { "internalType": "bool", "name": "valid", "type": "bool" }, - { "internalType": "string", "name": "reason", "type": "string" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "encodedUpgrade", - "type": "bytes" - } - ], - "name": "parseContractUpgrade", - "outputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "module", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "action", - "type": "uint8" - }, - { - "internalType": "uint16", - "name": "chain", - "type": "uint16" - }, - { - "internalType": "address", - "name": "newContract", - "type": "address" - } - ], - "internalType": "struct GovernanceStructs.ContractUpgrade", - "name": "cu", - "type": "tuple" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "encodedUpgrade", - "type": "bytes" - } - ], - "name": "parseGuardianSetUpgrade", - "outputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "module", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "action", - "type": "uint8" - }, - { - "internalType": "uint16", - "name": "chain", - "type": "uint16" - }, - { - "components": [ - { - "internalType": "address[]", - "name": "keys", - "type": "address[]" - }, - { - "internalType": "uint32", - "name": "expirationTime", - "type": "uint32" - } - ], - "internalType": "struct Structs.GuardianSet", - "name": "newGuardianSet", - "type": "tuple" - }, - { - "internalType": "uint32", - "name": "newGuardianSetIndex", - "type": "uint32" - } - ], - "internalType": "struct GovernanceStructs.GuardianSetUpgrade", - "name": "gsu", - "type": "tuple" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "encodedSetMessageFee", - "type": "bytes" - } - ], - "name": "parseSetMessageFee", - "outputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "module", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "action", - "type": "uint8" - }, - { - "internalType": "uint16", - "name": "chain", - "type": "uint16" - }, - { - "internalType": "uint256", - "name": "messageFee", - "type": "uint256" - } - ], - "internalType": "struct GovernanceStructs.SetMessageFee", - "name": "smf", - "type": "tuple" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "encodedTransferFees", - "type": "bytes" - } - ], - "name": "parseTransferFees", - "outputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "module", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "action", - "type": "uint8" - }, - { - "internalType": "uint16", - "name": "chain", - "type": "uint16" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "recipient", - "type": "bytes32" - } - ], - "internalType": "struct GovernanceStructs.TransferFees", - "name": "tf", - "type": "tuple" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "encodedVM", "type": "bytes" } - ], - "name": "parseVM", - "outputs": [ - { - "components": [ - { - "internalType": "uint8", - "name": "version", - "type": "uint8" - }, - { - "internalType": "uint32", - "name": "timestamp", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "nonce", - "type": "uint32" - }, - { - "internalType": "uint16", - "name": "emitterChainId", - "type": "uint16" - }, - { - "internalType": "bytes32", - "name": "emitterAddress", - "type": "bytes32" - }, - { - "internalType": "uint64", - "name": "sequence", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "consistencyLevel", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "payload", - "type": "bytes" - }, - { - "internalType": "uint32", - "name": "guardianSetIndex", - "type": "uint32" - }, - { - "components": [ - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "guardianIndex", - "type": "uint8" - } - ], - "internalType": "struct Structs.Signature[]", - "name": "signatures", - "type": "tuple[]" - }, - { - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" - } - ], - "internalType": "struct Structs.VM", - "name": "vm", - "type": "tuple" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint32", "name": "nonce", "type": "uint32" }, - { "internalType": "bytes", "name": "payload", "type": "bytes" }, - { - "internalType": "uint8", - "name": "consistencyLevel", - "type": "uint8" - } - ], - "name": "publishMessage", - "outputs": [ - { "internalType": "uint64", "name": "sequence", "type": "uint64" } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "numGuardians", - "type": "uint256" - } - ], - "name": "quorum", - "outputs": [ - { - "internalType": "uint256", - "name": "numSignaturesRequiredForQuorum", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes", "name": "_vm", "type": "bytes" }], - "name": "submitContractUpgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes", "name": "_vm", "type": "bytes" }], - "name": "submitNewGuardianSet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes", "name": "_vm", "type": "bytes" }], - "name": "submitSetMessageFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes", "name": "_vm", "type": "bytes" }], - "name": "submitTransferFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "hash", "type": "bytes32" }, - { - "components": [ - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - }, - { "internalType": "uint8", "name": "v", "type": "uint8" }, - { - "internalType": "uint8", - "name": "guardianIndex", - "type": "uint8" - } - ], - "internalType": "struct Structs.Signature[]", - "name": "signatures", - "type": "tuple[]" - }, - { - "components": [ - { - "internalType": "address[]", - "name": "keys", - "type": "address[]" - }, - { - "internalType": "uint32", - "name": "expirationTime", - "type": "uint32" - } - ], - "internalType": "struct Structs.GuardianSet", - "name": "guardianSet", - "type": "tuple" - } - ], - "name": "verifySignatures", - "outputs": [ - { "internalType": "bool", "name": "valid", "type": "bool" }, - { "internalType": "string", "name": "reason", "type": "string" } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint8", - "name": "version", - "type": "uint8" - }, - { - "internalType": "uint32", - "name": "timestamp", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "nonce", - "type": "uint32" - }, - { - "internalType": "uint16", - "name": "emitterChainId", - "type": "uint16" - }, - { - "internalType": "bytes32", - "name": "emitterAddress", - "type": "bytes32" - }, - { - "internalType": "uint64", - "name": "sequence", - "type": "uint64" - }, - { - "internalType": "uint8", - "name": "consistencyLevel", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "payload", - "type": "bytes" - }, - { - "internalType": "uint32", - "name": "guardianSetIndex", - "type": "uint32" - }, - { - "components": [ - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "guardianIndex", - "type": "uint8" - } - ], - "internalType": "struct Structs.Signature[]", - "name": "signatures", - "type": "tuple[]" - }, - { - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" - } - ], - "internalType": "struct Structs.VM", - "name": "vm", - "type": "tuple" - } - ], - "name": "verifyVM", - "outputs": [ - { "internalType": "bool", "name": "valid", "type": "bool" }, - { "internalType": "string", "name": "reason", "type": "string" } - ], - "stateMutability": "view", - "type": "function" - }, - { "stateMutability": "payable", "type": "receive" } -] diff --git a/services/decoder/protocols/wormhole/abis/wormhole-implementation.abi.ts b/services/decoder/protocols/wormhole/abis/wormhole-implementation.abi.ts new file mode 100644 index 0000000..37a1a2a --- /dev/null +++ b/services/decoder/protocols/wormhole/abis/wormhole-implementation.abi.ts @@ -0,0 +1,794 @@ +export const wormholeImplementationABI = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "previousAdmin", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newAdmin", + type: "address", + }, + ], + name: "AdminChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "beacon", + type: "address", + }, + ], + name: "BeaconUpgraded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "oldContract", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newContract", + type: "address", + }, + ], + name: "ContractUpgraded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint32", + name: "index", + type: "uint32", + }, + ], + name: "GuardianSetAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "uint64", + name: "sequence", + type: "uint64", + }, + { + indexed: false, + internalType: "uint32", + name: "nonce", + type: "uint32", + }, + { + indexed: false, + internalType: "bytes", + name: "payload", + type: "bytes", + }, + { + indexed: false, + internalType: "uint8", + name: "consistencyLevel", + type: "uint8", + }, + ], + name: "LogMessagePublished", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "implementation", + type: "address", + }, + ], + name: "Upgraded", + type: "event", + }, + { stateMutability: "payable", type: "fallback" }, + { + inputs: [], + name: "chainId", + outputs: [{ internalType: "uint16", name: "", type: "uint16" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getCurrentGuardianSetIndex", + outputs: [{ internalType: "uint32", name: "", type: "uint32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint32", name: "index", type: "uint32" }], + name: "getGuardianSet", + outputs: [ + { + components: [ + { + internalType: "address[]", + name: "keys", + type: "address[]", + }, + { + internalType: "uint32", + name: "expirationTime", + type: "uint32", + }, + ], + internalType: "struct Structs.GuardianSet", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getGuardianSetExpiry", + outputs: [{ internalType: "uint32", name: "", type: "uint32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "bytes32", name: "hash", type: "bytes32" }], + name: "governanceActionIsConsumed", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "governanceChainId", + outputs: [{ internalType: "uint16", name: "", type: "uint16" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "governanceContract", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "impl", type: "address" }], + name: "isInitialized", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "messageFee", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "emitter", type: "address" }], + name: "nextSequence", + outputs: [{ internalType: "uint64", name: "", type: "uint64" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "bytes", name: "encodedVM", type: "bytes" }], + name: "parseAndVerifyVM", + outputs: [ + { + components: [ + { + internalType: "uint8", + name: "version", + type: "uint8", + }, + { + internalType: "uint32", + name: "timestamp", + type: "uint32", + }, + { + internalType: "uint32", + name: "nonce", + type: "uint32", + }, + { + internalType: "uint16", + name: "emitterChainId", + type: "uint16", + }, + { + internalType: "bytes32", + name: "emitterAddress", + type: "bytes32", + }, + { + internalType: "uint64", + name: "sequence", + type: "uint64", + }, + { + internalType: "uint8", + name: "consistencyLevel", + type: "uint8", + }, + { + internalType: "bytes", + name: "payload", + type: "bytes", + }, + { + internalType: "uint32", + name: "guardianSetIndex", + type: "uint32", + }, + { + components: [ + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "uint8", + name: "guardianIndex", + type: "uint8", + }, + ], + internalType: "struct Structs.Signature[]", + name: "signatures", + type: "tuple[]", + }, + { + internalType: "bytes32", + name: "hash", + type: "bytes32", + }, + ], + internalType: "struct Structs.VM", + name: "vm", + type: "tuple", + }, + { internalType: "bool", name: "valid", type: "bool" }, + { internalType: "string", name: "reason", type: "string" }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "encodedUpgrade", + type: "bytes", + }, + ], + name: "parseContractUpgrade", + outputs: [ + { + components: [ + { + internalType: "bytes32", + name: "module", + type: "bytes32", + }, + { + internalType: "uint8", + name: "action", + type: "uint8", + }, + { + internalType: "uint16", + name: "chain", + type: "uint16", + }, + { + internalType: "address", + name: "newContract", + type: "address", + }, + ], + internalType: "struct GovernanceStructs.ContractUpgrade", + name: "cu", + type: "tuple", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "encodedUpgrade", + type: "bytes", + }, + ], + name: "parseGuardianSetUpgrade", + outputs: [ + { + components: [ + { + internalType: "bytes32", + name: "module", + type: "bytes32", + }, + { + internalType: "uint8", + name: "action", + type: "uint8", + }, + { + internalType: "uint16", + name: "chain", + type: "uint16", + }, + { + components: [ + { + internalType: "address[]", + name: "keys", + type: "address[]", + }, + { + internalType: "uint32", + name: "expirationTime", + type: "uint32", + }, + ], + internalType: "struct Structs.GuardianSet", + name: "newGuardianSet", + type: "tuple", + }, + { + internalType: "uint32", + name: "newGuardianSetIndex", + type: "uint32", + }, + ], + internalType: "struct GovernanceStructs.GuardianSetUpgrade", + name: "gsu", + type: "tuple", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "encodedSetMessageFee", + type: "bytes", + }, + ], + name: "parseSetMessageFee", + outputs: [ + { + components: [ + { + internalType: "bytes32", + name: "module", + type: "bytes32", + }, + { + internalType: "uint8", + name: "action", + type: "uint8", + }, + { + internalType: "uint16", + name: "chain", + type: "uint16", + }, + { + internalType: "uint256", + name: "messageFee", + type: "uint256", + }, + ], + internalType: "struct GovernanceStructs.SetMessageFee", + name: "smf", + type: "tuple", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "encodedTransferFees", + type: "bytes", + }, + ], + name: "parseTransferFees", + outputs: [ + { + components: [ + { + internalType: "bytes32", + name: "module", + type: "bytes32", + }, + { + internalType: "uint8", + name: "action", + type: "uint8", + }, + { + internalType: "uint16", + name: "chain", + type: "uint16", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes32", + name: "recipient", + type: "bytes32", + }, + ], + internalType: "struct GovernanceStructs.TransferFees", + name: "tf", + type: "tuple", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [{ internalType: "bytes", name: "encodedVM", type: "bytes" }], + name: "parseVM", + outputs: [ + { + components: [ + { + internalType: "uint8", + name: "version", + type: "uint8", + }, + { + internalType: "uint32", + name: "timestamp", + type: "uint32", + }, + { + internalType: "uint32", + name: "nonce", + type: "uint32", + }, + { + internalType: "uint16", + name: "emitterChainId", + type: "uint16", + }, + { + internalType: "bytes32", + name: "emitterAddress", + type: "bytes32", + }, + { + internalType: "uint64", + name: "sequence", + type: "uint64", + }, + { + internalType: "uint8", + name: "consistencyLevel", + type: "uint8", + }, + { + internalType: "bytes", + name: "payload", + type: "bytes", + }, + { + internalType: "uint32", + name: "guardianSetIndex", + type: "uint32", + }, + { + components: [ + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "uint8", + name: "guardianIndex", + type: "uint8", + }, + ], + internalType: "struct Structs.Signature[]", + name: "signatures", + type: "tuple[]", + }, + { + internalType: "bytes32", + name: "hash", + type: "bytes32", + }, + ], + internalType: "struct Structs.VM", + name: "vm", + type: "tuple", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { internalType: "uint32", name: "nonce", type: "uint32" }, + { internalType: "bytes", name: "payload", type: "bytes" }, + { + internalType: "uint8", + name: "consistencyLevel", + type: "uint8", + }, + ], + name: "publishMessage", + outputs: [{ internalType: "uint64", name: "sequence", type: "uint64" }], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "numGuardians", + type: "uint256", + }, + ], + name: "quorum", + outputs: [ + { + internalType: "uint256", + name: "numSignaturesRequiredForQuorum", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [{ internalType: "bytes", name: "_vm", type: "bytes" }], + name: "submitContractUpgrade", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "bytes", name: "_vm", type: "bytes" }], + name: "submitNewGuardianSet", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "bytes", name: "_vm", type: "bytes" }], + name: "submitSetMessageFee", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "bytes", name: "_vm", type: "bytes" }], + name: "submitTransferFees", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "bytes32", name: "hash", type: "bytes32" }, + { + components: [ + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + { internalType: "uint8", name: "v", type: "uint8" }, + { + internalType: "uint8", + name: "guardianIndex", + type: "uint8", + }, + ], + internalType: "struct Structs.Signature[]", + name: "signatures", + type: "tuple[]", + }, + { + components: [ + { + internalType: "address[]", + name: "keys", + type: "address[]", + }, + { + internalType: "uint32", + name: "expirationTime", + type: "uint32", + }, + ], + internalType: "struct Structs.GuardianSet", + name: "guardianSet", + type: "tuple", + }, + ], + name: "verifySignatures", + outputs: [ + { internalType: "bool", name: "valid", type: "bool" }, + { internalType: "string", name: "reason", type: "string" }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint8", + name: "version", + type: "uint8", + }, + { + internalType: "uint32", + name: "timestamp", + type: "uint32", + }, + { + internalType: "uint32", + name: "nonce", + type: "uint32", + }, + { + internalType: "uint16", + name: "emitterChainId", + type: "uint16", + }, + { + internalType: "bytes32", + name: "emitterAddress", + type: "bytes32", + }, + { + internalType: "uint64", + name: "sequence", + type: "uint64", + }, + { + internalType: "uint8", + name: "consistencyLevel", + type: "uint8", + }, + { + internalType: "bytes", + name: "payload", + type: "bytes", + }, + { + internalType: "uint32", + name: "guardianSetIndex", + type: "uint32", + }, + { + components: [ + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "uint8", + name: "guardianIndex", + type: "uint8", + }, + ], + internalType: "struct Structs.Signature[]", + name: "signatures", + type: "tuple[]", + }, + { + internalType: "bytes32", + name: "hash", + type: "bytes32", + }, + ], + internalType: "struct Structs.VM", + name: "vm", + type: "tuple", + }, + ], + name: "verifyVM", + outputs: [ + { internalType: "bool", name: "valid", type: "bool" }, + { internalType: "string", name: "reason", type: "string" }, + ], + stateMutability: "view", + type: "function", + }, + { stateMutability: "payable", type: "receive" }, +] as const; diff --git a/services/decoder/protocols/wormhole/abis/wormhole-portal-bridge.abi.json b/services/decoder/protocols/wormhole/abis/wormhole-portal-bridge.abi.json deleted file mode 100644 index 2d766f2..0000000 --- a/services/decoder/protocols/wormhole/abis/wormhole-portal-bridge.abi.json +++ /dev/null @@ -1,959 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldContract", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newContract", - "type": "address" - } - ], - "name": "ContractUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint16", - "name": "emitterChainId", - "type": "uint16" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "emitterAddress", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "uint64", - "name": "sequence", - "type": "uint64" - } - ], - "name": "TransferRedeemed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "inputs": [], - "name": "WETH", - "outputs": [ - { "internalType": "contract IWETH", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "encoded", "type": "bytes" } - ], - "name": "_parseTransferCommon", - "outputs": [ - { - "components": [ - { - "internalType": "uint8", - "name": "payloadID", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "tokenAddress", - "type": "bytes32" - }, - { - "internalType": "uint16", - "name": "tokenChain", - "type": "uint16" - }, - { - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "internalType": "uint16", - "name": "toChain", - "type": "uint16" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - } - ], - "internalType": "struct BridgeStructs.Transfer", - "name": "transfer", - "type": "tuple" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - }, - { "internalType": "uint32", "name": "nonce", "type": "uint32" } - ], - "name": "attestToken", - "outputs": [ - { "internalType": "uint64", "name": "sequence", "type": "uint64" } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint16", "name": "chainId_", "type": "uint16" } - ], - "name": "bridgeContracts", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainId", - "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "encodedVm", "type": "bytes" } - ], - "name": "completeTransfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "encodedVm", "type": "bytes" } - ], - "name": "completeTransferAndUnwrapETH", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "encodedVm", "type": "bytes" } - ], - "name": "completeTransferAndUnwrapETHWithPayload", - "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "encodedVm", "type": "bytes" } - ], - "name": "completeTransferWithPayload", - "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "encodedVm", "type": "bytes" } - ], - "name": "createWrapped", - "outputs": [ - { "internalType": "address", "name": "token", "type": "address" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint8", - "name": "payloadID", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "tokenAddress", - "type": "bytes32" - }, - { - "internalType": "uint16", - "name": "tokenChain", - "type": "uint16" - }, - { - "internalType": "uint8", - "name": "decimals", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "symbol", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "name", - "type": "bytes32" - } - ], - "internalType": "struct BridgeStructs.AssetMeta", - "name": "meta", - "type": "tuple" - } - ], - "name": "encodeAssetMeta", - "outputs": [ - { "internalType": "bytes", "name": "encoded", "type": "bytes" } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint8", - "name": "payloadID", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "tokenAddress", - "type": "bytes32" - }, - { - "internalType": "uint16", - "name": "tokenChain", - "type": "uint16" - }, - { - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "internalType": "uint16", - "name": "toChain", - "type": "uint16" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - } - ], - "internalType": "struct BridgeStructs.Transfer", - "name": "transfer", - "type": "tuple" - } - ], - "name": "encodeTransfer", - "outputs": [ - { "internalType": "bytes", "name": "encoded", "type": "bytes" } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint8", - "name": "payloadID", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "tokenAddress", - "type": "bytes32" - }, - { - "internalType": "uint16", - "name": "tokenChain", - "type": "uint16" - }, - { - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "internalType": "uint16", - "name": "toChain", - "type": "uint16" - }, - { - "internalType": "bytes32", - "name": "fromAddress", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "payload", - "type": "bytes" - } - ], - "internalType": "struct BridgeStructs.TransferWithPayload", - "name": "transfer", - "type": "tuple" - } - ], - "name": "encodeTransferWithPayload", - "outputs": [ - { "internalType": "bytes", "name": "encoded", "type": "bytes" } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "evmChainId", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "finality", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "hash", "type": "bytes32" } - ], - "name": "governanceActionIsConsumed", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governanceChainId", - "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "governanceContract", - "outputs": [ - { "internalType": "bytes32", "name": "", "type": "bytes32" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "isFork", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "impl", "type": "address" } - ], - "name": "isInitialized", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "hash", "type": "bytes32" } - ], - "name": "isTransferCompleted", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "token", "type": "address" } - ], - "name": "isWrappedAsset", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "token", "type": "address" } - ], - "name": "outstandingBridged", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "encoded", "type": "bytes" } - ], - "name": "parseAssetMeta", - "outputs": [ - { - "components": [ - { - "internalType": "uint8", - "name": "payloadID", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "tokenAddress", - "type": "bytes32" - }, - { - "internalType": "uint16", - "name": "tokenChain", - "type": "uint16" - }, - { - "internalType": "uint8", - "name": "decimals", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "symbol", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "name", - "type": "bytes32" - } - ], - "internalType": "struct BridgeStructs.AssetMeta", - "name": "meta", - "type": "tuple" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "encoded", "type": "bytes" } - ], - "name": "parsePayloadID", - "outputs": [ - { "internalType": "uint8", "name": "payloadID", "type": "uint8" } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "encodedRecoverChainId", - "type": "bytes" - } - ], - "name": "parseRecoverChainId", - "outputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "module", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "action", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "evmChainId", - "type": "uint256" - }, - { - "internalType": "uint16", - "name": "newChainId", - "type": "uint16" - } - ], - "internalType": "struct BridgeStructs.RecoverChainId", - "name": "rci", - "type": "tuple" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "encoded", "type": "bytes" } - ], - "name": "parseRegisterChain", - "outputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "module", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "action", - "type": "uint8" - }, - { - "internalType": "uint16", - "name": "chainId", - "type": "uint16" - }, - { - "internalType": "uint16", - "name": "emitterChainID", - "type": "uint16" - }, - { - "internalType": "bytes32", - "name": "emitterAddress", - "type": "bytes32" - } - ], - "internalType": "struct BridgeStructs.RegisterChain", - "name": "chain", - "type": "tuple" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "encoded", "type": "bytes" } - ], - "name": "parseTransfer", - "outputs": [ - { - "components": [ - { - "internalType": "uint8", - "name": "payloadID", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "tokenAddress", - "type": "bytes32" - }, - { - "internalType": "uint16", - "name": "tokenChain", - "type": "uint16" - }, - { - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "internalType": "uint16", - "name": "toChain", - "type": "uint16" - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - } - ], - "internalType": "struct BridgeStructs.Transfer", - "name": "transfer", - "type": "tuple" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "encoded", "type": "bytes" } - ], - "name": "parseTransferWithPayload", - "outputs": [ - { - "components": [ - { - "internalType": "uint8", - "name": "payloadID", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "tokenAddress", - "type": "bytes32" - }, - { - "internalType": "uint16", - "name": "tokenChain", - "type": "uint16" - }, - { - "internalType": "bytes32", - "name": "to", - "type": "bytes32" - }, - { - "internalType": "uint16", - "name": "toChain", - "type": "uint16" - }, - { - "internalType": "bytes32", - "name": "fromAddress", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "payload", - "type": "bytes" - } - ], - "internalType": "struct BridgeStructs.TransferWithPayload", - "name": "transfer", - "type": "tuple" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "encoded", "type": "bytes" } - ], - "name": "parseUpgrade", - "outputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "module", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "action", - "type": "uint8" - }, - { - "internalType": "uint16", - "name": "chainId", - "type": "uint16" - }, - { - "internalType": "bytes32", - "name": "newContract", - "type": "bytes32" - } - ], - "internalType": "struct BridgeStructs.UpgradeContract", - "name": "chain", - "type": "tuple" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "encodedVM", "type": "bytes" } - ], - "name": "registerChain", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "encodedVM", "type": "bytes" } - ], - "name": "submitRecoverChainId", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "tokenImplementation", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "token", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { - "internalType": "uint16", - "name": "recipientChain", - "type": "uint16" - }, - { - "internalType": "bytes32", - "name": "recipient", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "arbiterFee", - "type": "uint256" - }, - { "internalType": "uint32", "name": "nonce", "type": "uint32" } - ], - "name": "transferTokens", - "outputs": [ - { "internalType": "uint64", "name": "sequence", "type": "uint64" } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "token", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { - "internalType": "uint16", - "name": "recipientChain", - "type": "uint16" - }, - { - "internalType": "bytes32", - "name": "recipient", - "type": "bytes32" - }, - { "internalType": "uint32", "name": "nonce", "type": "uint32" }, - { "internalType": "bytes", "name": "payload", "type": "bytes" } - ], - "name": "transferTokensWithPayload", - "outputs": [ - { "internalType": "uint64", "name": "sequence", "type": "uint64" } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "encodedVm", "type": "bytes" } - ], - "name": "updateWrapped", - "outputs": [ - { "internalType": "address", "name": "token", "type": "address" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes", "name": "encodedVM", "type": "bytes" } - ], - "name": "upgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "wormhole", - "outputs": [ - { - "internalType": "contract IWormhole", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "recipientChain", - "type": "uint16" - }, - { - "internalType": "bytes32", - "name": "recipient", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "arbiterFee", - "type": "uint256" - }, - { "internalType": "uint32", "name": "nonce", "type": "uint32" } - ], - "name": "wrapAndTransferETH", - "outputs": [ - { "internalType": "uint64", "name": "sequence", "type": "uint64" } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "recipientChain", - "type": "uint16" - }, - { - "internalType": "bytes32", - "name": "recipient", - "type": "bytes32" - }, - { "internalType": "uint32", "name": "nonce", "type": "uint32" }, - { "internalType": "bytes", "name": "payload", "type": "bytes" } - ], - "name": "wrapAndTransferETHWithPayload", - "outputs": [ - { "internalType": "uint64", "name": "sequence", "type": "uint64" } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "tokenChainId", - "type": "uint16" - }, - { - "internalType": "bytes32", - "name": "tokenAddress", - "type": "bytes32" - } - ], - "name": "wrappedAsset", - "outputs": [ - { "internalType": "address", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { "stateMutability": "payable", "type": "receive" } -] diff --git a/services/decoder/protocols/wormhole/wormhole.decoders.ts b/services/decoder/protocols/wormhole/wormhole.decoders.ts index 4bd4299..d1cc94f 100644 --- a/services/decoder/protocols/wormhole/wormhole.decoders.ts +++ b/services/decoder/protocols/wormhole/wormhole.decoders.ts @@ -1,13 +1,13 @@ +import { decodeEventLog, type Abi } from "viem"; import { GoldRushDecoder } from "../../decoder"; -import type { EventDetails } from "../../decoder.types"; -import { type EventType } from "../../decoder.types"; import { DECODED_ACTION, DECODED_EVENT_CATEGORY, } from "../../decoder.constants"; -import { decodeEventLog, type Abi } from "viem"; -import PORTAL_BRIDGE_ABI from "./abis/wormhole-portal-bridge.abi.json"; -import ETH_CORE_ABI from "./abis/wormhole-eth-core.abi.json"; +import type { EventDetails } from "../../decoder.types"; +import { type EventType } from "../../decoder.types"; +import { bridgeImplementationABI } from "./abis/bridge-implementation.abi"; +import { wormholeImplementationABI } from "./abis/wormhole-implementation.abi"; GoldRushDecoder.on( "wormhole:TransferRedeemed", @@ -24,7 +24,7 @@ GoldRushDecoder.on( "optimism-mainnet", "base-mainnet", ], - PORTAL_BRIDGE_ABI as Abi, + bridgeImplementationABI as Abi, async ( log_event, tx, @@ -35,23 +35,16 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: PORTAL_BRIDGE_ABI, + abi: bridgeImplementationABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "TransferRedeemed", - }) as { - eventName: "TransferRedeemed"; - args: { - emitterChainId: string; - emitterAddress: string; - sequence: bigint; - }; - }; + }); const details: EventDetails = [ { heading: "Emitter Chain ID", - value: decoded.emitterChainId, + value: decoded.emitterChainId.toLocaleString(), type: "text", }, { @@ -96,7 +89,7 @@ GoldRushDecoder.on( "base-mainnet", "gnosis-mainnet", ], - ETH_CORE_ABI as Abi, + wormholeImplementationABI as Abi, async ( log_event, tx, @@ -107,20 +100,11 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: ETH_CORE_ABI, + abi: wormholeImplementationABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "LogMessagePublished", - }) as { - eventName: "LogMessagePublished"; - args: { - sender: string; - consistencyLevel: bigint; - sequence: bigint; - nonce: bigint; - payload: string; - }; - }; + }); const details: EventDetails = [ { diff --git a/yarn.lock b/yarn.lock index d960a39..f02bef7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -632,22 +632,24 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" -"@noble/curves@1.2.0", "@noble/curves@~1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.2.0.tgz#92d7e12e4e49b23105a2555c6984d41733d65c35" - integrity sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw== +"@noble/curves@1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.4.0.tgz#f05771ef64da724997f69ee1261b2417a49522d6" + integrity sha512-p+4cb332SFCrReJkCYe8Xzm0OWi4Jji5jVdIZRL/PmacmDkFNw6MrrV+gGpiPxLHbV+zKFRywUWbaseT+tZRXg== dependencies: - "@noble/hashes" "1.3.2" + "@noble/hashes" "1.4.0" -"@noble/hashes@1.3.2": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39" - integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ== +"@noble/curves@~1.4.0": + version "1.4.2" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.4.2.tgz#40309198c76ed71bc6dbf7ba24e81ceb4d0d1fe9" + integrity sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw== + dependencies: + "@noble/hashes" "1.4.0" -"@noble/hashes@~1.3.0", "@noble/hashes@~1.3.2": - version "1.3.3" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.3.tgz#39908da56a4adc270147bb07968bf3b16cfe1699" - integrity sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA== +"@noble/hashes@1.4.0", "@noble/hashes@~1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.4.0.tgz#45814aa329f30e4fe0ba49426f49dfccdd066426" + integrity sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg== "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -716,27 +718,27 @@ estree-walker "^2.0.2" picomatch "^2.3.1" -"@scure/base@~1.1.0", "@scure/base@~1.1.2": +"@scure/base@~1.1.6": version "1.1.7" resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.7.tgz#fe973311a5c6267846aa131bc72e96c5d40d2b30" integrity sha512-PPNYBslrLNNUQ/Yad37MHYsNQtK67EhWb6WtSvNLLPo7SdVZgkUjD6Dg+5On7zNwmskf8OX7I7Nx5oN+MIWE0g== -"@scure/bip32@1.3.2": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.3.2.tgz#90e78c027d5e30f0b22c1f8d50ff12f3fb7559f8" - integrity sha512-N1ZhksgwD3OBlwTv3R6KFEcPojl/W4ElJOeCZdi+vuI5QmTFwLq3OFf2zd2ROpKvxFdgZ6hUpb0dx9bVNEwYCA== +"@scure/bip32@1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.4.0.tgz#4e1f1e196abedcef395b33b9674a042524e20d67" + integrity sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg== dependencies: - "@noble/curves" "~1.2.0" - "@noble/hashes" "~1.3.2" - "@scure/base" "~1.1.2" + "@noble/curves" "~1.4.0" + "@noble/hashes" "~1.4.0" + "@scure/base" "~1.1.6" -"@scure/bip39@1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.2.1.tgz#5cee8978656b272a917b7871c981e0541ad6ac2a" - integrity sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg== +"@scure/bip39@1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.3.0.tgz#0f258c16823ddd00739461ac31398b4e7d6a18c3" + integrity sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ== dependencies: - "@noble/hashes" "~1.3.0" - "@scure/base" "~1.1.0" + "@noble/hashes" "~1.4.0" + "@scure/base" "~1.1.6" "@sinclair/typebox@^0.27.8": version "0.27.8" @@ -1084,10 +1086,10 @@ resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== -abitype@0.9.8: - version "0.9.8" - resolved "https://registry.yarnpkg.com/abitype/-/abitype-0.9.8.tgz#1f120b6b717459deafd213dfbf3a3dd1bf10ae8c" - integrity sha512-puLifILdm+8sjyss4S+fsUN09obiT1g2YW6CtcQF+QDzxR0euzgEB29MZujC6zMk2a6SVmtttq1fc6+YFA7WYQ== +abitype@1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/abitype/-/abitype-1.0.5.tgz#29d0daa3eea867ca90f7e4123144c1d1270774b6" + integrity sha512-YzDhti7cjlfaBhHutMaboYB21Ha3rXR9QTkNJFzYC4kC8YclaiwPBBBJY8ejFdu2wnJeZCVZSMlQJ7fi8S6hsw== accepts@~1.3.8: version "1.3.8" @@ -2413,10 +2415,10 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== -isows@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/isows/-/isows-1.0.3.tgz#93c1cf0575daf56e7120bab5c8c448b0809d0d74" - integrity sha512-2cKei4vlmg2cxEjm3wVSqn8pcoRF/LX/wpifuuNquFO4SQmPwarClT+SUCA2lt+l581tTeZIPIZuIDo2jWN1fg== +isows@1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/isows/-/isows-1.0.4.tgz#810cd0d90cc4995c26395d2aa4cfa4037ebdf061" + integrity sha512-hEzjY+x9u9hPmBom9IIAqdJCwNLax+xrPb51vEPpERoFlIxgmZcHzsT5jKG06nvInKOBGvReAVz80Umed5CczQ== istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: version "3.2.2" @@ -3916,19 +3918,19 @@ vary@^1, vary@~1.1.2: resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== -viem@^1.16.6: - version "1.21.4" - resolved "https://registry.yarnpkg.com/viem/-/viem-1.21.4.tgz#883760e9222540a5a7e0339809202b45fe6a842d" - integrity sha512-BNVYdSaUjeS2zKQgPs+49e5JKocfo60Ib2yiXOWBT6LuVxY1I/6fFX3waEtpXvL1Xn4qu+BVitVtMh9lyThyhQ== +viem@^2.17.4: + version "2.17.4" + resolved "https://registry.yarnpkg.com/viem/-/viem-2.17.4.tgz#ecdaa35739c547268583610b77b2451b4e4fc9cb" + integrity sha512-6gmBB85I7z1qt/+yPPS+i4L2jNPJqCs+SEb+26WnKVYez13svSzjYMsU9OYYlPFpQmpGSy9dV2bKW6VX68FTgg== dependencies: "@adraffy/ens-normalize" "1.10.0" - "@noble/curves" "1.2.0" - "@noble/hashes" "1.3.2" - "@scure/bip32" "1.3.2" - "@scure/bip39" "1.2.1" - abitype "0.9.8" - isows "1.0.3" - ws "8.13.0" + "@noble/curves" "1.4.0" + "@noble/hashes" "1.4.0" + "@scure/bip32" "1.4.0" + "@scure/bip39" "1.3.0" + abitype "1.0.5" + isows "1.0.4" + ws "8.17.1" walker@^1.0.8: version "1.0.8" @@ -3971,10 +3973,10 @@ write-file-atomic@^4.0.2: imurmurhash "^0.1.4" signal-exit "^3.0.7" -ws@8.13.0: - version "8.13.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.13.0.tgz#9a9fb92f93cf41512a0735c8f4dd09b8a1211cd0" - integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA== +ws@8.17.1: + version "8.17.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" + integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== y18n@^5.0.5: version "5.0.8"