Skip to content

Commit

Permalink
update contract address & abi
Browse files Browse the repository at this point in the history
  • Loading branch information
seunlanlege committed Aug 24, 2024
1 parent 6b9b9c1 commit fe6cb4c
Show file tree
Hide file tree
Showing 6 changed files with 133 additions and 80 deletions.
165 changes: 93 additions & 72 deletions abis/evmHost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ const ABI = [
name: "timeoutTimestamp",
type: "uint256",
},
{
indexed: false,
internalType: "bytes",
name: "context",
type: "bytes",
},
{
indexed: false,
internalType: "uint256",
Expand Down Expand Up @@ -971,6 +977,11 @@ const ABI = [
name: "fee",
type: "uint256",
},
{
internalType: "bytes",
name: "context",
type: "bytes",
},
],
internalType: "struct DispatchGet",
name: "get",
Expand Down Expand Up @@ -1156,6 +1167,11 @@ const ABI = [
name: "height",
type: "uint64",
},
{
internalType: "bytes",
name: "context",
type: "bytes",
},
],
internalType: "struct GetRequest",
name: "request",
Expand Down Expand Up @@ -1194,78 +1210,6 @@ const ABI = [
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: "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",
},
{
inputs: [
{
Expand Down Expand Up @@ -1427,6 +1371,83 @@ const ABI = [
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: "bytes",
name: "context",
type: "bytes",
},
],
internalType: "struct GetRequest",
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",
},
{
inputs: [],
name: "feeToken",
Expand Down
10 changes: 10 additions & 0 deletions abis/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ const ABI = [
name: "height",
type: "uint64",
},
{
internalType: "bytes",
name: "context",
type: "bytes",
},
],
internalType: "struct GetRequest[]",
name: "timeouts",
Expand Down Expand Up @@ -235,6 +240,11 @@ const ABI = [
name: "height",
type: "uint64",
},
{
internalType: "bytes",
name: "context",
type: "bytes",
},
],
internalType: "struct GetRequest",
name: "request",
Expand Down
23 changes: 22 additions & 1 deletion abis/pingModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const ABI = [
type: "bytes",
},
],
indexed: false,
internalType: "struct StorageValue[]",
name: "message",
type: "tuple[]",
Expand Down Expand Up @@ -126,6 +127,11 @@ const ABI = [
name: "height",
type: "uint64",
},
{
internalType: "bytes",
name: "context",
type: "bytes",
},
],
internalType: "struct GetRequest",
name: "request",
Expand Down Expand Up @@ -347,6 +353,11 @@ const ABI = [
name: "height",
type: "uint64",
},
{
internalType: "bytes",
name: "context",
type: "bytes",
},
],
internalType: "struct GetRequest",
name: "request",
Expand Down Expand Up @@ -381,7 +392,7 @@ const ABI = [
},
],
internalType: "struct IncomingGetResponse",
name: "",
name: "response",
type: "tuple",
},
],
Expand Down Expand Up @@ -429,6 +440,11 @@ const ABI = [
name: "height",
type: "uint64",
},
{
internalType: "bytes",
name: "context",
type: "bytes",
},
],
internalType: "struct GetRequest",
name: "",
Expand Down Expand Up @@ -733,6 +749,11 @@ const ABI = [
name: "hostAddr",
type: "address",
},
{
internalType: "address",
name: "tokenFaucet",
type: "address",
},
],
name: "setIsmpHost",
outputs: [],
Expand Down
5 changes: 3 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import PING_MODULE from "./abis/pingModule";
import EVM_HOST from "./abis/evmHost";
import HANDLER from "./abis/handler";

const PING_MODULE_ADDRESS = "0x1aD48ADeD62e7C685dF4fb75e6d14d34C8B83081";
const PING_MODULE_ADDRESS = "0x42C6551d05eA47c46Fc7B01BBaaD37c466481361";

/*
Using a viem client, dispatches an onchain transaction to the ping module.
Expand Down Expand Up @@ -111,6 +111,7 @@ async function testPostAndGetRequest() {
source: "0x",
dest: OP.state_machine,
nonce: 0n,
context: "0x",
from: account.address,
keys: [account.address, opSepoliaIsmpHost.address, opSepoliaHandler.address],
height: BigInt(height), // latest height
Expand Down Expand Up @@ -383,7 +384,7 @@ async function setUp() {
});

const tokenFaucet = getContract({
address: "0x50A60531EF45a62711A812C081CC2C17ac683def",
address: "0x17d8cc0859fbA942A7af243c3EBB69AbBfe0a320",
abi: parseAbi(["function drip(address token) public"]),
client: { public: bscTestnetClient, wallet: bscWalletClient },
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dependencies": {
"@ethereumjs/util": "^9.1.0",
"@polkadot/api": "^12.3.1",
"@polytope-labs/hyperclient": "^0.4.3",
"@polytope-labs/hyperclient": "^0.5.0",
"dotenv": "^16.4.5",
"log-timestamp": "^0.3.0",
"prettify": "^0.1.7",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,10 @@
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==
"@polytope-labs/hyperclient@^0.5.0":
version "0.5.0"
resolved "https://registry.yarnpkg.com/@polytope-labs/hyperclient/-/hyperclient-0.5.0.tgz#6072416e99dd3505ccb4d7400a19e6437d20fb44"
integrity sha512-0AdePntSt6cmaFmFbVU9XEU3KbrM3UZsT0iaKKlx1LK/fCMFCf3eFyhpj/C7wMPurOpYaE6yyafd/H3L8llvzg==

"@scure/base@^1.1.1", "@scure/base@^1.1.5", "@scure/base@~1.1.6":
version "1.1.7"
Expand Down

0 comments on commit fe6cb4c

Please sign in to comment.