diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..88f4ae1 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,5 @@ +{ + "printWidth": 120, + "tabWidth": 2, + "useTabs": false +} diff --git a/abis/erc6160.ts b/abis/erc6160.ts index aa0bba2..0e7008e 100644 --- a/abis/erc6160.ts +++ b/abis/erc6160.ts @@ -1,238 +1,238 @@ const ABI = [ - { - inputs: [ - { internalType: "address", name: "admin", type: "address" }, - { internalType: "string", name: "name", type: "string" }, - { internalType: "string", name: "symbol", type: "string" }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { inputs: [], name: "NotRoleAdmin", type: "error" }, - { inputs: [], name: "PermissionDenied", type: "error" }, - { - 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: "from", type: "address" }, - { indexed: true, internalType: "address", name: "to", type: "address" }, - { - indexed: false, - internalType: "uint256", - name: "value", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - inputs: [], - name: "BURNER_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: [ - { internalType: "address", name: "owner", type: "address" }, - { internalType: "address", name: "spender", type: "address" }, - ], - name: "allowance", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { internalType: "address", name: "spender", type: "address" }, - { internalType: "uint256", name: "amount", type: "uint256" }, - ], - name: "approve", - outputs: [{ internalType: "bool", name: "", type: "bool" }], - stateMutability: "nonpayable", - 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: "_from", type: "address" }, - { internalType: "uint256", name: "_amount", type: "uint256" }, - { internalType: "bytes", name: "", type: "bytes" }, - ], - name: "burn", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "decimals", - outputs: [{ internalType: "uint8", name: "", type: "uint8" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { internalType: "address", name: "spender", type: "address" }, - { internalType: "uint256", name: "subtractedValue", type: "uint256" }, - ], - name: "decreaseAllowance", - outputs: [{ internalType: "bool", name: "", type: "bool" }], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "getBurnerRole", - outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], - stateMutability: "pure", - type: "function", - }, - { - inputs: [], - name: "getMinterRole", - outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], - stateMutability: "pure", - 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: "spender", type: "address" }, - { internalType: "uint256", name: "addedValue", type: "uint256" }, - ], - name: "increaseAllowance", - outputs: [{ internalType: "bool", name: "", type: "bool" }], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { internalType: "address", name: "_to", type: "address" }, - { internalType: "uint256", name: "_amount", type: "uint256" }, - { internalType: "bytes", name: "", type: "bytes" }, - ], - name: "mint", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "name", - outputs: [{ internalType: "string", name: "", type: "string" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { internalType: "bytes32", name: "_role", type: "bytes32" }, - { internalType: "address", name: "_account", type: "address" }, - ], - name: "revokeRole", - 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: [], - name: "totalSupply", - outputs: [{ internalType: "uint256", name: "", type: "uint256" }], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { internalType: "address", name: "to", type: "address" }, - { internalType: "uint256", name: "amount", type: "uint256" }, - ], - name: "transfer", - outputs: [{ internalType: "bool", name: "", type: "bool" }], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { internalType: "address", name: "from", type: "address" }, - { internalType: "address", name: "to", type: "address" }, - { internalType: "uint256", name: "amount", type: "uint256" }, - ], - name: "transferFrom", - outputs: [{ internalType: "bool", name: "", type: "bool" }], - stateMutability: "nonpayable", - type: "function", - }, + { + inputs: [ + { internalType: "address", name: "admin", type: "address" }, + { internalType: "string", name: "name", type: "string" }, + { internalType: "string", name: "symbol", type: "string" }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { inputs: [], name: "NotRoleAdmin", type: "error" }, + { inputs: [], name: "PermissionDenied", type: "error" }, + { + 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: "from", type: "address" }, + { indexed: true, internalType: "address", name: "to", type: "address" }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [], + name: "BURNER_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: [ + { internalType: "address", name: "owner", type: "address" }, + { internalType: "address", name: "spender", type: "address" }, + ], + name: "allowance", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "approve", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "nonpayable", + 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: "_from", type: "address" }, + { internalType: "uint256", name: "_amount", type: "uint256" }, + { internalType: "bytes", name: "", type: "bytes" }, + ], + name: "burn", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [{ internalType: "uint8", name: "", type: "uint8" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "spender", type: "address" }, + { internalType: "uint256", name: "subtractedValue", type: "uint256" }, + ], + name: "decreaseAllowance", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getBurnerRole", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "getMinterRole", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "pure", + 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: "spender", type: "address" }, + { internalType: "uint256", name: "addedValue", type: "uint256" }, + ], + name: "increaseAllowance", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_to", type: "address" }, + { internalType: "uint256", name: "_amount", type: "uint256" }, + { internalType: "bytes", name: "", type: "bytes" }, + ], + name: "mint", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [{ internalType: "string", name: "", type: "string" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "bytes32", name: "_role", type: "bytes32" }, + { internalType: "address", name: "_account", type: "address" }, + ], + name: "revokeRole", + 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: [], + name: "totalSupply", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "to", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "transfer", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "from", type: "address" }, + { internalType: "address", name: "to", type: "address" }, + { internalType: "uint256", name: "amount", type: "uint256" }, + ], + name: "transferFrom", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "nonpayable", + type: "function", + }, ] as const; export default { ABI }; diff --git a/abis/evmHost.ts b/abis/evmHost.ts index 4ee98c4..cb1d230 100644 --- a/abis/evmHost.ts +++ b/abis/evmHost.ts @@ -1,9 +1,19 @@ const ABI = [ + { + inputs: [], + name: "CannotChangeFeeToken", + type: "error", + }, { inputs: [], name: "DuplicateResponse", type: "error", }, + { + inputs: [], + name: "FrozenHost", + type: "error", + }, { inputs: [], name: "InvalidAddressLength", @@ -11,17 +21,36 @@ const ABI = [ }, { inputs: [], - name: "InvalidHostManagerAddress", + name: "InvalidConsensusClient", type: "error", }, { - inputs: [ - { - internalType: "uint256", - name: "provided", - type: "uint256", - }, - ], + inputs: [], + name: "InvalidHandler", + type: "error", + }, + { + inputs: [], + name: "InvalidHostManager", + type: "error", + }, + { + inputs: [], + name: "InvalidHyperbridgeId", + type: "error", + }, + { + inputs: [], + name: "InvalidStateMachinesLength", + type: "error", + }, + { + inputs: [], + name: "InvalidUnstakingPeriod", + type: "error", + }, + { + inputs: [], name: "MaxFishermanCountExceeded", type: "error", }, @@ -50,6 +79,11 @@ const ABI = [ name: "UnknownResponse", type: "error", }, + { + inputs: [], + name: "WithdrawalFailed", + type: "error", + }, { anonymous: false, inputs: [ @@ -95,6 +129,12 @@ const ABI = [ name: "timeoutTimestamp", type: "uint256", }, + { + indexed: false, + internalType: "uint256", + name: "fee", + type: "uint256", + }, ], name: "GetRequestEvent", type: "event", @@ -142,9 +182,9 @@ const ABI = [ inputs: [ { indexed: false, - internalType: "bool", - name: "frozen", - type: "bool", + internalType: "enum FrozenStatus", + name: "status", + type: "uint8", }, ], name: "HostFrozen", @@ -190,6 +230,11 @@ const ABI = [ name: "hostManager", type: "address", }, + { + internalType: "address", + name: "uniswapV2", + type: "address", + }, { internalType: "uint256", name: "unStakingPeriod", @@ -263,6 +308,11 @@ const ABI = [ name: "hostManager", type: "address", }, + { + internalType: "address", + name: "uniswapV2", + type: "address", + }, { internalType: "uint256", name: "unStakingPeriod", @@ -318,6 +368,12 @@ const ABI = [ name: "beneficiary", type: "address", }, + { + indexed: false, + internalType: "bool", + name: "native", + type: "bool", + }, ], name: "HostWithdrawal", type: "event", @@ -832,7 +888,7 @@ const ABI = [ type: "bytes32", }, ], - stateMutability: "nonpayable", + stateMutability: "payable", type: "function", }, { @@ -883,7 +939,7 @@ const ABI = [ type: "bytes32", }, ], - stateMutability: "nonpayable", + stateMutability: "payable", type: "function", }, { @@ -929,7 +985,7 @@ const ABI = [ type: "bytes32", }, ], - stateMutability: "nonpayable", + stateMutability: "payable", type: "function", }, { @@ -994,26 +1050,9 @@ const ABI = [ type: "tuple", }, { - components: [ - { - internalType: "uint256", - name: "fee", - type: "uint256", - }, - { - internalType: "address", - name: "sender", - type: "address", - }, - ], - internalType: "struct FeeMetadata", - name: "meta", - type: "tuple", - }, - { - internalType: "bytes32", - name: "commitment", - type: "bytes32", + internalType: "address", + name: "relayer", + type: "address", }, ], name: "dispatchIncoming", @@ -1066,26 +1105,9 @@ const ABI = [ type: "tuple", }, { - components: [ - { - internalType: "uint256", - name: "fee", - type: "uint256", - }, - { - internalType: "address", - name: "sender", - type: "address", - }, - ], - internalType: "struct FeeMetadata", - name: "meta", - type: "tuple", - }, - { - internalType: "bytes32", - name: "commitment", - type: "bytes32", + internalType: "address", + name: "relayer", + type: "address", }, ], name: "dispatchIncoming", @@ -1115,14 +1137,9 @@ const ABI = [ type: "uint64", }, { - internalType: "bytes", + internalType: "address", name: "from", - type: "bytes", - }, - { - internalType: "bytes", - name: "to", - type: "bytes", + type: "address", }, { internalType: "uint64", @@ -1130,27 +1147,39 @@ const ABI = [ type: "uint64", }, { - internalType: "bytes", - name: "body", - type: "bytes", + internalType: "bytes[]", + name: "keys", + type: "bytes[]", + }, + { + internalType: "uint64", + name: "height", + type: "uint64", }, ], - internalType: "struct PostRequest", + internalType: "struct GetRequest", name: "request", type: "tuple", }, { - internalType: "bytes", - name: "response", - type: "bytes", - }, - { - internalType: "uint64", - name: "timeoutTimestamp", - type: "uint64", + components: [ + { + internalType: "bytes", + name: "key", + type: "bytes", + }, + { + internalType: "bytes", + name: "value", + type: "bytes", + }, + ], + internalType: "struct StorageValue[]", + name: "values", + type: "tuple[]", }, ], - internalType: "struct PostResponse", + internalType: "struct GetResponse", name: "response", type: "tuple", }, @@ -1185,64 +1214,9 @@ const ABI = [ type: "uint64", }, { - internalType: "bytes", - name: "from", - type: "bytes", - }, - { - internalType: "bytes", - name: "to", - type: "bytes", - }, - { - internalType: "uint64", - name: "timeoutTimestamp", - type: "uint64", - }, - { - internalType: "bytes", - name: "body", - type: "bytes", - }, - ], - internalType: "struct PostRequest", - name: "request", - type: "tuple", - }, - { - internalType: "address", - name: "relayer", - type: "address", - }, - ], - name: "dispatchIncoming", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "bytes", - name: "source", - type: "bytes", - }, - { - internalType: "bytes", - name: "dest", - type: "bytes", - }, - { - internalType: "uint64", - name: "nonce", - type: "uint64", - }, - { - internalType: "bytes", + internalType: "address", name: "from", - type: "bytes", + type: "address", }, { internalType: "uint64", @@ -1287,7 +1261,7 @@ const ABI = [ type: "bytes32", }, ], - name: "dispatchIncoming", + name: "dispatchTimeOut", outputs: [], stateMutability: "nonpayable", type: "function", @@ -1318,55 +1292,137 @@ const ABI = [ name: "from", type: "bytes", }, + { + internalType: "bytes", + name: "to", + type: "bytes", + }, { internalType: "uint64", name: "timeoutTimestamp", type: "uint64", }, { - internalType: "bytes[]", - name: "keys", - type: "bytes[]", - }, - { - internalType: "uint64", - name: "height", - type: "uint64", + internalType: "bytes", + name: "body", + type: "bytes", }, ], - internalType: "struct GetRequest", + internalType: "struct PostRequest", name: "request", type: "tuple", }, { - components: [ - { - internalType: "bytes", - name: "key", - type: "bytes", - }, - { - internalType: "bytes", - name: "value", - type: "bytes", - }, - ], - internalType: "struct StorageValue[]", - name: "values", - type: "tuple[]", + internalType: "bytes", + name: "response", + type: "bytes", + }, + { + internalType: "uint64", + name: "timeoutTimestamp", + type: "uint64", }, ], - internalType: "struct GetResponse", + internalType: "struct PostResponse", name: "response", type: "tuple", }, { - internalType: "address", - name: "relayer", - type: "address", + components: [ + { + internalType: "uint256", + name: "fee", + type: "uint256", + }, + { + internalType: "address", + name: "sender", + type: "address", + }, + ], + internalType: "struct FeeMetadata", + name: "meta", + type: "tuple", + }, + { + internalType: "bytes32", + name: "commitment", + type: "bytes32", }, ], - name: "dispatchIncoming", + name: "dispatchTimeOut", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "bytes", + name: "source", + type: "bytes", + }, + { + internalType: "bytes", + name: "dest", + type: "bytes", + }, + { + internalType: "uint64", + name: "nonce", + type: "uint64", + }, + { + internalType: "bytes", + name: "from", + type: "bytes", + }, + { + internalType: "bytes", + name: "to", + type: "bytes", + }, + { + internalType: "uint64", + name: "timeoutTimestamp", + type: "uint64", + }, + { + internalType: "bytes", + name: "body", + type: "bytes", + }, + ], + internalType: "struct PostRequest", + name: "request", + type: "tuple", + }, + { + components: [ + { + internalType: "uint256", + name: "fee", + type: "uint256", + }, + { + internalType: "address", + name: "sender", + type: "address", + }, + ], + internalType: "struct FeeMetadata", + name: "meta", + type: "tuple", + }, + { + internalType: "bytes32", + name: "commitment", + type: "bytes32", + }, + ], + name: "dispatchTimeOut", outputs: [], stateMutability: "nonpayable", type: "function", @@ -1389,9 +1445,9 @@ const ABI = [ name: "frozen", outputs: [ { - internalType: "bool", + internalType: "enum FrozenStatus", name: "", - type: "bool", + type: "uint8", }, ], stateMutability: "view", @@ -1412,7 +1468,7 @@ const ABI = [ ], name: "fundRequest", outputs: [], - stateMutability: "nonpayable", + stateMutability: "payable", type: "function", }, { @@ -1430,7 +1486,7 @@ const ABI = [ ], name: "fundResponse", outputs: [], - stateMutability: "nonpayable", + stateMutability: "payable", type: "function", }, { @@ -1487,6 +1543,11 @@ const ABI = [ name: "hostManager", type: "address", }, + { + internalType: "address", + name: "uniswapV2", + type: "address", + }, { internalType: "uint256", name: "unStakingPeriod", @@ -1558,6 +1619,19 @@ const ABI = [ stateMutability: "view", type: "function", }, + { + inputs: [], + name: "nonce", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [], name: "perByteFee", @@ -1621,6 +1695,25 @@ const ABI = [ stateMutability: "view", type: "function", }, + { + inputs: [ + { + internalType: "bytes32", + name: "commitment", + type: "bytes32", + }, + ], + name: "responded", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -1738,9 +1831,9 @@ const ABI = [ { inputs: [ { - internalType: "bool", + internalType: "enum FrozenStatus", name: "newState", - type: "bool", + type: "uint8", }, ], name: "setFrozenState", @@ -1749,83 +1842,16 @@ const ABI = [ type: "function", }, { - inputs: [ + inputs: [], + name: "stateCommitmentFee", + outputs: [ { - components: [ - { - internalType: "uint256", - name: "defaultTimeout", - type: "uint256", - }, - { - internalType: "uint256", - name: "perByteFee", - type: "uint256", - }, - { - internalType: "uint256", - name: "stateCommitmentFee", - type: "uint256", - }, - { - internalType: "address", - name: "feeToken", - type: "address", - }, - { - internalType: "address", - name: "admin", - type: "address", - }, - { - internalType: "address", - name: "handler", - type: "address", - }, - { - internalType: "address", - name: "hostManager", - type: "address", - }, - { - internalType: "uint256", - name: "unStakingPeriod", - type: "uint256", - }, - { - internalType: "uint256", - name: "challengePeriod", - type: "uint256", - }, - { - internalType: "address", - name: "consensusClient", - type: "address", - }, - { - internalType: "uint256[]", - name: "stateMachines", - type: "uint256[]", - }, - { - internalType: "address[]", - name: "fishermen", - type: "address[]", - }, - { - internalType: "bytes", - name: "hyperbridge", - type: "bytes", - }, - ], - internalType: "struct HostParams", - name: "params", - type: "tuple", + internalType: "uint256", + name: "", + type: "uint256", }, ], - name: "setHostParamsAdmin", - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", type: "function", }, { @@ -1873,7 +1899,7 @@ const ABI = [ type: "tuple", }, ], - stateMutability: "nonpayable", + stateMutability: "payable", type: "function", }, { @@ -1909,6 +1935,11 @@ const ABI = [ }, { inputs: [ + { + internalType: "bytes", + name: "parachainId", + type: "bytes", + }, { internalType: "uint256", name: "id", @@ -1923,7 +1954,7 @@ const ABI = [ type: "string", }, ], - stateMutability: "view", + stateMutability: "pure", type: "function", }, { @@ -2012,6 +2043,19 @@ const ABI = [ stateMutability: "view", type: "function", }, + { + inputs: [], + name: "uniswapV2Router", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -2051,6 +2095,11 @@ const ABI = [ name: "hostManager", type: "address", }, + { + internalType: "address", + name: "uniswapV2", + type: "address", + }, { internalType: "uint256", name: "unStakingPeriod", @@ -2117,6 +2166,30 @@ const ABI = [ stateMutability: "nonpayable", type: "function", }, + { + inputs: [ + { + internalType: "uint256", + name: "paraId", + type: "uint256", + }, + { + internalType: "uint256", + name: "height", + type: "uint256", + }, + ], + name: "vetoes", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -2131,6 +2204,11 @@ const ABI = [ name: "amount", type: "uint256", }, + { + internalType: "bool", + name: "native", + type: "bool", + }, ], internalType: "struct WithdrawParams", name: "params", @@ -2142,6 +2220,10 @@ const ABI = [ stateMutability: "nonpayable", type: "function", }, + { + stateMutability: "payable", + type: "receive", + }, ] as const; export default { ABI }; diff --git a/abis/handler.ts b/abis/handler.ts index 6d6af0e..21113b3 100644 --- a/abis/handler.ts +++ b/abis/handler.ts @@ -1,646 +1,740 @@ const ABI = [ - { - inputs: [], - name: "ChallengePeriodNotElapsed", - type: "error", - }, - { - inputs: [], - name: "ConsensusClientExpired", - type: "error", - }, - { - inputs: [], - name: "DuplicateMessage", - type: "error", - }, - { - inputs: [], - name: "HostFrozen", - type: "error", - }, - { - inputs: [], - name: "InvalidMessageDestination", - type: "error", - }, - { - inputs: [], - name: "InvalidProof", - type: "error", - }, - { - inputs: [], - name: "MessageNotTimedOut", - type: "error", - }, - { - inputs: [], - name: "MessageTimedOut", - type: "error", - }, - { - inputs: [], - name: "StateCommitmentNotFound", - type: "error", - }, - { - inputs: [], - name: "UnknownMessage", - type: "error", - }, - { - inputs: [ - { - internalType: "contract IIsmpHost", - name: "host", - type: "address", - }, - { - internalType: "bytes", - name: "proof", - type: "bytes", - }, - ], - name: "handleConsensus", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IIsmpHost", - name: "host", - type: "address", - }, - { - components: [ - { - components: [ - { - internalType: "bytes", - name: "source", - type: "bytes", - }, - { - internalType: "bytes", - name: "dest", - type: "bytes", - }, - { - internalType: "uint64", - name: "nonce", - type: "uint64", - }, - { - internalType: "bytes", - name: "from", - type: "bytes", - }, - { - internalType: "uint64", - name: "timeoutTimestamp", - type: "uint64", - }, - { - internalType: "bytes[]", - name: "keys", - type: "bytes[]", - }, - { - internalType: "uint64", - name: "height", - type: "uint64", - }, - ], - internalType: "struct GetRequest[]", - name: "timeouts", - type: "tuple[]", - }, - ], - internalType: "struct GetTimeoutMessage", - name: "message", - type: "tuple", - }, - ], - name: "handleGetRequestTimeouts", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IIsmpHost", - name: "host", - type: "address", - }, - { - components: [ - { - internalType: "bytes[]", - name: "proof", - type: "bytes[]", - }, - { - components: [ - { - internalType: "uint256", - name: "stateMachineId", - type: "uint256", - }, - { - internalType: "uint256", - name: "height", - type: "uint256", - }, - ], - internalType: "struct StateMachineHeight", - name: "height", - type: "tuple", - }, - { - components: [ - { - internalType: "bytes", - name: "source", - type: "bytes", - }, - { - internalType: "bytes", - name: "dest", - type: "bytes", - }, - { - internalType: "uint64", - name: "nonce", - type: "uint64", - }, - { - internalType: "bytes", - name: "from", - type: "bytes", - }, - { - internalType: "uint64", - name: "timeoutTimestamp", - type: "uint64", - }, - { - internalType: "bytes[]", - name: "keys", - type: "bytes[]", - }, - { - internalType: "uint64", - name: "height", - type: "uint64", - }, - ], - internalType: "struct GetRequest[]", - name: "requests", - type: "tuple[]", - }, - ], - internalType: "struct GetResponseMessage", - name: "message", - type: "tuple", - }, - ], - name: "handleGetResponses", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IIsmpHost", - name: "host", - type: "address", - }, - { - components: [ - { - components: [ - { - internalType: "bytes", - name: "source", - type: "bytes", - }, - { - internalType: "bytes", - name: "dest", - type: "bytes", - }, - { - internalType: "uint64", - name: "nonce", - type: "uint64", - }, - { - internalType: "bytes", - name: "from", - type: "bytes", - }, - { - internalType: "bytes", - name: "to", - type: "bytes", - }, - { - internalType: "uint64", - name: "timeoutTimestamp", - type: "uint64", - }, - { - internalType: "bytes", - name: "body", - type: "bytes", - }, - ], - internalType: "struct PostRequest[]", - name: "timeouts", - type: "tuple[]", - }, - { - components: [ - { - internalType: "uint256", - name: "stateMachineId", - type: "uint256", - }, - { - internalType: "uint256", - name: "height", - type: "uint256", - }, - ], - internalType: "struct StateMachineHeight", - name: "height", - type: "tuple", - }, - { - internalType: "bytes[]", - name: "proof", - type: "bytes[]", - }, - ], - internalType: "struct PostRequestTimeoutMessage", - name: "message", - type: "tuple", - }, - ], - name: "handlePostRequestTimeouts", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IIsmpHost", - name: "host", - type: "address", - }, - { - components: [ - { - components: [ - { - components: [ - { - internalType: "uint256", - name: "stateMachineId", - type: "uint256", - }, - { - internalType: "uint256", - name: "height", - type: "uint256", - }, - ], - internalType: "struct StateMachineHeight", - name: "height", - type: "tuple", - }, - { - internalType: "bytes32[]", - name: "multiproof", - type: "bytes32[]", - }, - { - internalType: "uint256", - name: "leafCount", - type: "uint256", - }, - ], - internalType: "struct Proof", - name: "proof", - type: "tuple", - }, - { - components: [ - { - components: [ - { - internalType: "bytes", - name: "source", - type: "bytes", - }, - { - internalType: "bytes", - name: "dest", - type: "bytes", - }, - { - internalType: "uint64", - name: "nonce", - type: "uint64", - }, - { - internalType: "bytes", - name: "from", - type: "bytes", - }, - { - internalType: "bytes", - name: "to", - type: "bytes", - }, - { - internalType: "uint64", - name: "timeoutTimestamp", - type: "uint64", - }, - { - internalType: "bytes", - name: "body", - type: "bytes", - }, - ], - internalType: "struct PostRequest", - name: "request", - type: "tuple", - }, - { - internalType: "uint256", - name: "index", - type: "uint256", - }, - { - internalType: "uint256", - name: "kIndex", - type: "uint256", - }, - ], - internalType: "struct PostRequestLeaf[]", - name: "requests", - type: "tuple[]", - }, - ], - internalType: "struct PostRequestMessage", - name: "request", - type: "tuple", - }, - ], - name: "handlePostRequests", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IIsmpHost", - name: "host", - type: "address", - }, - { - components: [ - { - components: [ - { - components: [ - { - internalType: "bytes", - name: "source", - type: "bytes", - }, - { - internalType: "bytes", - name: "dest", - type: "bytes", - }, - { - internalType: "uint64", - name: "nonce", - type: "uint64", - }, - { - internalType: "bytes", - name: "from", - type: "bytes", - }, - { - internalType: "bytes", - name: "to", - type: "bytes", - }, - { - internalType: "uint64", - name: "timeoutTimestamp", - type: "uint64", - }, - { - internalType: "bytes", - name: "body", - type: "bytes", - }, - ], - internalType: "struct PostRequest", - name: "request", - type: "tuple", - }, - { - internalType: "bytes", - name: "response", - type: "bytes", - }, - { - internalType: "uint64", - name: "timeoutTimestamp", - type: "uint64", - }, - ], - internalType: "struct PostResponse[]", - name: "timeouts", - type: "tuple[]", - }, - { - components: [ - { - internalType: "uint256", - name: "stateMachineId", - type: "uint256", - }, - { - internalType: "uint256", - name: "height", - type: "uint256", - }, - ], - internalType: "struct StateMachineHeight", - name: "height", - type: "tuple", - }, - { - internalType: "bytes[]", - name: "proof", - type: "bytes[]", - }, - ], - internalType: "struct PostResponseTimeoutMessage", - name: "message", - type: "tuple", - }, - ], - name: "handlePostResponseTimeouts", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "contract IIsmpHost", - name: "host", - type: "address", - }, - { - components: [ - { - components: [ - { - components: [ - { - internalType: "uint256", - name: "stateMachineId", - type: "uint256", - }, - { - internalType: "uint256", - name: "height", - type: "uint256", - }, - ], - internalType: "struct StateMachineHeight", - name: "height", - type: "tuple", - }, - { - internalType: "bytes32[]", - name: "multiproof", - type: "bytes32[]", - }, - { - internalType: "uint256", - name: "leafCount", - type: "uint256", - }, - ], - internalType: "struct Proof", - name: "proof", - type: "tuple", - }, - { - components: [ - { - components: [ - { - components: [ - { - internalType: "bytes", - name: "source", - type: "bytes", - }, - { - internalType: "bytes", - name: "dest", - type: "bytes", - }, - { - internalType: "uint64", - name: "nonce", - type: "uint64", - }, - { - internalType: "bytes", - name: "from", - type: "bytes", - }, - { - internalType: "bytes", - name: "to", - type: "bytes", - }, - { - internalType: "uint64", - name: "timeoutTimestamp", - type: "uint64", - }, - { - internalType: "bytes", - name: "body", - type: "bytes", - }, - ], - internalType: "struct PostRequest", - name: "request", - type: "tuple", - }, - { - internalType: "bytes", - name: "response", - type: "bytes", - }, - { - internalType: "uint64", - name: "timeoutTimestamp", - type: "uint64", - }, - ], - internalType: "struct PostResponse", - name: "response", - type: "tuple", - }, - { - internalType: "uint256", - name: "index", - type: "uint256", - }, - { - internalType: "uint256", - name: "kIndex", - type: "uint256", - }, - ], - internalType: "struct PostResponseLeaf[]", - name: "responses", - type: "tuple[]", - }, - ], - internalType: "struct PostResponseMessage", - name: "response", - type: "tuple", - }, - ], - name: "handlePostResponses", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, + { + inputs: [], + name: "ChallengePeriodNotElapsed", + type: "error", + }, + { + inputs: [], + name: "ConsensusClientExpired", + type: "error", + }, + { + inputs: [], + name: "DuplicateMessage", + type: "error", + }, + { + inputs: [], + name: "HostFrozen", + type: "error", + }, + { + inputs: [], + name: "InvalidMessageDestination", + type: "error", + }, + { + inputs: [], + name: "InvalidProof", + type: "error", + }, + { + inputs: [], + name: "MessageNotTimedOut", + type: "error", + }, + { + inputs: [], + name: "MessageTimedOut", + type: "error", + }, + { + inputs: [], + name: "StateCommitmentNotFound", + type: "error", + }, + { + inputs: [], + name: "UnknownMessage", + type: "error", + }, + { + inputs: [ + { + internalType: "contract IIsmpHost", + name: "host", + type: "address", + }, + { + internalType: "bytes", + name: "proof", + type: "bytes", + }, + ], + name: "handleConsensus", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IIsmpHost", + name: "host", + type: "address", + }, + { + components: [ + { + components: [ + { + internalType: "bytes", + name: "source", + type: "bytes", + }, + { + internalType: "bytes", + name: "dest", + type: "bytes", + }, + { + internalType: "uint64", + name: "nonce", + type: "uint64", + }, + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "uint64", + name: "timeoutTimestamp", + type: "uint64", + }, + { + internalType: "bytes[]", + name: "keys", + type: "bytes[]", + }, + { + internalType: "uint64", + name: "height", + type: "uint64", + }, + ], + internalType: "struct GetRequest[]", + name: "timeouts", + type: "tuple[]", + }, + { + components: [ + { + internalType: "uint256", + name: "stateMachineId", + type: "uint256", + }, + { + internalType: "uint256", + name: "height", + type: "uint256", + }, + ], + internalType: "struct StateMachineHeight", + name: "height", + type: "tuple", + }, + { + internalType: "bytes[]", + name: "proof", + type: "bytes[]", + }, + ], + internalType: "struct GetTimeoutMessage", + name: "message", + type: "tuple", + }, + ], + name: "handleGetRequestTimeouts", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IIsmpHost", + name: "host", + type: "address", + }, + { + components: [ + { + components: [ + { + components: [ + { + internalType: "uint256", + name: "stateMachineId", + type: "uint256", + }, + { + internalType: "uint256", + name: "height", + type: "uint256", + }, + ], + internalType: "struct StateMachineHeight", + name: "height", + type: "tuple", + }, + { + internalType: "bytes32[]", + name: "multiproof", + type: "bytes32[]", + }, + { + internalType: "uint256", + name: "leafCount", + type: "uint256", + }, + ], + internalType: "struct Proof", + name: "proof", + type: "tuple", + }, + { + components: [ + { + components: [ + { + components: [ + { + internalType: "bytes", + name: "source", + type: "bytes", + }, + { + internalType: "bytes", + name: "dest", + type: "bytes", + }, + { + internalType: "uint64", + name: "nonce", + type: "uint64", + }, + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "uint64", + name: "timeoutTimestamp", + type: "uint64", + }, + { + internalType: "bytes[]", + name: "keys", + type: "bytes[]", + }, + { + internalType: "uint64", + name: "height", + type: "uint64", + }, + ], + internalType: "struct GetRequest", + name: "request", + type: "tuple", + }, + { + components: [ + { + internalType: "bytes", + name: "key", + type: "bytes", + }, + { + internalType: "bytes", + name: "value", + type: "bytes", + }, + ], + internalType: "struct StorageValue[]", + name: "values", + type: "tuple[]", + }, + ], + internalType: "struct GetResponse", + name: "response", + type: "tuple", + }, + { + internalType: "uint256", + name: "index", + type: "uint256", + }, + { + internalType: "uint256", + name: "kIndex", + type: "uint256", + }, + ], + internalType: "struct GetResponseLeaf[]", + name: "responses", + type: "tuple[]", + }, + ], + internalType: "struct GetResponseMessage", + name: "message", + type: "tuple", + }, + ], + name: "handleGetResponses", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IIsmpHost", + name: "host", + type: "address", + }, + { + components: [ + { + components: [ + { + internalType: "bytes", + name: "source", + type: "bytes", + }, + { + internalType: "bytes", + name: "dest", + type: "bytes", + }, + { + internalType: "uint64", + name: "nonce", + type: "uint64", + }, + { + internalType: "bytes", + name: "from", + type: "bytes", + }, + { + internalType: "bytes", + name: "to", + type: "bytes", + }, + { + internalType: "uint64", + name: "timeoutTimestamp", + type: "uint64", + }, + { + internalType: "bytes", + name: "body", + type: "bytes", + }, + ], + internalType: "struct PostRequest[]", + name: "timeouts", + type: "tuple[]", + }, + { + components: [ + { + internalType: "uint256", + name: "stateMachineId", + type: "uint256", + }, + { + internalType: "uint256", + name: "height", + type: "uint256", + }, + ], + internalType: "struct StateMachineHeight", + name: "height", + type: "tuple", + }, + { + internalType: "bytes[]", + name: "proof", + type: "bytes[]", + }, + ], + internalType: "struct PostRequestTimeoutMessage", + name: "message", + type: "tuple", + }, + ], + name: "handlePostRequestTimeouts", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IIsmpHost", + name: "host", + type: "address", + }, + { + components: [ + { + components: [ + { + components: [ + { + internalType: "uint256", + name: "stateMachineId", + type: "uint256", + }, + { + internalType: "uint256", + name: "height", + type: "uint256", + }, + ], + internalType: "struct StateMachineHeight", + name: "height", + type: "tuple", + }, + { + internalType: "bytes32[]", + name: "multiproof", + type: "bytes32[]", + }, + { + internalType: "uint256", + name: "leafCount", + type: "uint256", + }, + ], + internalType: "struct Proof", + name: "proof", + type: "tuple", + }, + { + components: [ + { + components: [ + { + internalType: "bytes", + name: "source", + type: "bytes", + }, + { + internalType: "bytes", + name: "dest", + type: "bytes", + }, + { + internalType: "uint64", + name: "nonce", + type: "uint64", + }, + { + internalType: "bytes", + name: "from", + type: "bytes", + }, + { + internalType: "bytes", + name: "to", + type: "bytes", + }, + { + internalType: "uint64", + name: "timeoutTimestamp", + type: "uint64", + }, + { + internalType: "bytes", + name: "body", + type: "bytes", + }, + ], + internalType: "struct PostRequest", + name: "request", + type: "tuple", + }, + { + internalType: "uint256", + name: "index", + type: "uint256", + }, + { + internalType: "uint256", + name: "kIndex", + type: "uint256", + }, + ], + internalType: "struct PostRequestLeaf[]", + name: "requests", + type: "tuple[]", + }, + ], + internalType: "struct PostRequestMessage", + name: "request", + type: "tuple", + }, + ], + name: "handlePostRequests", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IIsmpHost", + name: "host", + type: "address", + }, + { + components: [ + { + components: [ + { + components: [ + { + internalType: "bytes", + name: "source", + type: "bytes", + }, + { + internalType: "bytes", + name: "dest", + type: "bytes", + }, + { + internalType: "uint64", + name: "nonce", + type: "uint64", + }, + { + internalType: "bytes", + name: "from", + type: "bytes", + }, + { + internalType: "bytes", + name: "to", + type: "bytes", + }, + { + internalType: "uint64", + name: "timeoutTimestamp", + type: "uint64", + }, + { + internalType: "bytes", + name: "body", + type: "bytes", + }, + ], + internalType: "struct PostRequest", + name: "request", + type: "tuple", + }, + { + internalType: "bytes", + name: "response", + type: "bytes", + }, + { + internalType: "uint64", + name: "timeoutTimestamp", + type: "uint64", + }, + ], + internalType: "struct PostResponse[]", + name: "timeouts", + type: "tuple[]", + }, + { + components: [ + { + internalType: "uint256", + name: "stateMachineId", + type: "uint256", + }, + { + internalType: "uint256", + name: "height", + type: "uint256", + }, + ], + internalType: "struct StateMachineHeight", + name: "height", + type: "tuple", + }, + { + internalType: "bytes[]", + name: "proof", + type: "bytes[]", + }, + ], + internalType: "struct PostResponseTimeoutMessage", + name: "message", + type: "tuple", + }, + ], + name: "handlePostResponseTimeouts", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IIsmpHost", + name: "host", + type: "address", + }, + { + components: [ + { + components: [ + { + components: [ + { + internalType: "uint256", + name: "stateMachineId", + type: "uint256", + }, + { + internalType: "uint256", + name: "height", + type: "uint256", + }, + ], + internalType: "struct StateMachineHeight", + name: "height", + type: "tuple", + }, + { + internalType: "bytes32[]", + name: "multiproof", + type: "bytes32[]", + }, + { + internalType: "uint256", + name: "leafCount", + type: "uint256", + }, + ], + internalType: "struct Proof", + name: "proof", + type: "tuple", + }, + { + components: [ + { + components: [ + { + components: [ + { + internalType: "bytes", + name: "source", + type: "bytes", + }, + { + internalType: "bytes", + name: "dest", + type: "bytes", + }, + { + internalType: "uint64", + name: "nonce", + type: "uint64", + }, + { + internalType: "bytes", + name: "from", + type: "bytes", + }, + { + internalType: "bytes", + name: "to", + type: "bytes", + }, + { + internalType: "uint64", + name: "timeoutTimestamp", + type: "uint64", + }, + { + internalType: "bytes", + name: "body", + type: "bytes", + }, + ], + internalType: "struct PostRequest", + name: "request", + type: "tuple", + }, + { + internalType: "bytes", + name: "response", + type: "bytes", + }, + { + internalType: "uint64", + name: "timeoutTimestamp", + type: "uint64", + }, + ], + internalType: "struct PostResponse", + name: "response", + type: "tuple", + }, + { + internalType: "uint256", + name: "index", + type: "uint256", + }, + { + internalType: "uint256", + name: "kIndex", + type: "uint256", + }, + ], + internalType: "struct PostResponseLeaf[]", + name: "responses", + type: "tuple[]", + }, + ], + internalType: "struct PostResponseMessage", + name: "response", + type: "tuple", + }, + ], + name: "handlePostResponses", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, ] as const; export default { ABI }; diff --git a/abis/pingModule.ts b/abis/pingModule.ts index 885e3d8..b24ee46 100644 --- a/abis/pingModule.ts +++ b/abis/pingModule.ts @@ -1,782 +1,744 @@ const ABI = [ - { - inputs: [ - { - internalType: "address", - name: "admin", - type: "address", - }, - ], - stateMutability: "nonpayable", - type: "constructor", - }, - { - inputs: [], - name: "ExecutionFailed", - type: "error", - }, - { - inputs: [], - name: "NotIsmpHost", - type: "error", - }, - { - anonymous: false, - inputs: [], - name: "GetResponseReceived", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "GetTimeoutReceived", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "MessageDispatched", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "string", - name: "message", - type: "string", - }, - ], - name: "PostReceived", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "PostRequestTimeoutReceived", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "PostResponseReceived", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "PostResponseTimeoutReceived", - type: "event", - }, - { - inputs: [ - { - components: [ - { - internalType: "bytes", - name: "source", - type: "bytes", - }, - { - internalType: "bytes", - name: "dest", - type: "bytes", - }, - { - internalType: "uint64", - name: "nonce", - type: "uint64", - }, - { - internalType: "bytes", - name: "from", - type: "bytes", - }, - { - internalType: "bytes", - name: "to", - type: "bytes", - }, - { - internalType: "uint64", - name: "timeoutTimestamp", - type: "uint64", - }, - { - internalType: "bytes", - name: "body", - type: "bytes", - }, - ], - internalType: "struct PostRequest", - name: "request", - type: "tuple", - }, - ], - name: "dispatch", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "bytes", - name: "source", - type: "bytes", - }, - { - internalType: "bytes", - name: "dest", - type: "bytes", - }, - { - internalType: "uint64", - name: "nonce", - type: "uint64", - }, - { - internalType: "bytes", - name: "from", - type: "bytes", - }, - { - internalType: "uint64", - name: "timeoutTimestamp", - type: "uint64", - }, - { - internalType: "bytes[]", - name: "keys", - type: "bytes[]", - }, - { - internalType: "uint64", - name: "height", - type: "uint64", - }, - ], - internalType: "struct GetRequest", - name: "request", - type: "tuple", - }, - ], - name: "dispatch", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - components: [ - { - internalType: "bytes", - name: "source", - type: "bytes", - }, - { - internalType: "bytes", - name: "dest", - type: "bytes", - }, - { - internalType: "uint64", - name: "nonce", - type: "uint64", - }, - { - internalType: "bytes", - name: "from", - type: "bytes", - }, - { - internalType: "bytes", - name: "to", - type: "bytes", - }, - { - internalType: "uint64", - name: "timeoutTimestamp", - type: "uint64", - }, - { - internalType: "bytes", - name: "body", - type: "bytes", - }, - ], - internalType: "struct PostRequest", - name: "request", - type: "tuple", - }, - { - internalType: "bytes", - name: "response", - type: "bytes", - }, - { - internalType: "uint64", - name: "timeoutTimestamp", - type: "uint64", - }, - ], - internalType: "struct PostResponse", - name: "response", - type: "tuple", - }, - ], - name: "dispatchPostResponse", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "_paraId", - type: "uint256", - }, - ], - name: "dispatchToParachain", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "host", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - components: [ - { - components: [ - { - internalType: "bytes", - name: "source", - type: "bytes", - }, - { - internalType: "bytes", - name: "dest", - type: "bytes", - }, - { - internalType: "uint64", - name: "nonce", - type: "uint64", - }, - { - internalType: "bytes", - name: "from", - type: "bytes", - }, - { - internalType: "bytes", - name: "to", - type: "bytes", - }, - { - internalType: "uint64", - name: "timeoutTimestamp", - type: "uint64", - }, - { - internalType: "bytes", - name: "body", - type: "bytes", - }, - ], - internalType: "struct PostRequest", - name: "request", - type: "tuple", - }, - { - internalType: "address", - name: "relayer", - type: "address", - }, - ], - internalType: "struct IncomingPostRequest", - name: "incoming", - type: "tuple", - }, - ], - name: "onAccept", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - components: [ - { - components: [ - { - internalType: "bytes", - name: "source", - type: "bytes", - }, - { - internalType: "bytes", - name: "dest", - type: "bytes", - }, - { - internalType: "uint64", - name: "nonce", - type: "uint64", - }, - { - internalType: "bytes", - name: "from", - type: "bytes", - }, - { - internalType: "uint64", - name: "timeoutTimestamp", - type: "uint64", - }, - { - internalType: "bytes[]", - name: "keys", - type: "bytes[]", - }, - { - internalType: "uint64", - name: "height", - type: "uint64", - }, - ], - internalType: "struct GetRequest", - name: "request", - type: "tuple", - }, - { - components: [ - { - internalType: "bytes", - name: "key", - type: "bytes", - }, - { - internalType: "bytes", - name: "value", - type: "bytes", - }, - ], - internalType: "struct StorageValue[]", - name: "values", - type: "tuple[]", - }, - ], - internalType: "struct GetResponse", - name: "response", - type: "tuple", - }, - { - internalType: "address", - name: "relayer", - type: "address", - }, - ], - internalType: "struct IncomingGetResponse", - name: "", - type: "tuple", - }, - ], - name: "onGetResponse", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "bytes", - name: "source", - type: "bytes", - }, - { - internalType: "bytes", - name: "dest", - type: "bytes", - }, - { - internalType: "uint64", - name: "nonce", - type: "uint64", - }, - { - internalType: "bytes", - name: "from", - type: "bytes", - }, - { - internalType: "uint64", - name: "timeoutTimestamp", - type: "uint64", - }, - { - internalType: "bytes[]", - name: "keys", - type: "bytes[]", - }, - { - internalType: "uint64", - name: "height", - type: "uint64", - }, - ], - internalType: "struct GetRequest", - name: "", - type: "tuple", - }, - ], - name: "onGetTimeout", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "bytes", - name: "source", - type: "bytes", - }, - { - internalType: "bytes", - name: "dest", - type: "bytes", - }, - { - internalType: "uint64", - name: "nonce", - type: "uint64", - }, - { - internalType: "bytes", - name: "from", - type: "bytes", - }, - { - internalType: "bytes", - name: "to", - type: "bytes", - }, - { - internalType: "uint64", - name: "timeoutTimestamp", - type: "uint64", - }, - { - internalType: "bytes", - name: "body", - type: "bytes", - }, - ], - internalType: "struct PostRequest", - name: "", - type: "tuple", - }, - ], - name: "onPostRequestTimeout", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - components: [ - { - components: [ - { - internalType: "bytes", - name: "source", - type: "bytes", - }, - { - internalType: "bytes", - name: "dest", - type: "bytes", - }, - { - internalType: "uint64", - name: "nonce", - type: "uint64", - }, - { - internalType: "bytes", - name: "from", - type: "bytes", - }, - { - internalType: "bytes", - name: "to", - type: "bytes", - }, - { - internalType: "uint64", - name: "timeoutTimestamp", - type: "uint64", - }, - { - internalType: "bytes", - name: "body", - type: "bytes", - }, - ], - internalType: "struct PostRequest", - name: "request", - type: "tuple", - }, - { - internalType: "bytes", - name: "response", - type: "bytes", - }, - { - internalType: "uint64", - name: "timeoutTimestamp", - type: "uint64", - }, - ], - internalType: "struct PostResponse", - name: "response", - type: "tuple", - }, - { - internalType: "address", - name: "relayer", - type: "address", - }, - ], - internalType: "struct IncomingPostResponse", - name: "", - type: "tuple", - }, - ], - name: "onPostResponse", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - components: [ - { - internalType: "bytes", - name: "source", - type: "bytes", - }, - { - internalType: "bytes", - name: "dest", - type: "bytes", - }, - { - internalType: "uint64", - name: "nonce", - type: "uint64", - }, - { - internalType: "bytes", - name: "from", - type: "bytes", - }, - { - internalType: "bytes", - name: "to", - type: "bytes", - }, - { - internalType: "uint64", - name: "timeoutTimestamp", - type: "uint64", - }, - { - internalType: "bytes", - name: "body", - type: "bytes", - }, - ], - internalType: "struct PostRequest", - name: "request", - type: "tuple", - }, - { - internalType: "bytes", - name: "response", - type: "bytes", - }, - { - internalType: "uint64", - name: "timeoutTimestamp", - type: "uint64", - }, - ], - internalType: "struct PostResponse", - name: "", - type: "tuple", - }, - ], - name: "onPostResponseTimeout", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "bytes", - name: "dest", - type: "bytes", - }, - { - internalType: "address", - name: "module", - type: "address", - }, - { - internalType: "uint64", - name: "timeout", - type: "uint64", - }, - { - internalType: "uint256", - name: "count", - type: "uint256", - }, - { - internalType: "uint256", - name: "fee", - type: "uint256", - }, - ], - internalType: "struct PingMessage", - name: "pingMessage", - type: "tuple", - }, - ], - name: "ping", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "previousPostRequest", - outputs: [ - { - components: [ - { - internalType: "bytes", - name: "source", - type: "bytes", - }, - { - internalType: "bytes", - name: "dest", - type: "bytes", - }, - { - internalType: "uint64", - name: "nonce", - type: "uint64", - }, - { - internalType: "bytes", - name: "from", - type: "bytes", - }, - { - internalType: "bytes", - name: "to", - type: "bytes", - }, - { - internalType: "uint64", - name: "timeoutTimestamp", - type: "uint64", - }, - { - internalType: "bytes", - name: "body", - type: "bytes", - }, - ], - internalType: "struct PostRequest", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "hostAddr", - type: "address", - }, - ], - name: "setIsmpHost", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, + { + inputs: [ + { + internalType: "address", + name: "admin", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "ExecutionFailed", + type: "error", + }, + { + inputs: [], + name: "NotIsmpHost", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + components: [ + { + internalType: "bytes", + name: "key", + type: "bytes", + }, + { + internalType: "bytes", + name: "value", + type: "bytes", + }, + ], + internalType: "struct StorageValue[]", + name: "message", + type: "tuple[]", + }, + ], + name: "GetResponseReceived", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "GetTimeoutReceived", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "MessageDispatched", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "string", + name: "message", + type: "string", + }, + ], + name: "PostReceived", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "PostRequestTimeoutReceived", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "PostResponseReceived", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "PostResponseTimeoutReceived", + type: "event", + }, + { + inputs: [ + { + components: [ + { + internalType: "bytes", + name: "source", + type: "bytes", + }, + { + internalType: "bytes", + name: "dest", + type: "bytes", + }, + { + internalType: "uint64", + name: "nonce", + type: "uint64", + }, + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "uint64", + name: "timeoutTimestamp", + type: "uint64", + }, + { + internalType: "bytes[]", + name: "keys", + type: "bytes[]", + }, + { + internalType: "uint64", + name: "height", + type: "uint64", + }, + ], + internalType: "struct GetRequest", + name: "request", + type: "tuple", + }, + ], + name: "dispatch", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + components: [ + { + internalType: "bytes", + name: "source", + type: "bytes", + }, + { + internalType: "bytes", + name: "dest", + type: "bytes", + }, + { + internalType: "uint64", + name: "nonce", + type: "uint64", + }, + { + internalType: "bytes", + name: "from", + type: "bytes", + }, + { + internalType: "bytes", + name: "to", + type: "bytes", + }, + { + internalType: "uint64", + name: "timeoutTimestamp", + type: "uint64", + }, + { + internalType: "bytes", + name: "body", + type: "bytes", + }, + ], + internalType: "struct PostRequest", + name: "request", + type: "tuple", + }, + { + internalType: "bytes", + name: "response", + type: "bytes", + }, + { + internalType: "uint64", + name: "timeoutTimestamp", + type: "uint64", + }, + ], + internalType: "struct PostResponse", + name: "response", + type: "tuple", + }, + ], + name: "dispatchPostResponse", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_paraId", + type: "uint256", + }, + ], + name: "dispatchToParachain", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "host", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + components: [ + { + internalType: "bytes", + name: "source", + type: "bytes", + }, + { + internalType: "bytes", + name: "dest", + type: "bytes", + }, + { + internalType: "uint64", + name: "nonce", + type: "uint64", + }, + { + internalType: "bytes", + name: "from", + type: "bytes", + }, + { + internalType: "bytes", + name: "to", + type: "bytes", + }, + { + internalType: "uint64", + name: "timeoutTimestamp", + type: "uint64", + }, + { + internalType: "bytes", + name: "body", + type: "bytes", + }, + ], + internalType: "struct PostRequest", + name: "request", + type: "tuple", + }, + { + internalType: "address", + name: "relayer", + type: "address", + }, + ], + internalType: "struct IncomingPostRequest", + name: "incoming", + type: "tuple", + }, + ], + name: "onAccept", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + components: [ + { + components: [ + { + internalType: "bytes", + name: "source", + type: "bytes", + }, + { + internalType: "bytes", + name: "dest", + type: "bytes", + }, + { + internalType: "uint64", + name: "nonce", + type: "uint64", + }, + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "uint64", + name: "timeoutTimestamp", + type: "uint64", + }, + { + internalType: "bytes[]", + name: "keys", + type: "bytes[]", + }, + { + internalType: "uint64", + name: "height", + type: "uint64", + }, + ], + internalType: "struct GetRequest", + name: "request", + type: "tuple", + }, + { + components: [ + { + internalType: "bytes", + name: "key", + type: "bytes", + }, + { + internalType: "bytes", + name: "value", + type: "bytes", + }, + ], + internalType: "struct StorageValue[]", + name: "values", + type: "tuple[]", + }, + ], + internalType: "struct GetResponse", + name: "response", + type: "tuple", + }, + { + internalType: "address", + name: "relayer", + type: "address", + }, + ], + internalType: "struct IncomingGetResponse", + name: "", + type: "tuple", + }, + ], + name: "onGetResponse", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "bytes", + name: "source", + type: "bytes", + }, + { + internalType: "bytes", + name: "dest", + type: "bytes", + }, + { + internalType: "uint64", + name: "nonce", + type: "uint64", + }, + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "uint64", + name: "timeoutTimestamp", + type: "uint64", + }, + { + internalType: "bytes[]", + name: "keys", + type: "bytes[]", + }, + { + internalType: "uint64", + name: "height", + type: "uint64", + }, + ], + internalType: "struct GetRequest", + name: "", + type: "tuple", + }, + ], + name: "onGetTimeout", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "bytes", + name: "source", + type: "bytes", + }, + { + internalType: "bytes", + name: "dest", + type: "bytes", + }, + { + internalType: "uint64", + name: "nonce", + type: "uint64", + }, + { + internalType: "bytes", + name: "from", + type: "bytes", + }, + { + internalType: "bytes", + name: "to", + type: "bytes", + }, + { + internalType: "uint64", + name: "timeoutTimestamp", + type: "uint64", + }, + { + internalType: "bytes", + name: "body", + type: "bytes", + }, + ], + internalType: "struct PostRequest", + name: "", + type: "tuple", + }, + ], + name: "onPostRequestTimeout", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + components: [ + { + components: [ + { + internalType: "bytes", + name: "source", + type: "bytes", + }, + { + internalType: "bytes", + name: "dest", + type: "bytes", + }, + { + internalType: "uint64", + name: "nonce", + type: "uint64", + }, + { + internalType: "bytes", + name: "from", + type: "bytes", + }, + { + internalType: "bytes", + name: "to", + type: "bytes", + }, + { + internalType: "uint64", + name: "timeoutTimestamp", + type: "uint64", + }, + { + internalType: "bytes", + name: "body", + type: "bytes", + }, + ], + internalType: "struct PostRequest", + name: "request", + type: "tuple", + }, + { + internalType: "bytes", + name: "response", + type: "bytes", + }, + { + internalType: "uint64", + name: "timeoutTimestamp", + type: "uint64", + }, + ], + internalType: "struct PostResponse", + name: "response", + type: "tuple", + }, + { + internalType: "address", + name: "relayer", + type: "address", + }, + ], + internalType: "struct IncomingPostResponse", + name: "", + type: "tuple", + }, + ], + name: "onPostResponse", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + components: [ + { + internalType: "bytes", + name: "source", + type: "bytes", + }, + { + internalType: "bytes", + name: "dest", + type: "bytes", + }, + { + internalType: "uint64", + name: "nonce", + type: "uint64", + }, + { + internalType: "bytes", + name: "from", + type: "bytes", + }, + { + internalType: "bytes", + name: "to", + type: "bytes", + }, + { + internalType: "uint64", + name: "timeoutTimestamp", + type: "uint64", + }, + { + internalType: "bytes", + name: "body", + type: "bytes", + }, + ], + internalType: "struct PostRequest", + name: "request", + type: "tuple", + }, + { + internalType: "bytes", + name: "response", + type: "bytes", + }, + { + internalType: "uint64", + name: "timeoutTimestamp", + type: "uint64", + }, + ], + internalType: "struct PostResponse", + name: "", + type: "tuple", + }, + ], + name: "onPostResponseTimeout", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "bytes", + name: "dest", + type: "bytes", + }, + { + internalType: "address", + name: "module", + type: "address", + }, + { + internalType: "uint64", + name: "timeout", + type: "uint64", + }, + { + internalType: "uint256", + name: "count", + type: "uint256", + }, + { + internalType: "uint256", + name: "fee", + type: "uint256", + }, + ], + internalType: "struct PingMessage", + name: "pingMessage", + type: "tuple", + }, + ], + name: "ping", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "previousPostRequest", + outputs: [ + { + components: [ + { + internalType: "bytes", + name: "source", + type: "bytes", + }, + { + internalType: "bytes", + name: "dest", + type: "bytes", + }, + { + internalType: "uint64", + name: "nonce", + type: "uint64", + }, + { + internalType: "bytes", + name: "from", + type: "bytes", + }, + { + internalType: "bytes", + name: "to", + type: "bytes", + }, + { + internalType: "uint64", + name: "timeoutTimestamp", + type: "uint64", + }, + { + internalType: "bytes", + name: "body", + type: "bytes", + }, + ], + internalType: "struct PostRequest", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "hostAddr", + type: "address", + }, + ], + name: "setIsmpHost", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, ] as const; export default { ABI }; diff --git a/index.ts b/index.ts index c03eb7f..d5870c5 100644 --- a/index.ts +++ b/index.ts @@ -12,54 +12,64 @@ import { http, parseAbi, parseEventLogs, - toHex, } from "viem"; import { privateKeyToAccount } from "viem/accounts"; import { bscTestnet, optimismSepolia } from "viem/chains"; +import { ApiPromise, WsProvider } from "@polkadot/api"; +import { Account } from "@ethereumjs/util"; import ERC6160 from "./abis/erc6160"; import PING_MODULE from "./abis/pingModule"; import EVM_HOST from "./abis/evmHost"; import HANDLER from "./abis/handler"; +const PING_MODULE_ADDRESS = "0x1aD48ADeD62e7C685dF4fb75e6d14d34C8B83081"; + /* Using a viem client, dispatches an onchain transaction to the ping module. The ping module contract, dispatches an ISMP request to Hyperbridge. Then tracks the resulting ISMP request using Hyperclient. */ -async function sendCrossChainMessage() { +async function testPostAndGetRequest() { + const { + bscTestnetClient, + bscFeeToken, + BSC, + OP, + account, + tokenFaucet, + opSepoliaHandler, + bscHandler, + bscPing, + opSepoliaClient, + opSepoliaIsmpHost, + } = await setUp(); const blockNumber = await bscTestnetClient.getBlockNumber(); console.log("Latest block number: ", blockNumber); - let balance = await feeToken.read.balanceOf([account.address as any]); + let balance = await bscFeeToken.read.balanceOf([account.address as any]); console.log("FeeToken balance: $", formatEther(balance)); // Get fee tokens from faucet if (balance === BigInt(0)) { - const hash = await tokenFaucet.write.drip([feeToken.address]); + const hash = await tokenFaucet.write.drip([bscFeeToken.address]); await bscTestnetClient.waitForTransactionReceipt({ hash, confirmations: 1, }); - balance = await feeToken.read.balanceOf([account.address as any]); + balance = await bscFeeToken.read.balanceOf([account.address as any]); console.log("New FeeToken balance: $", formatEther(balance)); } - const allowance = await feeToken.read.allowance([ - account.address!, - PING_MODULE_ADDRESS, - ]); + const allowance = await bscFeeToken.read.allowance([account.address!, PING_MODULE_ADDRESS]); if (allowance === BigInt(0)) { console.log("Setting allowance .. "); // set allowance to type(uint256).max - const hash = await feeToken.write.approve([ + const hash = await bscFeeToken.write.approve([ PING_MODULE_ADDRESS, - fromHex( - "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", - "bigint", - ), + fromHex("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", "bigint"), ]); await bscTestnetClient.waitForTransactionReceipt({ hash, @@ -67,9 +77,141 @@ async function sendCrossChainMessage() { }); } - const hash = await ping.write.ping([ + console.log("Setting up hyperclient"); + + const HyperbridgeConfig = { + rpc_url: "ws://127.0.0.1:9001", + // rpc_url: "wss://hyperbridge-paseo-rpc.blockops.network", + }; + + const hyperclient = await HyperClient.init({ + source: BSC, + dest: OP, + hyperbridge: HyperbridgeConfig, + indexer: "", + }); + + // send GetRequest + console.log("\n\nSending Get Request\n\n"); + + const wsProvider = new WsProvider(HyperbridgeConfig.rpc_url); + const api = await ApiPromise.create({ provider: wsProvider }); + const height = ( + await api.query.ismp.latestStateMachineHeight({ + stateId: { + Evm: 11155420, + }, + consensusStateId: "ETH0", + }) + ).toJSON() as number; + + const txHash = await bscPing.write.dispatch([ + { + source: "0x", + dest: OP.state_machine, + nonce: 0n, + from: account.address, + keys: [account.address], + height: BigInt(height), // latest height + timeoutTimestamp: 0n, + }, + ]); + + const txReceipt = await bscTestnetClient.waitForTransactionReceipt({ + hash: txHash, + confirmations: 1, + }); + + console.log(`Transaction reciept: ${bscTestnet.blockExplorers.default.url}/tx/${txHash}`); + console.log("Block: ", txReceipt.blockNumber); + + // parse EvmHost PostRequestEvent emitted in the transcation logs + const txEvent = parseEventLogs({ abi: EVM_HOST.ABI, logs: txReceipt.logs })[0]; + + if (txEvent.eventName !== "GetRequestEvent") { + throw new Error("Unexpected Event type"); + } + + const txRequest = txEvent.args; + + console.log({ txRequest }); + + const getRequest = { + ...txRequest, + txHeight: txReceipt.blockNumber, + }; + + const statusStream = await hyperclient.get_request_status_stream(getRequest as any); + + for await (const item of statusStream) { + let status: MessageStatusWithMeta; + if (item instanceof Map) { + status = Object.fromEntries((item as any).entries()) as MessageStatusWithMeta; + } else { + status = item; + } + + console.log({ status }); + + switch (status.kind) { + case "SourceFinalized": { + console.log( + `Status ${status.kind}, Transaction: https://gargantua.statescan.io/#/extrinsics/${status.transaction_hash}`, + ); + break; + } + case "HyperbridgeDelivered": { + console.log( + `Status ${status.kind}, Transaction: https://gargantua.statescan.io/#/extrinsics/${status.transaction_hash}`, + ); + break; + } + case "HyperbridgeFinalized": { + console.log( + `Status ${status.kind}, Transaction: ${bscTestnet.blockExplorers.default.url}/tx/${status.transaction_hash}`, + ); + const { args, functionName } = decodeFunctionData({ + abi: HANDLER.ABI, + data: status.calldata, + }); + + try { + const hash = await bscHandler.write.handleGetResponses(args as any); + const getResponseReceipt = await bscTestnetClient.waitForTransactionReceipt({ + hash, + confirmations: 1, + }); + + console.log(`Transaction submitted: ${bscTestnet.blockExplorers.default.url}/tx/${hash}`); + + const event = parseEventLogs({ abi: PING_MODULE.ABI, logs: getResponseReceipt.logs })[0]; + + if (event.eventName === "GetResponseReceived") { + // we requested the raw account in the world state, here we decode the response + const { key, value } = event.args.message[0]; + console.log({ + address: key, + account: Account.fromRlpSerializedAccount(value as any), + }); + } + } catch (e) { + console.error("Error self-relaying: ", e); + } + } + case "DestinationDelivered": { + console.log( + `Status ${status.kind}, Transaction: ${bscTestnet.blockExplorers.default.url}/tx/${status.transaction_hash}`, + ); + return process.exit(0); + } + } + } + + console.log("\n\nSending Post Request\n\n"); + + const hash = await bscPing.write.ping([ { - dest: toHex("OPTI"), + dest: await opSepoliaIsmpHost.read.host(), count: BigInt(1), fee: BigInt(0), module: PING_MODULE_ADDRESS, @@ -82,9 +224,7 @@ async function sendCrossChainMessage() { confirmations: 1, }); - console.log( - `Transaction reciept: ${bscTestnet.blockExplorers.default.url}/tx/${hash}`, - ); + console.log(`Transaction reciept: ${bscTestnet.blockExplorers.default.url}/tx/${hash}`); console.log("Block: ", receipt.blockNumber); // parse EvmHost PostRequestEvent emitted in the transcation logs @@ -98,38 +238,24 @@ async function sendCrossChainMessage() { console.log({ request }); - console.log("Setting up hyperclient"); - - const hyperclient = await HyperClient.init({ - source: { - ...BSC, - rpc_url: process.env.BSC_URL!, - }, - dest: { - ...OP, - rpc_url: process.env.OP_URL!, - }, - hyperbridge: { - rpc_url: "wss://hyperbridge-paseo-rpc.blockops.network", - }, - indexer: "", - }); - const postRequest = { ...request, - height: receipt.blockNumber, + txHeight: receipt.blockNumber, }; - const status = await hyperclient.query_request_status(postRequest); + const status = await hyperclient.query_post_request_status(postRequest); console.log("Request status: ", status); - const stream = await hyperclient.request_status_stream(postRequest); + const stream = await hyperclient.post_request_status_stream(postRequest); for await (const item of stream) { - const status = Object.fromEntries( - (item as any).entries(), - ) as MessageStatusWithMeta; + let status: MessageStatusWithMeta; + if (item instanceof Map) { + status = Object.fromEntries((item as any).entries()) as MessageStatusWithMeta; + } else { + status = item; + } console.log({ status }); @@ -156,17 +282,13 @@ async function sendCrossChainMessage() { }); try { - const hash = await opSepoliaHandler.write.handlePostRequests( - args as any, - ); + const hash = await opSepoliaHandler.write.handlePostRequests(args as any); await opSepoliaClient.waitForTransactionReceipt({ hash, confirmations: 1, }); - console.log( - `Transaction submitted: https://sepolia-optimism.etherscan.io/tx/${hash}`, - ); + console.log(`Transaction submitted: https://sepolia-optimism.etherscan.io/tx/${hash}`); } catch (e) { console.error("Error self-relaying: ", e); } @@ -183,68 +305,116 @@ async function sendCrossChainMessage() { } } +async function setUp() { + const account = privateKeyToAccount(process.env.PRIVATE_KEY as any); + + const bscWalletClient = createWalletClient({ + chain: bscTestnet, + account, + transport: http(), + }); + + const opWalletClient = createWalletClient({ + chain: optimismSepolia, + account, + transport: http(), + }); + + const bscTestnetClient = createPublicClient({ + chain: bscTestnet, + transport: http(), + }); + + const opSepoliaClient = createPublicClient({ + chain: optimismSepolia, + transport: http(), + }); + + const bscPing = getContract({ + address: PING_MODULE_ADDRESS, + abi: PING_MODULE.ABI, + client: { public: bscTestnetClient, wallet: bscWalletClient }, + }); + + const bscIsmpHostAddress = await bscPing.read.host(); + + const bscIsmpHost = getContract({ + address: bscIsmpHostAddress, + abi: EVM_HOST.ABI, + client: bscTestnetClient, + }); + + const bscHostParams = await bscIsmpHost.read.hostParams(); + + const bscHandler = getContract({ + address: bscHostParams.handler, + abi: HANDLER.ABI, + client: { public: bscTestnetClient, wallet: bscWalletClient }, + }); + + const bscFeeToken = getContract({ + address: bscHostParams.feeToken, + abi: ERC6160.ABI, + client: { public: bscTestnetClient, wallet: bscWalletClient }, + }); + + const opSepoliaPing = getContract({ + address: PING_MODULE_ADDRESS, + abi: PING_MODULE.ABI, + client: opSepoliaClient, + }); + + const opSepoliaIsmpHostAddress = await opSepoliaPing.read.host(); + + const opSepoliaIsmpHost = getContract({ + address: opSepoliaIsmpHostAddress, + abi: EVM_HOST.ABI, + client: opSepoliaClient, + }); + + const opSepoliaHostParams = await opSepoliaIsmpHost.read.hostParams(); + + const opSepoliaHandler = getContract({ + address: opSepoliaHostParams.handler, + abi: HANDLER.ABI, + client: { public: opSepoliaClient, wallet: opWalletClient }, + }); + + const tokenFaucet = getContract({ + address: "0x50A60531EF45a62711A812C081CC2C17ac683def", + abi: parseAbi(["function drip(address token) public"]), + client: { public: bscTestnetClient, wallet: bscWalletClient }, + }); + + const BSC = { + rpc_url: process.env.BSC_URL!, + consensus_state_id: "BSC0", + host_address: bscIsmpHostAddress, + state_machine: await bscIsmpHost.read.host(), + }; + + const OP = { + rpc_url: process.env.OP_URL!, + consensus_state_id: "ETH0", + host_address: opSepoliaIsmpHostAddress, + state_machine: await opSepoliaIsmpHost.read.host(), + }; + + return { + bscTestnetClient, + bscFeeToken, + account, + tokenFaucet, + BSC, + OP, + opSepoliaHandler, + bscHandler, + bscPing, + opSepoliaClient, + opSepoliaIsmpHost, + }; +} + config(); -const PING_MODULE_ADDRESS = "0x76Af4528383200CD7456E3Db967Bec309FAc583a"; - -const account = privateKeyToAccount(process.env.PRIVATE_KEY as any); - -const bscWalletClient = createWalletClient({ - chain: bscTestnet, - account, - transport: http(), -}); - -const opWalletClient = createWalletClient({ - chain: optimismSepolia, - account, - transport: http(), -}); - -const bscTestnetClient = createPublicClient({ - chain: bscTestnet, - transport: http(), -}); - -const opSepoliaClient = createPublicClient({ - chain: optimismSepolia, - transport: http(), -}); - -const feeToken = getContract({ - address: "0xC72747C906C6f02333B2f6a74cF412C9dF46bAAa", - abi: ERC6160.ABI, - client: { public: bscTestnetClient, wallet: bscWalletClient }, -}); - -const opSepoliaHandler = getContract({ - address: "0x269fCD56Fe8A0399782213001dC4aA99c50286A0", - abi: HANDLER.ABI, - client: { public: opSepoliaClient, wallet: opWalletClient }, -}); - -const tokenFaucet = getContract({ - address: "0x50A60531EF45a62711A812C081CC2C17ac683def", - abi: parseAbi(["function drip(address token) public"]), - client: { public: bscTestnetClient, wallet: bscWalletClient }, -}); - -const ping = getContract({ - address: PING_MODULE_ADDRESS, - abi: PING_MODULE.ABI, - client: { public: bscTestnetClient, wallet: bscWalletClient }, -}); - -const BSC = { - consensus_state_id: "BSC0", - host_address: "0x4e456CE71aD3AfB8a55adeE5119127c2d892E2D0", - state_machine: "BSC", -}; - -const OP = { - consensus_state_id: "ETH0", - host_address: "0x821c5D97213Aaf914174440a53bB4403BF42f27b", - state_machine: "OPTI", -}; - -sendCrossChainMessage(); +testPostAndGetRequest(); diff --git a/package.json b/package.json index a3aa315..ab35a2c 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,9 @@ "start": "npx tsc && node index.js" }, "dependencies": { - "@polytope-labs/hyperclient": "^0.3.35", + "@ethereumjs/util": "^9.1.0", + "@polkadot/api": "^12.3.1", + "@polytope-labs/hyperclient": "^0.4.3", "dotenv": "^16.4.5", "log-timestamp": "^0.3.0", "prettify": "^0.1.7", diff --git a/tsconfig.json b/tsconfig.json index 56cf1e1..f517e99 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,111 +1,111 @@ { - "compilerOptions": { - /* Visit https://aka.ms/tsconfig to read more about this file */ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ - /* Projects */ - // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ - // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ - // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ - // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ - // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ - // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ - /* Language and Environment */ - "target": "es2023" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, - // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ - // "jsx": "preserve", /* Specify what JSX code is generated. */ - // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ - // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ - // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ - // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ - // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ - // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ - // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ - // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ - // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + /* Language and Environment */ + "target": "es2023" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ - /* Modules */ - "module": "commonjs" /* Specify what module code is generated. */, - // "rootDir": "./", /* Specify the root folder within your source files. */ - // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ - // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ - // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ - // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ - // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ - // "types": [], /* Specify type package names to be included without being referenced in a source file. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ - // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ - // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ - // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ - // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ - // "resolveJsonModule": true, /* Enable importing .json files. */ - // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ - // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + /* Modules */ + "module": "commonjs" /* Specify what module code is generated. */, + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ + // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ + // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ + // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ - /* JavaScript Support */ - // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ - // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ - // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ - /* Emit */ - // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ - // "declarationMap": true, /* Create sourcemaps for d.ts files. */ - // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ - // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ - // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ - // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ - // "outDir": "./", /* Specify an output folder for all emitted files. */ - // "removeComments": true, /* Disable emitting comments. */ - // "noEmit": true, /* Disable emitting files from a compilation. */ - // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ - // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ - // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ - // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ - // "newLine": "crlf", /* Set the newline character for emitting files. */ - // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ - // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ - // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ - // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ - // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ - /* Interop Constraints */ - // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ - // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ - // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */ - // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ - "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */, - // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ - "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ + // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */, + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, - /* Type Checking */ - "strict": true /* Enable all strict type-checking options. */, - // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ - // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ - // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ - // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ - // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ - // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ - // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ - // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ - // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ - // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ - // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ - // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ - // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ - // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ - // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ - // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ - // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + /* Type Checking */ + "strict": true /* Enable all strict type-checking options. */, + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ - /* Completeness */ - // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ - "skipLibCheck": true /* Skip type checking all .d.ts files. */ - }, - "ts-node": { - "esm": true - } + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + }, + "ts-node": { + "esm": true + } } diff --git a/yarn.lock b/yarn.lock index da0e793..2602b94 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7,6 +7,19 @@ resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.10.0.tgz#d2a39395c587e092d77cbbc80acf956a54f38bf7" integrity sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q== +"@ethereumjs/rlp@^5.0.2": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@ethereumjs/rlp/-/rlp-5.0.2.tgz#c89bd82f2f3bec248ab2d517ae25f5bbc4aac842" + integrity sha512-DziebCdg4JpGlEqEdGgXmjqcFoJi+JGulUXwEjsZGAscAQ7MyD/7LE/GVCP29vEQxKc7AAwjT3A2ywHp2xfoCA== + +"@ethereumjs/util@^9.1.0": + version "9.1.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/util/-/util-9.1.0.tgz#75e3898a3116d21c135fa9e29886565609129bce" + integrity sha512-XBEKsYqLGXLah9PNJbgdkigthkG7TAGvlD/sH12beMXEyHDyigfcbdvHhmLyDWgDyOJn4QwiQUaF7yeuhnjdog== + dependencies: + "@ethereumjs/rlp" "^5.0.2" + ethereum-cryptography "^2.2.1" + "@noble/curves@1.4.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.4.0.tgz#f05771ef64da724997f69ee1261b2417a49522d6" @@ -14,24 +27,404 @@ dependencies: "@noble/hashes" "1.4.0" -"@noble/curves@~1.4.0": +"@noble/curves@1.4.2", "@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.4.0", "@noble/hashes@~1.4.0": +"@noble/curves@^1.3.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.5.0.tgz#7a9b9b507065d516e6dce275a1e31db8d2a100dd" + integrity sha512-J5EKamIHnKPyClwVrzmaf5wSdQXgdHcPZIZLu3bwnbeCx8/7NPK5q2ZBWF+5FvYGByjiQQsJYX6jfgB2wDPn3A== + dependencies: + "@noble/hashes" "1.4.0" + +"@noble/hashes@1.4.0", "@noble/hashes@^1.3.1", "@noble/hashes@^1.3.3", "@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== -"@polytope-labs/hyperclient@^0.3.35": - version "0.3.35" - resolved "https://registry.yarnpkg.com/@polytope-labs/hyperclient/-/hyperclient-0.3.35.tgz#2ee81caaaefaf91c62bcca8fe567b6cbb0196f7a" - integrity sha512-72dT8UCRX1/sjrg1rvyX7QKBOn8VzY28v1U95IjgW+YCllVnnGepdMAqAf15Ee1xvR22Zwy36J4SXo9/RIwLrQ== +"@polkadot-api/json-rpc-provider-proxy@0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@polkadot-api/json-rpc-provider-proxy/-/json-rpc-provider-proxy-0.0.1.tgz#bb5c943642cdf0ec7bc48c0a2647558b9fcd7bdb" + integrity sha512-gmVDUP8LpCH0BXewbzqXF2sdHddq1H1q+XrAW2of+KZj4woQkIGBRGTJHeBEVHe30EB+UejR1N2dT4PO/RvDdg== + +"@polkadot-api/json-rpc-provider@0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@polkadot-api/json-rpc-provider/-/json-rpc-provider-0.0.1.tgz#333645d40ccd9bccfd1f32503f17e4e63e76e297" + integrity sha512-/SMC/l7foRjpykLTUTacIH05H3mr9ip8b5xxfwXlVezXrNVLp3Cv0GX6uItkKd+ZjzVPf3PFrDF2B2/HLSNESA== + +"@polkadot-api/metadata-builders@0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@polkadot-api/metadata-builders/-/metadata-builders-0.0.1.tgz#a76b48febef9ea72be8273d889e2677101045a05" + integrity sha512-GCI78BHDzXAF/L2pZD6Aod/yl82adqQ7ftNmKg51ixRL02JpWUA+SpUKTJE5MY1p8kiJJIo09P2um24SiJHxNA== + dependencies: + "@polkadot-api/substrate-bindings" "0.0.1" + "@polkadot-api/utils" "0.0.1" + +"@polkadot-api/observable-client@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@polkadot-api/observable-client/-/observable-client-0.1.0.tgz#472045ea06a2bc4bccdc2db5c063eadcbf6f5351" + integrity sha512-GBCGDRztKorTLna/unjl/9SWZcRmvV58o9jwU2Y038VuPXZcr01jcw/1O3x+yeAuwyGzbucI/mLTDa1QoEml3A== + dependencies: + "@polkadot-api/metadata-builders" "0.0.1" + "@polkadot-api/substrate-bindings" "0.0.1" + "@polkadot-api/substrate-client" "0.0.1" + "@polkadot-api/utils" "0.0.1" + +"@polkadot-api/substrate-bindings@0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@polkadot-api/substrate-bindings/-/substrate-bindings-0.0.1.tgz#c4b7f4d6c3672d2c15cbc6c02964f014b73cbb0b" + integrity sha512-bAe7a5bOPnuFVmpv7y4BBMRpNTnMmE0jtTqRUw/+D8ZlEHNVEJQGr4wu3QQCl7k1GnSV1wfv3mzIbYjErEBocg== + dependencies: + "@noble/hashes" "^1.3.1" + "@polkadot-api/utils" "0.0.1" + "@scure/base" "^1.1.1" + scale-ts "^1.6.0" + +"@polkadot-api/substrate-client@0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@polkadot-api/substrate-client/-/substrate-client-0.0.1.tgz#0e8010a0abe2fb47d6fa7ab94e45e1d0de083314" + integrity sha512-9Bg9SGc3AwE+wXONQoW8GC00N3v6lCZLW74HQzqB6ROdcm5VAHM4CB/xRzWSUF9CXL78ugiwtHx3wBcpx4H4Wg== + +"@polkadot-api/utils@0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@polkadot-api/utils/-/utils-0.0.1.tgz#908b22becac705149d7cc946532143d0fb003bfc" + integrity sha512-3j+pRmlF9SgiYDabSdZsBSsN5XHbpXOAce1lWj56IEEaFZVjsiCaxDOA7C9nCcgfVXuvnbxqqEGQvnY+QfBAUw== + +"@polkadot/api-augment@12.3.1": + version "12.3.1" + resolved "https://registry.yarnpkg.com/@polkadot/api-augment/-/api-augment-12.3.1.tgz#07c1b510310868e01f89e4d2f2313595d068b228" + integrity sha512-KfofZVEUeTgLzcexdxKBT2vihazDheUoTLxbsa2ztmmw4UB/IjOL911y04pjg2obZQAI9B+oCyxJXyCfzauWEg== + dependencies: + "@polkadot/api-base" "12.3.1" + "@polkadot/rpc-augment" "12.3.1" + "@polkadot/types" "12.3.1" + "@polkadot/types-augment" "12.3.1" + "@polkadot/types-codec" "12.3.1" + "@polkadot/util" "^13.0.2" + tslib "^2.6.2" + +"@polkadot/api-base@12.3.1": + version "12.3.1" + resolved "https://registry.yarnpkg.com/@polkadot/api-base/-/api-base-12.3.1.tgz#084801da4e54820ec0e91c51a237bcd861665c1d" + integrity sha512-vNbxXNjn4APfXg+ui99gurX2Jzns+eezmWranxoGXT7q0mme1zAtWus5t4e+qe1qRjDNZZYPruF7YJA8dL5k8A== + dependencies: + "@polkadot/rpc-core" "12.3.1" + "@polkadot/types" "12.3.1" + "@polkadot/util" "^13.0.2" + rxjs "^7.8.1" + tslib "^2.6.2" + +"@polkadot/api-derive@12.3.1": + version "12.3.1" + resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-12.3.1.tgz#2da05346fed18ff29ed2a581a3270591de11662c" + integrity sha512-2MbK1h4GcKEdSgDKKYI28iZESw0VOm0kekV6YGQflZNWe84jJOn2rohP8pACseUjQjwWDgbPPBvTlRZTk7zdAw== + dependencies: + "@polkadot/api" "12.3.1" + "@polkadot/api-augment" "12.3.1" + "@polkadot/api-base" "12.3.1" + "@polkadot/rpc-core" "12.3.1" + "@polkadot/types" "12.3.1" + "@polkadot/types-codec" "12.3.1" + "@polkadot/util" "^13.0.2" + "@polkadot/util-crypto" "^13.0.2" + rxjs "^7.8.1" + tslib "^2.6.2" + +"@polkadot/api@12.3.1", "@polkadot/api@^12.3.1": + version "12.3.1" + resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-12.3.1.tgz#bce62c902293295460832d15ee8fa2119a36ae42" + integrity sha512-VCrtadJRJttya5NhZ8slkD/UQyOZv4qABjagQMaG1eTZpn5k1wskmDUGdHrZZpYO5jBPewnCgaN8+LPKO2qiOw== + dependencies: + "@polkadot/api-augment" "12.3.1" + "@polkadot/api-base" "12.3.1" + "@polkadot/api-derive" "12.3.1" + "@polkadot/keyring" "^13.0.2" + "@polkadot/rpc-augment" "12.3.1" + "@polkadot/rpc-core" "12.3.1" + "@polkadot/rpc-provider" "12.3.1" + "@polkadot/types" "12.3.1" + "@polkadot/types-augment" "12.3.1" + "@polkadot/types-codec" "12.3.1" + "@polkadot/types-create" "12.3.1" + "@polkadot/types-known" "12.3.1" + "@polkadot/util" "^13.0.2" + "@polkadot/util-crypto" "^13.0.2" + eventemitter3 "^5.0.1" + rxjs "^7.8.1" + tslib "^2.6.2" + +"@polkadot/keyring@^13.0.2": + version "13.0.2" + resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-13.0.2.tgz#05a655eb06c965ae5ee5f181d25916797ea50849" + integrity sha512-NeLbhyKDT5W8LI9seWTZGePxNTOVpDhv2018HSrEDwJq9Ie0C4TZhUf3KNERCkSveuThXjfQJMs+1CF33ZXPWw== + dependencies: + "@polkadot/util" "13.0.2" + "@polkadot/util-crypto" "13.0.2" + tslib "^2.6.2" + +"@polkadot/networks@13.0.2", "@polkadot/networks@^13.0.2": + version "13.0.2" + resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-13.0.2.tgz#0f8fc896b8fb2141212b6448739f4a00bc72b29c" + integrity sha512-ABAL+vug/gIwkdFEzeh87JoJd0YKrxSYg/HjUrZ+Zis2ucxQEKpvtCpJ34ku+YrjacBfVqIAkkwd3ZdIPGq9aQ== + dependencies: + "@polkadot/util" "13.0.2" + "@substrate/ss58-registry" "^1.46.0" + tslib "^2.6.2" + +"@polkadot/rpc-augment@12.3.1": + version "12.3.1" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-augment/-/rpc-augment-12.3.1.tgz#9a896c4578753055ab25326243e716344a895a8a" + integrity sha512-/tZLl5IuQ4vdGlUAbd8x3ShZ35XDSeyknKHCC+9kIrM/+KIyoCYBob2RXP9uqX8m516AWkXUrjsSO6DFPBpRGg== + dependencies: + "@polkadot/rpc-core" "12.3.1" + "@polkadot/types" "12.3.1" + "@polkadot/types-codec" "12.3.1" + "@polkadot/util" "^13.0.2" + tslib "^2.6.2" + +"@polkadot/rpc-core@12.3.1": + version "12.3.1" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-12.3.1.tgz#6107c507c30839313e0325c82bffae9f1b08dbab" + integrity sha512-bNo26P20nRpLfANTK4sWEakxvqBJpKwAp/Gt7KlxoGgoTUbWFapyGKScFxp/pblycEziEbC+ZjkLMkaWaqi69g== + dependencies: + "@polkadot/rpc-augment" "12.3.1" + "@polkadot/rpc-provider" "12.3.1" + "@polkadot/types" "12.3.1" + "@polkadot/util" "^13.0.2" + rxjs "^7.8.1" + tslib "^2.6.2" + +"@polkadot/rpc-provider@12.3.1": + version "12.3.1" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-12.3.1.tgz#90bfbb8518bd63d94141bf4d2643c89b89e61413" + integrity sha512-Tg1Oj/1ldivqwnnOWepcNHEHYgpOBffxlrZMEXH1XX6D3AZaUhAWbatizyisydpuMbknTQ9FGYSnb9rOc2QBJw== + dependencies: + "@polkadot/keyring" "^13.0.2" + "@polkadot/types" "12.3.1" + "@polkadot/types-support" "12.3.1" + "@polkadot/util" "^13.0.2" + "@polkadot/util-crypto" "^13.0.2" + "@polkadot/x-fetch" "^13.0.2" + "@polkadot/x-global" "^13.0.2" + "@polkadot/x-ws" "^13.0.2" + eventemitter3 "^5.0.1" + mock-socket "^9.3.1" + nock "^13.5.0" + tslib "^2.6.2" + optionalDependencies: + "@substrate/connect" "0.8.10" + +"@polkadot/types-augment@12.3.1": + version "12.3.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-augment/-/types-augment-12.3.1.tgz#c7853049829d39d35b94fb01a84c1ea0d61ca9e0" + integrity sha512-I3ggJt7W3UOScP6WA6PNmNsmpCfZtXkRJvSJkX7bi2LsSm/iF0xo0KdpQK02dHu7nGRFD9O5cSoVawzZJifGLA== + dependencies: + "@polkadot/types" "12.3.1" + "@polkadot/types-codec" "12.3.1" + "@polkadot/util" "^13.0.2" + tslib "^2.6.2" + +"@polkadot/types-codec@12.3.1": + version "12.3.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-codec/-/types-codec-12.3.1.tgz#4eb113a5a2c9e7784f1393db4d6cfe39b24da014" + integrity sha512-yZ4exsQI+eVkE/fZNuJBOajAgOH/YncKWOOf0N4lc6iq28oYp22DCAXc50Ym372l4HO+uhC9QdMPH9EiWwT2pQ== + dependencies: + "@polkadot/util" "^13.0.2" + "@polkadot/x-bigint" "^13.0.2" + tslib "^2.6.2" + +"@polkadot/types-create@12.3.1": + version "12.3.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-create/-/types-create-12.3.1.tgz#867ff2971f0d1c7b68788eb3b9f7c060fcbc648f" + integrity sha512-Jf9BByWB64FPW3lM5/Mcc/foyPJ3L9t0QwHVHaYWaonZt6l7SPX71rQmD7twJiTj9q1d1WidDKg/TtRDNbm1yA== + dependencies: + "@polkadot/types-codec" "12.3.1" + "@polkadot/util" "^13.0.2" + tslib "^2.6.2" + +"@polkadot/types-known@12.3.1": + version "12.3.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-12.3.1.tgz#11aade98492e37c2e6d095c78fcd229a212ee933" + integrity sha512-G8t0uiIW1iu3KwylHDPnqdHxg5qwBxzPZQJvsjnGx2qBUk2VqXditKWcNFLEwCTnJPL95t2AzEO711lS99WRbg== + dependencies: + "@polkadot/networks" "^13.0.2" + "@polkadot/types" "12.3.1" + "@polkadot/types-codec" "12.3.1" + "@polkadot/types-create" "12.3.1" + "@polkadot/util" "^13.0.2" + tslib "^2.6.2" + +"@polkadot/types-support@12.3.1": + version "12.3.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-support/-/types-support-12.3.1.tgz#7111f3a7a55a5f4f50b11450c62b7fe5340e4a21" + integrity sha512-TwL5M5HkZ4jQGKekD+qJFLba7UXWASfwlPy2OpKj0LOnnmq4tudXgN13UFdQ7HoOmisPhr+vYo9vteYeBZ0jTA== + dependencies: + "@polkadot/util" "^13.0.2" + tslib "^2.6.2" + +"@polkadot/types@12.3.1": + version "12.3.1" + resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-12.3.1.tgz#46a44aaa672d9c3c8598bbf8b8668e575c55f76a" + integrity sha512-4MkTF1znpgp9mZc/ZZPdFe7/5it9v+EJmzXc/DEOX9kVWs2BuKOWopzOFyO3reVUUB+v7dxfSOArSsxkMUcuoA== + dependencies: + "@polkadot/keyring" "^13.0.2" + "@polkadot/types-augment" "12.3.1" + "@polkadot/types-codec" "12.3.1" + "@polkadot/types-create" "12.3.1" + "@polkadot/util" "^13.0.2" + "@polkadot/util-crypto" "^13.0.2" + rxjs "^7.8.1" + tslib "^2.6.2" + +"@polkadot/util-crypto@13.0.2", "@polkadot/util-crypto@^13.0.2": + version "13.0.2" + resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-13.0.2.tgz#fee602bcb39e9424300410f4144f170ee2a29292" + integrity sha512-woUsJJ6zd/caL7U+D30a5oM/+WK9iNI00Y8aNUHSj6Zq/KPzK9uqDBaLGWwlgrejoMQkxxiU2X0f2LzP15AtQg== + dependencies: + "@noble/curves" "^1.3.0" + "@noble/hashes" "^1.3.3" + "@polkadot/networks" "13.0.2" + "@polkadot/util" "13.0.2" + "@polkadot/wasm-crypto" "^7.3.2" + "@polkadot/wasm-util" "^7.3.2" + "@polkadot/x-bigint" "13.0.2" + "@polkadot/x-randomvalues" "13.0.2" + "@scure/base" "^1.1.5" + tslib "^2.6.2" + +"@polkadot/util@13.0.2", "@polkadot/util@^13.0.2": + version "13.0.2" + resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-13.0.2.tgz#f0a2572d74730fda8dfd690b60d53c131a688f3b" + integrity sha512-/6bS9sfhJLhs8QuqWaR1eRapzfDdGC5XAQZEPL9NN5sTTA7HxWos8rVleai0UERm8QUMabjZ9rK9KpzbXl7ojg== + dependencies: + "@polkadot/x-bigint" "13.0.2" + "@polkadot/x-global" "13.0.2" + "@polkadot/x-textdecoder" "13.0.2" + "@polkadot/x-textencoder" "13.0.2" + "@types/bn.js" "^5.1.5" + bn.js "^5.2.1" + tslib "^2.6.2" + +"@polkadot/wasm-bridge@7.3.2": + version "7.3.2" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-bridge/-/wasm-bridge-7.3.2.tgz#e1b01906b19e06cbca3d94f10f5666f2ae0baadc" + integrity sha512-AJEXChcf/nKXd5Q/YLEV5dXQMle3UNT7jcXYmIffZAo/KI394a+/24PaISyQjoNC0fkzS1Q8T5pnGGHmXiVz2g== + dependencies: + "@polkadot/wasm-util" "7.3.2" + tslib "^2.6.2" + +"@polkadot/wasm-crypto-asmjs@7.3.2": + version "7.3.2" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-7.3.2.tgz#c6d41bc4b48b5359d57a24ca3066d239f2d70a34" + integrity sha512-QP5eiUqUFur/2UoF2KKKYJcesc71fXhQFLT3D4ZjG28Mfk2ZPI0QNRUfpcxVQmIUpV5USHg4geCBNuCYsMm20Q== + dependencies: + tslib "^2.6.2" + +"@polkadot/wasm-crypto-init@7.3.2": + version "7.3.2" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-init/-/wasm-crypto-init-7.3.2.tgz#7e1fe79ba978fb0a4a0f74a92d976299d38bc4b8" + integrity sha512-FPq73zGmvZtnuJaFV44brze3Lkrki3b4PebxCy9Fplw8nTmisKo9Xxtfew08r0njyYh+uiJRAxPCXadkC9sc8g== + dependencies: + "@polkadot/wasm-bridge" "7.3.2" + "@polkadot/wasm-crypto-asmjs" "7.3.2" + "@polkadot/wasm-crypto-wasm" "7.3.2" + "@polkadot/wasm-util" "7.3.2" + tslib "^2.6.2" + +"@polkadot/wasm-crypto-wasm@7.3.2": + version "7.3.2" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-7.3.2.tgz#44e08ed5cf6499ce4a3aa7247071a5d01f6a74f4" + integrity sha512-15wd0EMv9IXs5Abp1ZKpKKAVyZPhATIAHfKsyoWCEFDLSOA0/K0QGOxzrAlsrdUkiKZOq7uzSIgIDgW8okx2Mw== + dependencies: + "@polkadot/wasm-util" "7.3.2" + tslib "^2.6.2" + +"@polkadot/wasm-crypto@^7.3.2": + version "7.3.2" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto/-/wasm-crypto-7.3.2.tgz#61bbcd9e591500705c8c591e6aff7654bdc8afc9" + integrity sha512-+neIDLSJ6jjVXsjyZ5oLSv16oIpwp+PxFqTUaZdZDoA2EyFRQB8pP7+qLsMNk+WJuhuJ4qXil/7XiOnZYZ+wxw== + dependencies: + "@polkadot/wasm-bridge" "7.3.2" + "@polkadot/wasm-crypto-asmjs" "7.3.2" + "@polkadot/wasm-crypto-init" "7.3.2" + "@polkadot/wasm-crypto-wasm" "7.3.2" + "@polkadot/wasm-util" "7.3.2" + tslib "^2.6.2" + +"@polkadot/wasm-util@7.3.2", "@polkadot/wasm-util@^7.3.2": + version "7.3.2" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-util/-/wasm-util-7.3.2.tgz#4fe6370d2b029679b41a5c02cd7ebf42f9b28de1" + integrity sha512-bmD+Dxo1lTZyZNxbyPE380wd82QsX+43mgCm40boyKrRppXEyQmWT98v/Poc7chLuskYb6X8IQ6lvvK2bGR4Tg== + dependencies: + tslib "^2.6.2" -"@scure/base@~1.1.6": +"@polkadot/x-bigint@13.0.2", "@polkadot/x-bigint@^13.0.2": + version "13.0.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-bigint/-/x-bigint-13.0.2.tgz#25adca9ce0c5ed691f9bced283f44f7e7d824300" + integrity sha512-h2jKT/UaxiEal8LhQeH6+GCjO7GwEqVAD2SNYteCOXff6yNttqAZYJuHZsndbVjVNwqRNf8D5q/zZkD0HUd6xQ== + dependencies: + "@polkadot/x-global" "13.0.2" + tslib "^2.6.2" + +"@polkadot/x-fetch@^13.0.2": + version "13.0.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-fetch/-/x-fetch-13.0.2.tgz#841d901fae36cbc4157297324ca0d73fbe4d200e" + integrity sha512-B/gf9iriUr6za/Ui7zIFBfHz7UBZ68rJEIteWHx1UHRCZPcLqv+hgpev6xIGrkfFljI0/lI7IwtN2qy6HYzFBg== + dependencies: + "@polkadot/x-global" "13.0.2" + node-fetch "^3.3.2" + tslib "^2.6.2" + +"@polkadot/x-global@13.0.2", "@polkadot/x-global@^13.0.2": + version "13.0.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-global/-/x-global-13.0.2.tgz#77afc4fbd4cfac8ba78cf120836f30ecc7322a74" + integrity sha512-OoNIXLB5y8vIKpk4R+XmpDPhipNXWSUvEwUnpQT7NAxNLmzgMq1FhbrwBWWPRNHPrQonp7mqxV/X+v5lv1HW/g== + dependencies: + tslib "^2.6.2" + +"@polkadot/x-randomvalues@13.0.2": + version "13.0.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-randomvalues/-/x-randomvalues-13.0.2.tgz#78ae28b345895cc816ffcad0b336c31cadfcf928" + integrity sha512-SGj+L0H/7TWZtSmtkWlixO4DFzXDdluI0UscN2h285os2Ns8PnmBbue+iJ8PVSzpY1BOxd66gvkkpboPz+jXFQ== + dependencies: + "@polkadot/x-global" "13.0.2" + tslib "^2.6.2" + +"@polkadot/x-textdecoder@13.0.2": + version "13.0.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-13.0.2.tgz#662a6855af8e7a5af17f86890e59ab44f829243a" + integrity sha512-mauglOkTJxLGmLwLc3J5Jlq/W+SHP53eiy3F8/8JxxfnXrZKgWoQXGpvXYPjFnMZj0MzDSy/6GjyGWnDCgdQFA== + dependencies: + "@polkadot/x-global" "13.0.2" + tslib "^2.6.2" + +"@polkadot/x-textencoder@13.0.2": + version "13.0.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-13.0.2.tgz#5e178e0f759df50592e6870346c8db2a445af957" + integrity sha512-Lq08H2OnVXj97uaOwg7tcmRS7a4VJYkHEeWO4FyEMOk6P6lU6W8OVNjjxG0se9PCEgmyZPUDbJI//1ynzP4cXw== + dependencies: + "@polkadot/x-global" "13.0.2" + tslib "^2.6.2" + +"@polkadot/x-ws@^13.0.2": + version "13.0.2" + resolved "https://registry.yarnpkg.com/@polkadot/x-ws/-/x-ws-13.0.2.tgz#d0392a87adcba851a44fc6f7f56792e529228f3e" + integrity sha512-nC5e2eY5D5ZR5teQOB7ib+dWLbmNws86cTz3BjKCalSMBBIn6i3V9ElgABpierBmnSJe9D94EyrH1BxdVfDxUg== + dependencies: + "@polkadot/x-global" "13.0.2" + tslib "^2.6.2" + ws "^8.16.0" + +"@polytope-labs/hyperclient@^0.4.3": + version "0.4.3" + resolved "https://registry.yarnpkg.com/@polytope-labs/hyperclient/-/hyperclient-0.4.3.tgz#028fdaa56d7608c294b60b30264c56658c689a77" + integrity sha512-8Ogpn4I7Ifox6TKT9N7sQqGGs3uHW436n9Ta4ZFTvNF3EvEQc4gzH7Gn2NqGqq7lWDnVDc4Et8rYliK4ZAsMRw== + +"@scure/base@^1.1.1", "@scure/base@^1.1.5", "@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== @@ -53,6 +446,58 @@ "@noble/hashes" "~1.4.0" "@scure/base" "~1.1.6" +"@substrate/connect-extension-protocol@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@substrate/connect-extension-protocol/-/connect-extension-protocol-2.0.0.tgz#badaa6e6b5f7c7d56987d778f4944ddb83cd9ea7" + integrity sha512-nKu8pDrE3LNCEgJjZe1iGXzaD6OSIDD4Xzz/yo4KO9mQ6LBvf49BVrt4qxBFGL6++NneLiWUZGoh+VSd4PyVIg== + +"@substrate/connect-known-chains@^1.1.4": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@substrate/connect-known-chains/-/connect-known-chains-1.3.0.tgz#bc8dc2437e46b3701b64526c90e1de720a1605d8" + integrity sha512-BHcWdhOsnHtoWuS4LpFpH3MbLAhm1amq4hvl5ctI47KNZcZJcEPAF4zmeaTMuvj+UJ7LEFooy46Mn7zok47MwA== + +"@substrate/connect@0.8.10": + version "0.8.10" + resolved "https://registry.yarnpkg.com/@substrate/connect/-/connect-0.8.10.tgz#810b6589f848828aa840c731a1f36b84fe0e5956" + integrity sha512-DIyQ13DDlXqVFnLV+S6/JDgiGowVRRrh18kahieJxhgvzcWicw5eLc6jpfQ0moVVLBYkO7rctB5Wreldwpva8w== + dependencies: + "@substrate/connect-extension-protocol" "^2.0.0" + "@substrate/connect-known-chains" "^1.1.4" + "@substrate/light-client-extension-helpers" "^0.0.6" + smoldot "2.0.22" + +"@substrate/light-client-extension-helpers@^0.0.6": + version "0.0.6" + resolved "https://registry.yarnpkg.com/@substrate/light-client-extension-helpers/-/light-client-extension-helpers-0.0.6.tgz#bec1c7997241226db50b44ad85a992b4348d21c3" + integrity sha512-girltEuxQ1BvkJWmc8JJlk4ZxnlGXc/wkLcNguhY+UoDEMBK0LsdtfzQKIfrIehi4QdeSBlFEFBoI4RqPmsZzA== + dependencies: + "@polkadot-api/json-rpc-provider" "0.0.1" + "@polkadot-api/json-rpc-provider-proxy" "0.0.1" + "@polkadot-api/observable-client" "0.1.0" + "@polkadot-api/substrate-client" "0.0.1" + "@substrate/connect-extension-protocol" "^2.0.0" + "@substrate/connect-known-chains" "^1.1.4" + rxjs "^7.8.1" + +"@substrate/ss58-registry@^1.46.0": + version "1.49.0" + resolved "https://registry.yarnpkg.com/@substrate/ss58-registry/-/ss58-registry-1.49.0.tgz#ed9507316d13f49b2bccb65f08ec97180f71fc39" + integrity sha512-leW6Ix4LD7XgvxT7+aobPWSw+WvPcN2Rxof1rmd0mNC5t2n99k1N7UNEvz7YEFSOUeHWmKIY7F5q8KeIqYoHfA== + +"@types/bn.js@^5.1.5": + version "5.1.5" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.5.tgz#2e0dacdcce2c0f16b905d20ff87aedbc6f7b4bf0" + integrity sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A== + dependencies: + "@types/node" "*" + +"@types/node@*": + version "22.4.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.4.0.tgz#c295fe1d6f5f58916cc61dbef8cf65b5b9b71de9" + integrity sha512-49AbMDwYUz7EXxKU/r7mXOsxwFr4BYbvB7tWYxVuLdb2ibd30ijjXINSMAHiEEZk5PCRBmW1gUeisn2VMKt3cQ== + dependencies: + undici-types "~6.19.2" + "@types/node@^20.14.10": version "20.14.10" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.10.tgz#a1a218290f1b6428682e3af044785e5874db469a" @@ -70,6 +515,11 @@ abitype@1.0.5: resolved "https://registry.yarnpkg.com/abitype/-/abitype-1.0.5.tgz#29d0daa3eea867ca90f7e4123144c1d1270774b6" integrity sha512-YzDhti7cjlfaBhHutMaboYB21Ha3rXR9QTkNJFzYC4kC8YclaiwPBBBJY8ejFdu2wnJeZCVZSMlQJ7fi8S6hsw== +bn.js@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" + integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== + config-chain@~1.1.5: version "1.1.13" resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4" @@ -78,11 +528,53 @@ config-chain@~1.1.5: ini "^1.3.4" proto-list "~1.2.1" +data-uri-to-buffer@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e" + integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== + +debug@^4.1.0: + version "4.3.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" + integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== + dependencies: + ms "2.1.2" + dotenv@^16.4.5: version "16.4.5" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f" integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg== +ethereum-cryptography@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz#58f2810f8e020aecb97de8c8c76147600b0b8ccf" + integrity sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg== + dependencies: + "@noble/curves" "1.4.2" + "@noble/hashes" "1.4.0" + "@scure/bip32" "1.4.0" + "@scure/bip39" "1.3.0" + +eventemitter3@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" + integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== + +fetch-blob@^3.1.2, fetch-blob@^3.1.4: + version "3.2.0" + resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9" + integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ== + dependencies: + node-domexception "^1.0.0" + web-streams-polyfill "^3.0.3" + +formdata-polyfill@^4.0.10: + version "4.0.10" + resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423" + integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g== + dependencies: + fetch-blob "^3.1.2" + ini@^1.3.4: version "1.3.8" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" @@ -102,6 +594,11 @@ js-prettify@~1.4.0: mkdirp "0.3.5" nopt "~2.1.1" +json-stringify-safe@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== + lodash@~1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/lodash/-/lodash-1.3.1.tgz#a4663b53686b895ff074e2ba504dfb76a8e2b770" @@ -124,6 +621,39 @@ mkdirp@0.3.5: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.3.5.tgz#de3e5f8961c88c787ee1368df849ac4413eca8d7" integrity sha512-8OCq0De/h9ZxseqzCH8Kw/Filf5pF/vMI6+BH7Lu0jXz2pqYCjTAQRolSxRIi+Ax+oCCjlxoJMP0YQ4XlrQNHg== +mock-socket@^9.3.1: + version "9.3.1" + resolved "https://registry.yarnpkg.com/mock-socket/-/mock-socket-9.3.1.tgz#24fb00c2f573c84812aa4a24181bb025de80cc8e" + integrity sha512-qxBgB7Qa2sEQgHFjj0dSigq7fX4k6Saisd5Nelwp2q8mlbAFh5dHV9JTTlF8viYJLSSWgMCZFUom8PJcMNBoJw== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +nock@^13.5.0: + version "13.5.4" + resolved "https://registry.yarnpkg.com/nock/-/nock-13.5.4.tgz#8918f0addc70a63736170fef7106a9721e0dc479" + integrity sha512-yAyTfdeNJGGBFxWdzSKCBYxs5FxLbCg5X5Q4ets974hcQzG1+qCxvIyOo4j2Ry6MUlhWVMX4OoYDefAIIwupjw== + dependencies: + debug "^4.1.0" + json-stringify-safe "^5.0.1" + propagate "^2.0.0" + +node-domexception@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" + integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== + +node-fetch@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.2.tgz#d1e889bacdf733b4ff3b2b243eb7a12866a0b78b" + integrity sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA== + dependencies: + data-uri-to-buffer "^4.0.0" + fetch-blob "^3.1.4" + formdata-polyfill "^4.0.10" + nopt@~2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/nopt/-/nopt-2.1.2.tgz#6cccd977b80132a07731d6e8ce58c2c8303cf9af" @@ -139,11 +669,40 @@ prettify@^0.1.7: js-prettify "~1.4.0" lodash "~1.3.1" +propagate@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/propagate/-/propagate-2.0.1.tgz#40cdedab18085c792334e64f0ac17256d38f9a45" + integrity sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag== + proto-list@~1.2.1: version "1.2.4" resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" integrity sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA== +rxjs@^7.8.1: + version "7.8.1" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" + integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== + dependencies: + tslib "^2.1.0" + +scale-ts@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/scale-ts/-/scale-ts-1.6.0.tgz#e9641093c5a9e50f964ddb1607139034e3e932e9" + integrity sha512-Ja5VCjNZR8TGKhUumy9clVVxcDpM+YFjAnkMuwQy68Hixio3VRRvWdE3g8T/yC+HXA0ZDQl2TGyUmtmbcVl40Q== + +smoldot@2.0.22: + version "2.0.22" + resolved "https://registry.yarnpkg.com/smoldot/-/smoldot-2.0.22.tgz#1e924d2011a31c57416e79a2b97a460f462a31c7" + integrity sha512-B50vRgTY6v3baYH6uCgL15tfaag5tcS2o/P5q1OiXcKGv1axZDfz2dzzMuIkVpyMR2ug11F6EAtQlmYBQd292g== + dependencies: + ws "^8.8.1" + +tslib@^2.1.0, tslib@^2.6.2: + version "2.6.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" + integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== + typescript@^5.5.3: version "5.5.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.3.tgz#e1b0a3c394190838a0b168e771b0ad56a0af0faa" @@ -154,6 +713,11 @@ undici-types@~5.26.4: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== +undici-types@~6.19.2: + version "6.19.6" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.6.tgz#e218c3df0987f4c0e0008ca00d6b6472d9b89b36" + integrity sha512-e/vggGopEfTKSvj4ihnOLTsqhrKRN3LeO6qSN/GxohhuRv8qH9bNQ4B8W7e/vFL+0XTnmHPB4/kegunZGA4Org== + viem@^2.17.3: version "2.17.3" resolved "https://registry.yarnpkg.com/viem/-/viem-2.17.3.tgz#f15616049d8154b83e499eb5446e6d7fe6312626" @@ -168,7 +732,17 @@ viem@^2.17.3: isows "1.0.4" ws "8.17.1" +web-streams-polyfill@^3.0.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz#2073b91a2fdb1fbfbd401e7de0ac9f8214cecb4b" + integrity sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw== + 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== + +ws@^8.16.0, ws@^8.8.1: + version "8.18.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" + integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==