Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
a10cf39
add .gitattributes file
Whytecrowe Mar 20, 2025
e5c6bb6
renormalize line endings in the repo
Whytecrowe Mar 20, 2025
38f7ce9
make pausable registry
Whytecrowe Mar 21, 2025
964d7c6
rework pause functionality for Registry from inheritance to direct fe…
Whytecrowe Mar 22, 2025
90e58cd
modify logger file to add new env var that block log file creation
Whytecrowe Mar 22, 2025
8d268c9
create storage validation helpers
Whytecrowe Mar 22, 2025
7951552
create main upgrade helper
Whytecrowe Mar 22, 2025
1d1e8f5
create basic smoke test
Whytecrowe Mar 22, 2025
f801ef3
add missing modifiers to pause functions in Registry
Whytecrowe Mar 24, 2025
28af0bb
create DomainTokenPausable
Whytecrowe Mar 24, 2025
7161066
switch console log for proper logger call
Whytecrowe Mar 24, 2025
d58ccc2
add TreasuryPausable
Whytecrowe Mar 24, 2025
3f2aec2
add RootRegistrarPausable and SubRegistrarPausable
Whytecrowe Mar 24, 2025
fc15bc5
add proper contract name to revert messages in TreasuryPausable
Whytecrowe Mar 24, 2025
bc1c829
add CurvePricePausable and FixedPricerPausable
Whytecrowe Mar 24, 2025
fb1239a
add AddressResolverPausable
Whytecrowe Mar 24, 2025
1c7c6eb
add ARegistryWiredPausable, change all type imports to new Pausable o…
Whytecrowe Mar 24, 2025
f20ecac
remove pause locks on onlyAdmin functions in Registry
Whytecrowe Mar 24, 2025
7acd98c
add overrides of ERC721 functions to DomainToken to lock approvals an…
Whytecrowe Mar 24, 2025
9c598cf
refactor interfaces to inherit from a single IZNSPausable and have le…
Whytecrowe Mar 25, 2025
9bd7662
add many crucial tests for every contract + test for domain path pre …
Whytecrowe Mar 26, 2025
37ba878
add some comments and rename vars
Whytecrowe Mar 26, 2025
87d1159
add code for database updates
Whytecrowe Mar 26, 2025
92a591f
integrate db update code into the upgrade helper
Whytecrowe Mar 26, 2025
e7086a5
add database tests
Whytecrowe Mar 26, 2025
160ec3a
update getMongoAdapter() to return existing adapter if not reset thro…
Whytecrowe Mar 27, 2025
87915e4
create contract data generator helpers and update upgrade helpers and…
Whytecrowe Mar 27, 2025
e726ec9
create top level execute-upgrade script
Whytecrowe Mar 27, 2025
9e5caad
remove .only
Whytecrowe Mar 27, 2025
a8a24e1
remove defender code from running the campaign
Whytecrowe Mar 28, 2025
4f2bb39
add multi db update function
Whytecrowe Mar 28, 2025
e5ffb1d
move executable scripts to their own folder
Whytecrowe Mar 28, 2025
4427d0d
create scripts to get implementation addresses and a separate script …
Whytecrowe Mar 28, 2025
a66a8a0
fix-extend storage data and upgrade helpers
Whytecrowe Mar 28, 2025
5fc419e
add test to verify implementation addresses
Whytecrowe Mar 28, 2025
0e6af10
switch to proper logger in storage data helper, add new db update hel…
Whytecrowe Mar 28, 2025
358dc26
modify registration helpers to accept confirmation number so they can…
Whytecrowe Mar 28, 2025
7592b40
add exception to storage data helper
Whytecrowe Mar 28, 2025
bca2d53
make current test be able to run on actual networks
Whytecrowe Mar 28, 2025
5a40555
update db and upgrade helpers to instead write to a new Upgraded vers…
Whytecrowe Mar 29, 2025
af2fd27
fix test for new changes
Whytecrowe Mar 29, 2025
da9d5f8
update storage checker script to acquire full diff before throwing error
Whytecrowe Mar 31, 2025
e44f956
extend db update script to also verify new implementations
Whytecrowe Mar 31, 2025
8ed4c24
fix tests that use mongo adapter by resetting it in the appropriate p…
Whytecrowe Mar 31, 2025
da621d2
linter fixes
Whytecrowe Apr 1, 2025
78b35d9
make dbAdapter only drop when network is hardhat
Whytecrowe Apr 1, 2025
09386dc
small fix
Whytecrowe Apr 1, 2025
630a483
Revert "make dbAdapter only drop when network is hardhat"
Whytecrowe Apr 1, 2025
e666cae
skip pausable contracts from solidity coverage
Whytecrowe Apr 1, 2025
4241323
fix solcover config
Whytecrowe Apr 2, 2025
00337a2
Update .gitignore
MichaelKorchagin Apr 14, 2025
789826d
Gitignore update
MichaelKorchagin Apr 14, 2025
5f45fe1
add `whenNotPaused` to new RootRegistrar to prevent possible calls to…
Whytecrowe Apr 14, 2025
98b1806
add pause() to the IZNSPausable interface
Whytecrowe Apr 14, 2025
531df2a
change virtual to override for all paused() instances
Whytecrowe Apr 14, 2025
5c9c339
Merge branch 'upgrade-system-lock' of https://github.com/zer0-os/zNS …
Whytecrowe Apr 14, 2025
98d7535
simplify db helpers
Whytecrowe Apr 14, 2025
73f7ba6
fix test
Whytecrowe Apr 14, 2025
8a89546
change test name
Whytecrowe Apr 14, 2025
46f1024
WIP reconfigure to simplify process and reduce queries
JamesEarle Apr 16, 2025
113e547
WIP more changes, some EOL
JamesEarle Apr 16, 2025
321b8f3
Added withdrawal function for the Treasury contract. Added `onlyGover…
MichaelKorchagin Apr 17, 2025
5828a6b
run script against all users and additional validation to identify sp…
JamesEarle Apr 17, 2025
d64f0fc
Added function which use governorn address to withdraw funds from upg…
MichaelKorchagin Apr 19, 2025
b269b9c
[v1.0] Upgrade to pausable contracts and system lock (#130)
Whytecrowe May 27, 2025
36bca1f
remove redundant modifier from AAccessControlled and do a direct admi…
Whytecrowe May 28, 2025
c65ee26
change to way to read and structure database calls in 01 script for v…
JamesEarle May 28, 2025
6ad1dc1
resolve merge conflict in .gitignore
JamesEarle May 28, 2025
b19b75c
rename and improve the withdrawal script
Whytecrowe May 28, 2025
8d5efca
extend tests
Whytecrowe May 28, 2025
226e9e1
Merge branch 'support/v1.0' into mike1/cpt-96-withdrawal-of-staked-fu…
Whytecrowe May 28, 2025
bfaa931
[v1.0] Withdrawal of staked funds from znstreasury using governor (#134)
Whytecrowe May 29, 2025
53ce619
Merge branch 'support/v1.0' into migration-code
JamesEarle May 29, 2025
08315e1
remove invalid marker for split ownership domains, general flow for r…
JamesEarle May 29, 2025
bd68f19
add reference to constants
JamesEarle May 29, 2025
0eef123
delete unused imports
JamesEarle May 29, 2025
209f2a0
comment out private key used in HH config mainnet
JamesEarle May 29, 2025
14ccd0b
lint in CI fixes
JamesEarle May 29, 2025
c5c96a7
add ts eslint disable as well
JamesEarle May 29, 2025
4d45eb3
change in validate script for parens
JamesEarle May 29, 2025
4ecabb5
[v1.0] Domain data aggregation and validation for use in the migratio…
Whytecrowe May 29, 2025
f50abbb
linter fixes
Whytecrowe Jun 4, 2025
1a53cac
update axios to safe version
Whytecrowe Jun 4, 2025
0c213ed
update query and move env checks to be ahead of long running validati…
JamesEarle Jun 9, 2025
71f3df3
comment out mainnet key for CI
JamesEarle Jun 9, 2025
e80aad2
add id to query as well
JamesEarle Jun 9, 2025
266d11a
make DB name error clearer
Whytecrowe Jun 23, 2025
d056d66
Update query to also get payment data in validation (#140)
Whytecrowe Jun 23, 2025
dce09e2
remove redundant registration scripts that should go to a different b…
Whytecrowe Jun 23, 2025
e47f523
fix integration test
Whytecrowe Jun 25, 2025
c757485
fix upgrade scripts
Whytecrowe Jun 25, 2025
a3d0293
add scripts for pausing and checking pause
Whytecrowe Jun 25, 2025
0288a6d
remove redundant import
Whytecrowe Jun 25, 2025
9afbeea
add scripts to renounce roles for deployer acc after the upgrade
Whytecrowe Jun 25, 2025
d26819c
small fixes for domain data scripts
Whytecrowe Jun 26, 2025
01cd56c
avoid redundant checks
Whytecrowe Jun 26, 2025
7fa6140
better resolution on parentHash, check both props in case revoked domain
JamesEarle Jun 27, 2025
9814349
remove debug script for testing
JamesEarle Jun 27, 2025
4c87e75
update query for additional parent information for domains at multipl…
JamesEarle Jun 28, 2025
cca073a
update query and rerun script, additional comment on needed vars
JamesEarle Jul 1, 2025
cbd19d8
rerun script, update subgraph query, add additional env var comment
JamesEarle Jul 1, 2025
5a977b2
Merge branch 'support/v1.0' into v1.0/validation-additions
JamesEarle Jul 1, 2025
a523fb7
small fixes for the validation
Whytecrowe Jul 1, 2025
9d5533c
Merge branch 'support/v1.0' into v1.0/validation-additions
Whytecrowe Jul 1, 2025
d7637dc
fix for hh config
Whytecrowe Jul 2, 2025
ebb701c
linter fixes
Whytecrowe Jul 2, 2025
63d094e
rerun script, update subgraph query, add additional env var comment (…
Whytecrowe Jul 2, 2025
e5acb45
compareStorageData does not support appended state variables in upgra…
Whytecrowe Jul 22, 2025
05aaae9
Fix - GraphQL response Errors from Subgraph are not handled
JamesEarle Jul 23, 2025
fbd93d5
Fix - Improve error handling and validation for insertMany on MongoDB…
JamesEarle Jul 23, 2025
dc25cfd
ZNS v1.0 Audit Fixes (#151)
Whytecrowe Jul 24, 2025
208593c
Merge branch 'support/v1.0' into v1/audit-fixes-1
Whytecrowe Jul 24, 2025
82ae45c
remove indentation in readContractStorage
Whytecrowe Jul 28, 2025
b6d0460
[V1] Audit Fixed (Kirill) (#148)
Whytecrowe Jul 28, 2025
2477ead
two extra env vars for clarity, change names in package.json of scrip…
JamesEarle Aug 5, 2025
7c9be93
issue updating db entry for versioning after verifying
JamesEarle Aug 7, 2025
7562b23
some bug fixes for db update
Whytecrowe Aug 7, 2025
da769a0
update withdrawStake script and make it executable
Whytecrowe Aug 8, 2025
8d3700a
comment out networks in HH config
Whytecrowe Aug 8, 2025
5c0f1d9
split withdrawStaked function from the execution script
Whytecrowe Aug 8, 2025
7f0d8f4
fix awaiter in withdrawStaked
Whytecrowe Aug 8, 2025
2af1b2d
Minor additions for clarity (#153)
Whytecrowe Aug 8, 2025
eeadb7f
create script for token airdrop after migration, improve comments in …
JamesEarle Aug 15, 2025
0f7b0be
minor changes for var naming, removing some unnecessary code
JamesEarle Aug 15, 2025
90e18b3
fix linter and typos
JamesEarle Aug 15, 2025
9be95e1
Migration Airdrop (#155)
Whytecrowe Aug 15, 2025
2e5394a
modify to only refund users that paid with stakes
JamesEarle Aug 18, 2025
baf0ca2
Merge branch 'support/v1.0' into v1.0/migration-airdrop
JamesEarle Aug 18, 2025
4385b31
tracker for token totals
JamesEarle Aug 18, 2025
56b4b90
Merge branch 'v1.0/migration-airdrop' of https://github.com/zer0-os/z…
JamesEarle Aug 18, 2025
534b3dd
linter
JamesEarle Aug 18, 2025
f841eff
update to remove from user-specific checks
JamesEarle Aug 18, 2025
0c28177
Minor change to only refund stakers (#157)
Whytecrowe Aug 19, 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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ orbs:
defaults: &defaults
working_directory: ~/repo
docker:
- image: cimg/node:18.15.0
- image: cimg/node:18.18.0
- image: mongo:7.0.0-rc5-jammy

jobs:
Expand Down
14 changes: 12 additions & 2 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,32 @@ SEPOLIA_RPC_URL=
# ENV vars for MongoDB, for local development you can use below
MONGO_DB_URI="mongodb://localhost:27018"
MONGO_DB_NAME="zns-campaign"

# Optional params for Mongo Client class specifically
MONGO_DB_CLIENT_OPTS=

# This is crucial based on the DB behaviour you want. MongoAdapter will create a new DB version if this is NOT passed
# and it will use existing version if specified. If you want to deploy from scratch, do not supply and the previous
# versioned data will be wiped out.
# If you wish to save the previous data and write a new version on top, look at the next ENV var.
MONGO_DB_VERSION=

# This is crucial to saving the data written in previous DB (DEPLOYED) version.
# If this is not passed or passed as "false", previous DB data will be wiped out.
# If you want to save the previous contract data in DB, set this to "true"!
ARCHIVE_PREVIOUS_DB_VERSION="true" | "false"

# ENV vars for Logger
LOG_LEVEL="debug" | "info" | "warn" | "error
LOG_LEVEL="debug" | "info" | "warn" | "error"

# Removes logger output and does not write to file as well
SILENT_LOGGER="false" | "true"

# Boolean value for if we deploy the mock
# true = we deploy the mock
# false = we use a hard coded address and pull data from chain
MOCK_MEOW_TOKEN=

# Address of the MEOW Token deployed to the network PRIOR to running Campaign or any other EXISTING token
# This is only used if MOCK_MEOW_TOKEN is set to false (`test` and `prod` environments)
STAKING_TOKEN_ADDRESS=
Expand All @@ -42,7 +47,6 @@ MAX_PRICE=
MIN_PRICE=
MAX_LENGTH=
BASE_LENGTH=

DECIMALS=
PRECISION=
PROTOCOL_FEE_PERC=
Expand All @@ -65,6 +69,7 @@ ADMIN_ADDRESSES=
MONITOR_CONTRACTS="false"
VERIFY_CONTRACTS="false"

# For using OpenZeppelin Defender for deployment
DEFENDER_KEY=
DEFENDER_SECRET=
RELAYER_KEY=
Expand All @@ -81,3 +86,8 @@ TENDERLY_ACCOUNT_ID="zer0-os"
# Below are used only for the `deploy:devnet` script (for testing new logic) NOT RELATED TO THE DEPLOY CAMPAIGN !
TENDERLY_DEVNET_TEMPLATE="zns-devnet"
DEVNET_RPC_URL=

# If executing the migration scripts, you must also specify
# the below to specify a different database to write data too
MONGO_DB_URI_WRITE=
MONGO_DB_NAME_WRITE=
5 changes: 3 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
"no-console": "off",
"no-shadow": "warn",
"@typescript-eslint/no-shadow": "warn",
"no-invalid-this": "off"
"no-invalid-this": "off",
"jsdoc/newline-after-description": "off"
// "@typescript-eslint/no-unused-vars": "off" // For debugging
}
}
]
}
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
node_modules
.env
*.env*
coverage
coverage.json
typechain
typechain-types
.idea
.vscode
dist
*.log

# Hardhat files
cache
Expand All @@ -19,3 +22,5 @@ docker*.tgz

# We don't ever use the generated manifests
.openzeppelin

output
3 changes: 2 additions & 1 deletion .solcover.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module.exports = {
skipFiles: [
'utils/StringUtils.sol',
'token/mocks',
'upgrade-test-mocks'
'upgrade-test-mocks',
'zns-pausable'
]
};
4 changes: 2 additions & 2 deletions .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"rules": {
"compiler-version": [
"error",
"^0.8.18"
"0.8.18"
],
"not-rely-on-time": "off",
"no-inline-assembly": "off",
Expand All @@ -24,4 +24,4 @@
"max-line-length": ["error", 120],
"custom-errors": "off"
}
}
}
21 changes: 21 additions & 0 deletions contracts/zns-pausable/IZNSPausable.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;


interface IZNSPausable {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);

/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);

function pause() external;

function unpause() external;

function paused() external view returns (bool);
}
8 changes: 8 additions & 0 deletions contracts/zns-pausable/price/IZNSCurvePricerPausable.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;

import { IZNSCurvePricer } from "../../price/IZNSCurvePricer.sol";
import { IZNSPausable } from "../IZNSPausable.sol";


interface IZNSCurvePricerPausable is IZNSCurvePricer, IZNSPausable {}
8 changes: 8 additions & 0 deletions contracts/zns-pausable/price/IZNSFixedPricerPausable.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;

import { IZNSFixedPricer } from "../../price/IZNSFixedPricer.sol";
import { IZNSPausable } from "../IZNSPausable.sol";


interface IZNSFixedPricerPausable is IZNSFixedPricer, IZNSPausable {}
Loading