Skip to content

Commit

Permalink
add more abi snippet for ethcontroller and legacyethcontroller
Browse files Browse the repository at this point in the history
  • Loading branch information
storywithoutend committed Jan 9, 2025
1 parent 688e6f0 commit f530c91
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 11 deletions.
41 changes: 41 additions & 0 deletions packages/ensjs/src/contracts/ethRegistrarController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,3 +206,44 @@ export const ethRegistrarControllerRenewSnippet = [
type: 'function',
},
] as const

export const ethRegistrarControllerNameRegisteredEventSnippet = [
{
anonymous: false,
inputs: [
{
indexed: false,
name: 'name',
type: 'string',
},
{
indexed: true,
name: 'label',
type: 'bytes32',
},
{
indexed: true,
internalType: 'address',
name: 'owner',
type: 'address',
},
{
indexed: false,
name: 'baseCost',
type: 'uint256',
},
{
indexed: false,
name: 'premium',
type: 'uint256',
},
{
indexed: false,
name: 'expires',
type: 'uint256',
},
],
name: 'NameRegistered',
type: 'event',
},
] as const
15 changes: 15 additions & 0 deletions packages/ensjs/src/contracts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,23 @@ export {
ethRegistrarControllerRegisterSnippet,
ethRegistrarControllerRenewSnippet,
ethRegistrarControllerRentPriceSnippet,
ethRegistrarControllerNameRegisteredEventSnippet,
} from './ethRegistrarController.js'
export { getChainContractAddress } from './getChainContractAddress.js'
export {
legacyEthRegistrarControllerAvailableSnippet,
legacyEthRegistrarControllerCommitSnippet,
legacyEthRegistrarControllerCommitmentsSnippet,
legacyEthRegistrarControllerMakeCommitmentSnippet,
legacyEthRegistrarControllerMakeCommitmentWithConfigSnippet,
legacyEthRegistrarControllerRegisterSnippet,
legacyEthRegistrarControllerRegisterWithConfigSnippet,
legacyEthRegistrarControllerRenewSnippet,
legacyEthRegistrarControllerRentPriceSnippet,
legacyEthRegistrarControllerSupportsInterfaceSnippet,
legacyEthRegistrarControllerTransferOwnershipSnippet,
legacyEthRegistrarControllerNameRegisteredEventSnippet as legacyNameRegisteredEventSnippet,
} from './legacyEthRegistrarController.js'
export {
multicallGetCurrentBlockTimestampSnippet,
multicallTryAggregateSnippet,
Expand Down
57 changes: 46 additions & 11 deletions packages/ensjs/src/contracts/legacyEthRegistrarController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const legacyEthRegistrarControllerAvailableSnippet = [
stateMutability: 'view',
type: 'function',
},
]
] as const

export const legacyEthRegistrarControllerCommitSnippet = [
{
Expand All @@ -20,7 +20,7 @@ export const legacyEthRegistrarControllerCommitSnippet = [
stateMutability: 'nonpayable',
type: 'function',
},
]
] as const

export const legacyEthRegistrarControllerCommitmentsSnippet = [
{
Expand All @@ -32,7 +32,7 @@ export const legacyEthRegistrarControllerCommitmentsSnippet = [
stateMutability: 'view',
type: 'function',
},
]
] as const

export const legacyEthRegistrarControllerMakeCommitmentSnippet = [
{
Expand All @@ -48,7 +48,7 @@ export const legacyEthRegistrarControllerMakeCommitmentSnippet = [
stateMutability: 'pure',
type: 'function',
},
]
] as const

export const legacyEthRegistrarControllerMakeCommitmentWithConfigSnippet = [
{
Expand All @@ -66,7 +66,7 @@ export const legacyEthRegistrarControllerMakeCommitmentWithConfigSnippet = [
stateMutability: 'pure',
type: 'function',
},
]
] as const

export const legacyEthRegistrarControllerRegisterSnippet = [
{
Expand All @@ -83,7 +83,7 @@ export const legacyEthRegistrarControllerRegisterSnippet = [
stateMutability: 'payable',
type: 'function',
},
]
] as const

export const legacyEthRegistrarControllerRegisterWithConfigSnippet = [
{
Expand All @@ -102,7 +102,7 @@ export const legacyEthRegistrarControllerRegisterWithConfigSnippet = [
stateMutability: 'payable',
type: 'function',
},
]
] as const

export const legacyEthRegistrarControllerRenewSnippet = [
{
Expand All @@ -117,7 +117,7 @@ export const legacyEthRegistrarControllerRenewSnippet = [
stateMutability: 'payable',
type: 'function',
},
]
] as const

export const legacyEthRegistrarControllerRentPriceSnippet = [
{
Expand All @@ -132,7 +132,7 @@ export const legacyEthRegistrarControllerRentPriceSnippet = [
stateMutability: 'view',
type: 'function',
},
]
] as const

export const legacyEthRegistrarControllerSupportsInterfaceSnippet = [
{
Expand All @@ -144,7 +144,7 @@ export const legacyEthRegistrarControllerSupportsInterfaceSnippet = [
stateMutability: 'pure',
type: 'function',
},
]
] as const

export const legacyEthRegistrarControllerTransferOwnershipSnippet = [
{
Expand All @@ -156,4 +156,39 @@ export const legacyEthRegistrarControllerTransferOwnershipSnippet = [
stateMutability: 'nonpayable',
type: 'function',
},
]
] as const

export const legacyEthRegistrarControllerNameRegisteredEventSnippet = [
{
anonymous: false,
inputs: [
{ indexed: false, internalType: 'string', name: 'name', type: 'string' },
{
indexed: true,
internalType: 'bytes32',
name: 'label',
type: 'bytes32',
},
{
indexed: true,
internalType: 'address',
name: 'owner',
type: 'address',
},
{
indexed: false,
internalType: 'uint256',
name: 'cost',
type: 'uint256',
},
{
indexed: false,
internalType: 'uint256',
name: 'expires',
type: 'uint256',
},
],
name: 'NameRegistered',
type: 'event',
},
] as const

0 comments on commit f530c91

Please sign in to comment.