Skip to content

Commit

Permalink
feat: dnssec oracle update
Browse files Browse the repository at this point in the history
  • Loading branch information
TateB committed Jan 11, 2024
1 parent 5e1f6ca commit c678dc0
Show file tree
Hide file tree
Showing 9 changed files with 129 additions and 315 deletions.
120 changes: 0 additions & 120 deletions packages/ensjs/deploy/01_legacy_dnsregistrar.cjs

This file was deleted.

4 changes: 2 additions & 2 deletions packages/ensjs/src/contracts/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const addresses = {
address: '0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85',
},
ensDnsRegistrar: {
address: '0x537625B0D7901FD20C57850d61580Bf1624Ef146',
address: '0x5a07C75Ae469Bf3ee2657B588e8E6ABAC6741b4f',
},
ensEthRegistrarController: {
address: '0xFED6a969AaA60E4961FCD3EBF1A2e8913ac65B72',
Expand All @@ -120,7 +120,7 @@ export const addresses = {
address: '0x4EF77b90762Eddb33C8Eba5B5a19558DaE53D7a1',
},
ensDnssecImpl: {
address: '0x7b3ada1c8f012bae747cf99d6cbbf70d040b84cf',
address: '0xe62E4b6cE018Ad6e916fcC24545e20a33b9d8653',
},
ensUniversalResolver: {
address: '0xBaBC7678D7A63104f1658c11D6AE9A21cdA09725',
Expand Down
73 changes: 65 additions & 8 deletions packages/ensjs/src/contracts/dnsRegistrar.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,66 @@
export const dnsRegistrarErrors = [
{
inputs: [
{
internalType: 'bytes',
name: 'name',
type: 'bytes',
},
],
name: 'InvalidPublicSuffix',
type: 'error',
},
{
inputs: [],
name: 'NoOwnerRecordFound',
type: 'error',
},
{
inputs: [
{
internalType: 'uint256',
name: 'offset',
type: 'uint256',
},
{
internalType: 'uint256',
name: 'length',
type: 'uint256',
},
],
name: 'OffsetOutOfBoundsError',
type: 'error',
},
{
inputs: [
{
internalType: 'address',
name: 'caller',
type: 'address',
},
{
internalType: 'address',
name: 'owner',
type: 'address',
},
],
name: 'PermissionDenied',
type: 'error',
},
{
inputs: [],
name: 'PreconditionNotMet',
type: 'error',
},
{
inputs: [],
name: 'StaleProof',
type: 'error',
},
] as const

export const dnsRegistrarProveAndClaimSnippet = [
...dnsRegistrarErrors,
{
inputs: [
{
Expand All @@ -19,10 +81,6 @@ export const dnsRegistrarProveAndClaimSnippet = [
name: 'input',
type: 'tuple[]',
},
{
name: 'proof',
type: 'bytes',
},
],
name: 'proveAndClaim',
outputs: [],
Expand All @@ -32,6 +90,7 @@ export const dnsRegistrarProveAndClaimSnippet = [
] as const

export const dnsRegistrarProveAndClaimWithResolverSnippet = [
...dnsRegistrarErrors,
{
inputs: [
{
Expand All @@ -41,21 +100,19 @@ export const dnsRegistrarProveAndClaimWithResolverSnippet = [
{
components: [
{
internalType: 'bytes',
name: 'rrset',
type: 'bytes',
},
{
internalType: 'bytes',
name: 'sig',
type: 'bytes',
},
],
name: 'input',
type: 'tuple[]',
},
{
name: 'proof',
type: 'bytes',
},
{
name: 'resolver',
type: 'address',
Expand Down
32 changes: 17 additions & 15 deletions packages/ensjs/src/contracts/dnssecImpl.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
export const dnssecImplRrDataSnippet = [
export const dnssecImplVerifyRrSetSnippet = [
{
inputs: [
{
name: 'dnstype',
type: 'uint16',
},
{
name: 'name',
type: 'bytes',
components: [
{
name: 'rrset',
type: 'bytes',
},
{
name: 'sig',
type: 'bytes',
},
],
name: 'input',
type: 'tuple[]',
},
],
name: 'rrdata',
name: 'verifyRRSet',
outputs: [
{
name: '',
type: 'uint32',
name: 'rrs',
type: 'bytes',
},
{
name: '',
name: 'inception',
type: 'uint32',
},
{
name: '',
type: 'bytes20',
},
],
stateMutability: 'view',
type: 'function',
Expand Down
3 changes: 2 additions & 1 deletion packages/ensjs/src/contracts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@ export {
type WalletWithEns,
} from './consts.js'
export {
dnsRegistrarErrors,
dnsRegistrarProveAndClaimSnippet,
dnsRegistrarProveAndClaimWithResolverSnippet,
} from './dnsRegistrar.js'
export {
dnssecImplAnchorsSnippet,
dnssecImplRrDataSnippet,
dnssecImplVerifyRrSetSnippet,
} from './dnssecImpl.js'
export { erc165SupportsInterfaceSnippet } from './erc165.js'
export {
Expand Down
Loading

0 comments on commit c678dc0

Please sign in to comment.