Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add register commit without namewrapper #220

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
d56b414
add legacy register name functions
storywithoutend Dec 16, 2024
db176b4
fix and add tests
storywithoutend Dec 18, 2024
0aef6bf
add export code
storywithoutend Dec 18, 2024
d548d95
add prelease changeset
storywithoutend Dec 19, 2024
00e52b0
add minor changeset
storywithoutend Dec 20, 2024
78211a9
revert to before changeset pre enter command
storywithoutend Jan 7, 2025
f63d308
Revert "revert to before changeset pre enter command"
storywithoutend Jan 7, 2025
bcbdd64
revert changeset changes
storywithoutend Jan 7, 2025
d5615f5
revert changeset changes
storywithoutend Jan 7, 2025
8890de9
fix typo in release.yml
storywithoutend Jan 7, 2025
a9c1192
update release.yml for prerelease
storywithoutend Jan 7, 2025
688e6f0
v4.0.3-alpha.0
github-actions[bot] Jan 7, 2025
f530c91
add more abi snippet for ethcontroller and legacyethcontroller
storywithoutend Jan 9, 2025
984d63a
refactor and split out legacyregistration and legacyregistraionwithco…
storywithoutend Jan 10, 2025
9fc9aba
update legacyRegisterHelpers test
storywithoutend Jan 10, 2025
9e63758
fix lint error
storywithoutend Jan 10, 2025
951874e
v4.0.3-alpha.11
github-actions[bot] Jan 10, 2025
930cf26
refactor legacyRegisterName
storywithoutend Jan 13, 2025
5e345df
Merge branch 'add-register-commit-without-namewrapper' of https://git…
storywithoutend Jan 13, 2025
28c004b
fix typo in legacyEthEthRegistrarControllerNameRegisteredEventSnippet
storywithoutend Jan 13, 2025
ae1199f
Merge branch 'main' into add-register-commit-without-namewrapper
storywithoutend Jan 13, 2025
5397a10
v4.0.3-alpha.12
github-actions[bot] Jan 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Prerelease

on:
release:
types: [published]
jobs:
release:
name: Release
permissions:
id-token: write
contents: write
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.release.target_commitish }}

- uses: pnpm/action-setup@v4
with:
version: 9.4.0

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- run: pnpm install --frozen-lockfile

- name: Set up git
run: |
git config --local user.email '41898282+github-actions[bot]@users.noreply.github.com'
git config --local user.name 'github-actions[bot]'

- name: Bump version to ${{ github.event.release.tag_name }}
run: |
pnpm -F @ensdomains/ensjs ver ${{ github.event.release.tag_name }}
git add .
git commit -m "${{ github.event.release.tag_name }}"

- name: Publish
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
run: |
pnpm config set //registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}
pnpm -F @ensdomains/ensjs publish --tag next --no-git-checks

- name: Push changes
run: git push
env:
github-token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"publish:local:ens-test-env": "yalc publish packages/ens-test-env --push --up",
"publish:local:ensjs": "yalc publish packages/ensjs --push --up",
"chgset:version": "changeset version && pnpm install",
"chgset:version:prerelease": "changeset pre enter next && pnpm chgset:version",
"chgset:run": "changeset",
"release": "pnpm publish -r --access public && changeset tag",
"chgset": "pnpm chgset:run && pnpm chgset:version"
Expand Down
2 changes: 1 addition & 1 deletion packages/ensjs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ensdomains/ensjs",
"version": "4.0.2",
"version": "4.0.3-alpha.12",
"description": "ENS javascript library for contract interaction",
"type": "module",
"main": "./dist/cjs/index.js",
Expand Down
28 changes: 28 additions & 0 deletions packages/ensjs/src/contracts/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ export const supportedContracts = [
'ensRegistry',
'ensReverseRegistrar',
'ensUniversalResolver',
'legacyEthRegistrarController',
'legacyPublicResolver',
] as const

export type SupportedChain = (typeof supportedChains)[number]
Expand Down Expand Up @@ -55,6 +57,12 @@ export const addresses = {
ensUniversalResolver: {
address: '0xce01f8eee7E479C928F8919abD53E553a36CeF67',
},
legacyEthRegistrarController: {
address: '0x283Af0B28c62C092C9727F1Ee09c02CA627EB7F5',
},
legacyPublicResolver: {
address: '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41',
},
},
5: {
ensBaseRegistrarImplementation: {
Expand Down Expand Up @@ -87,6 +95,12 @@ export const addresses = {
ensUniversalResolver: {
address: '0x898A1182F3C2BBBF0b16b4DfEf63E9c3e9eB4821',
},
legacyEthRegistrarController: {
address: '0x283Af0B28c62C092C9727F1Ee09c02CA627EB7F5',
},
legacyPublicResolver: {
address: '0xDaaF96c344f63131acadD0Ea35170E7892d3dfBA',
},
},
17000: {
ensBaseRegistrarImplementation: {
Expand Down Expand Up @@ -119,6 +133,12 @@ export const addresses = {
ensUniversalResolver: {
address: '0xa6ac935d4971e3cd133b950ae053becd16fe7f3b',
},
legacyEthRegistrarController: {
address: '0xf13fC748601fDc5afA255e9D9166EB43f603a903',
},
legacyPublicResolver: {
address: '0xc5e43b622b5e6C379a984E9BdB34E9A545564fA5',
},
},
11155111: {
ensBaseRegistrarImplementation: {
Expand Down Expand Up @@ -151,6 +171,12 @@ export const addresses = {
ensUniversalResolver: {
address: '0xc8af999e38273d658be1b921b88a9ddf005769cc',
},
legacyEthRegistrarController: {
address: '0x7e02892cfc2Bfd53a75275451d73cF620e793fc0',
},
legacyPublicResolver: {
address: '0x0CeEC524b2807841739D3B5E161F5bf1430FFA48',
},
},
} as const satisfies Record<
SupportedChain,
Expand Down Expand Up @@ -195,6 +221,8 @@ type EnsChainContracts = {
ensReverseRegistrar: ChainContract
ensBulkRenewal: ChainContract
ensDnssecImpl: ChainContract
legacyEthRegistrarController: ChainContract
legacyPublicResolver: ChainContract
}

type BaseChainContracts = {
Expand Down
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,
} from './legacyEthRegistrarController.js'
export {
multicallGetCurrentBlockTimestampSnippet,
multicallTryAggregateSnippet,
Expand Down
Loading