Skip to content

Commit be66d2b

Browse files
committed
NTT V1 Integration
1 parent cb373c2 commit be66d2b

14 files changed

+898
-30
lines changed

bun.lock

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"@types/express": "^5.0.3",
88
"@wormhole-foundation/sdk-base": "^2.4.0",
99
"@wormhole-foundation/sdk-definitions": "^2.4.0",
10+
"@wormhole-foundation/sdk-definitions-ntt": "^1.0.2",
1011
"axios": "^1.10.0",
1112
"binary-layout": "^1.3.0",
1213
"cors": "^2.8.5",
@@ -70,6 +71,8 @@
7071

7172
"@wormhole-foundation/sdk-definitions": ["@wormhole-foundation/[email protected]", "", { "dependencies": { "@noble/curves": "^1.4.0", "@noble/hashes": "^1.3.1", "@wormhole-foundation/sdk-base": "2.4.0" } }, "sha512-Aqx3/XLaBzbt5kt70N0lnVj3acGe/DYN66R4lG7AVv7VvDTSj2PKC0qOdbKgMh+bzFbjKK03fJkpUzl/d6eo+A=="],
7273

74+
"@wormhole-foundation/sdk-definitions-ntt": ["@wormhole-foundation/[email protected]", "", { "peerDependencies": { "@wormhole-foundation/sdk-base": "^2.1.0", "@wormhole-foundation/sdk-definitions": "^2.1.0" } }, "sha512-HXPlWaLc/tp26WyfXCl1ndRtIJq81yunI/UqWyYcMKRabtgZUQRNJqBPYdVOV8lKVtE+4Tx3FF0OWyw7KIrNZw=="],
75+
7376
"abitype": ["[email protected]", "", { "peerDependencies": { "typescript": ">=5.0.4", "zod": "^3 >=3.22.0" }, "optionalPeers": ["typescript", "zod"] }, "sha512-ZeiI6h3GnW06uYDLx0etQtX/p8E24UaHHBj57RSjK7YBFe7iuVn07EDpOeP451D06sF27VOz9JJPlIKJmXgkEg=="],
7477

7578
"accepts": ["[email protected]", "", { "dependencies": { "mime-types": "^3.0.0", "negotiator": "^1.0.0" } }, "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng=="],

chains.example.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
"nativeDecimals": 18,
1212
"executorAddress": "0xD0fb39f5a3361F21457653cB70F9D0C9bD86B66B",
1313
"coreContractAddress": "0x4a8bc80Ed5a4067f1CCf107057b8270E0cC11A78",
14+
"nttMultiReceiveWithGasDropOffAddress": "0xe3cc16Cffa085C78e5D8144C74Fa97e4Fe53d68d",
1415
"capabilities": {
15-
"requestPrefixes": ["ERV1"],
16+
"requestPrefixes": ["ERV1", "ERN1"],
1617
"gasDropOffLimit": "100000000000",
1718
"maxGasLimit": "1000000",
1819
"maxMsgValue": "200000000000"
@@ -30,8 +31,9 @@
3031
"nativeDecimals": 18,
3132
"coreContractAddress": "0x79A1027a6A159502049F10906D333EC57E95F083",
3233
"executorAddress": "0x51B47D493CBA7aB97e3F8F163D6Ce07592CE4482",
34+
"nttMultiReceiveWithGasDropOffAddress": "0xe3cc16Cffa085C78e5D8144C74Fa97e4Fe53d68d",
3335
"capabilities": {
34-
"requestPrefixes": ["ERV1"],
36+
"requestPrefixes": ["ERV1", "ERN1"],
3537
"gasDropOffLimit": "100000000000",
3638
"maxGasLimit": "1000000",
3739
"maxMsgValue": "200000000000"

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"@types/express": "^5.0.3",
2222
"@wormhole-foundation/sdk-base": "^2.4.0",
2323
"@wormhole-foundation/sdk-definitions": "^2.4.0",
24+
"@wormhole-foundation/sdk-definitions-ntt": "^1.0.2",
2425
"axios": "^1.10.0",
2526
"binary-layout": "^1.3.0",
2627
"cors": "^2.8.5",
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
export const nttV1multiReceiveWithGasDropOffAbi = [
2+
{
3+
type: "function",
4+
name: "VERSION",
5+
inputs: [],
6+
outputs: [{ name: "", type: "string", internalType: "string" }],
7+
stateMutability: "view",
8+
},
9+
{
10+
type: "function",
11+
name: "receiveMessages",
12+
inputs: [
13+
{
14+
name: "contracts",
15+
type: "address[]",
16+
internalType: "address[]",
17+
},
18+
{ name: "messages", type: "bytes[]", internalType: "bytes[]" },
19+
{
20+
name: "payeeAddress",
21+
type: "address",
22+
internalType: "address",
23+
},
24+
],
25+
outputs: [],
26+
stateMutability: "payable",
27+
},
28+
{
29+
type: "error",
30+
name: "DropOffFailed",
31+
inputs: [
32+
{ name: "", type: "address", internalType: "address" },
33+
{ name: "", type: "uint256", internalType: "uint256" },
34+
],
35+
},
36+
{
37+
type: "error",
38+
name: "InvalidParameters",
39+
inputs: [
40+
{ name: "", type: "uint256", internalType: "uint256" },
41+
{ name: "", type: "uint256", internalType: "uint256" },
42+
],
43+
},
44+
] as const;

src/chains.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export interface ChainConfig {
1212
nativeDecimals: number;
1313
capabilities: Capabilities;
1414
coreContractAddress: string;
15+
nttMultiReceiveWithGasDropOffAddress: string;
1516
viemChain?: Chain;
1617
}
1718

src/consts.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ export const EMPTY_ADDRESS = padHex(
1818
"0x0000000000000000000000000000000000000000000000000000000000000000",
1919
{ size: 32 },
2020
);
21+
22+
export const NTT_TOKEN_BALANCE_STORE =
23+
"0x52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace00";

0 commit comments

Comments
 (0)