Skip to content

Commit

Permalink
test: db e2e register with struct
Browse files Browse the repository at this point in the history
  • Loading branch information
pikonha committed Nov 8, 2024
1 parent 99f2965 commit a2b31be
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 48 deletions.
100 changes: 55 additions & 45 deletions packages/client/test/db.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,15 +312,17 @@ describe('DatabaseResolver', () => {
functionName: 'register',
abi: abiDBResolver,
args: [
encodedName,
owner.address,
300n,
zeroHash,
resolver,
[],
false,
0,
zeroHash,
{
name: encodedName,
owner: owner.address,
duration: 300n,
secret: zeroHash,
resolver,
data: [],
reverseRecord: false,
fuses: 0,
extraData: zeroHash,
},
],
universalResolverAddress,
signer: owner,
Expand Down Expand Up @@ -361,15 +363,17 @@ describe('DatabaseResolver', () => {
functionName: 'register',
abi: abiDBResolver,
args: [
encodedName,
owner.address,
300n,
zeroHash,
resolver,
calldata,
false,
0,
zeroHash,
{
name: encodedName,
owner: owner.address,
duration: 300n,
secret: zeroHash,
resolver,
data: calldata,
reverseRecord: false,
fuses: 0,
extraData: zeroHash,
},
],
universalResolverAddress,
signer: owner,
Expand Down Expand Up @@ -411,15 +415,17 @@ describe('DatabaseResolver', () => {
functionName: 'register',
abi: abiDBResolver,
args: [
encodedName,
owner.address,
300n,
zeroHash,
resolver,
[],
false,
0,
zeroHash,
{
name: encodedName,
owner: owner.address,
duration: 300n,
secret: zeroHash,
resolver,
data: [],
reverseRecord: false,
fuses: 0,
extraData: zeroHash,
},
],
universalResolverAddress,
signer: owner,
Expand All @@ -442,15 +448,17 @@ describe('DatabaseResolver', () => {
functionName: 'register',
abi: abiDBResolver,
args: [
encodedName,
newOwner.address,
300n,
zeroHash,
resolver,
[],
false,
0,
zeroHash,
{
name: encodedName,
owner: newOwner.address,
duration: 300n,
secret: zeroHash,
resolver,
data: [],
reverseRecord: false,
fuses: 0,
extraData: zeroHash,
},
],
universalResolverAddress,
signer: newOwner,
Expand Down Expand Up @@ -486,15 +494,17 @@ describe('DatabaseResolver', () => {
functionName: 'register',
abi: abiDBResolver,
args: [
encodedName,
newOwner,
300n,
zeroHash,
resolver,
[],
false,
0,
zeroHash,
{
name: encodedName,
owner: newOwner,
duration: 300n,
secret: zeroHash,
resolver,
data: [],
reverseRecord: false,
fuses: 0,
extraData: zeroHash,
},
],
universalResolverAddress,
signer: owner,
Expand Down
2 changes: 1 addition & 1 deletion packages/gateway/src/abi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const abi: string[] = [
'function setPubkey(bytes32 node,bytes32 x, bytes32 y)',
'function pubkey(bytes32 node) external view returns (bytes32 x, bytes32 y)',
'function getStorageSlots(address addr, bytes32[] memory commands, bytes[] memory) external view returns(bytes memory witness)',
'function register(bytes calldata name, address owner, uint256 duration, bytes32 secret, address resolver, bytes[] calldata data, bool reverseRecord, uint16 fuses, bytes memory extraData)',
'function register((bytes name,address owner,uint256 duration,bytes32 secret,address resolver,bytes[] data,bool reverseRecord,uint16 fuses,bytes extraData))',
'function transfer(bytes32 node, address owner)',
'function multicall(bytes[] calldata data) external returns (bytes[] memory results)',
]
4 changes: 2 additions & 2 deletions packages/gateway/src/handlers/domain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ export function withRegisterDomain(
repo: WriteRepository & ReadRepository,
): ccip.HandlerDescription {
return {
type: 'register(bytes calldata name, address owner, uint256 duration, bytes32 secret, address resolver, bytes[] calldata data, bool reverseRecord, uint16 fuses, bytes memory extraData)',
type: 'register((bytes name,address owner,uint256 duration,bytes32 secret,address resolver,bytes[] data,bool reverseRecord,uint16 fuses,bytes extraData))',
func: async (
{ name, duration: ttl, owner, data },
[[name, owner, ttl, , , data]],
{ signature }: { signature: TypedSignature },
) => {
try {
Expand Down

0 comments on commit a2b31be

Please sign in to comment.