Skip to content

Commit

Permalink
build: remove @ensdomains/contracts from dependencies
Browse files Browse the repository at this point in the history
it's not needed, since it's 100% static information that can be copied in as well.
  • Loading branch information
jtakalai committed Oct 4, 2024
1 parent 0807438 commit 933167d
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion packages/network-contracts/build.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
#!/bin/bash
set -ex

rm -rf artifacts
hardhat compile
cp ../../node_modules/@ensdomains/ens-contracts/deployments/archive/PublicResolver_mainnet_9412610.sol/PublicResolver_mainnet_9412610.json artifacts/PublicResolver_mainnet_9412610.json

rm -rf dist
tsc -p tsconfig.build.json

# this requires a running Docker daemon
./generateSelectorsTxt.sh
if docker ps > /dev/null 2>&1; then
./generateSelectorsTxt.sh
else
echo "Docker is not running, skipping generateSelectorsTxt.sh"
fi
2 changes: 1 addition & 1 deletion packages/network-contracts/codehashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"maxOperatorsJoinPolicyCodehash": "0xa9e01518e32ea611e3ac566171fcf65a37540d9b7a6d8fe2801c8f5c503c2cf3",
"stakeWeightedAllocationPolicyCodehash": "0xfc291761d4e5e8951b93239dfcc917471b2186c8adc52a6a116d291cba9e27b6",
"defaultLeavePolicyCodehash": "0x56014e2bf6f67ec57ceeae6975985795f730fa127efcd5564a66744dc0bad669",
"voteKickPolicyCodehash": "0x5087938193f210589222292747b00521044bfc698ecd61e8d041cbabb6d3fa92",
"voteKickPolicyCodehash": "0xe74fbdd03535f9de59363c32d9cd4214ff5c89ba29b959fb783f29319067d186",
"defaultDelegationPolicyCodehash": "0x6ca95b0397edfc40bc945e6387f519d15e10d9fd506102ca34c670a7b7827ae3",
"defaultExchangeRatePolicyCodehash": "0x7599e05762b64f68c7c14a11725c701b02fa0db0bfcff1be76ba4fb55772e57d",
"defaultUndelegationPolicyCodehash": "0x01fea87a6509e5413bcf76ec87d021aa9689e7e9fc90166962e7e4573e9c1cbe",
Expand Down
1 change: 1 addition & 0 deletions packages/network-contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ const config: HardhatUserConfig = {
"@ensdomains/ens-contracts/contracts/registry/ENS.sol",
"@ensdomains/ens-contracts/contracts/registry/FIFSRegistrar.sol",
"@ensdomains/ens-contracts/contracts/resolvers/Resolver.sol",
"@ensdomains/ens-contracts/contracts/registry/ENSRegistry.sol", // exported in exports.ts
],
},
solidity: {
Expand Down
2 changes: 1 addition & 1 deletion packages/network-contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@
},
"dependencies": {
"@chainlink/contracts": "0.3.1",
"@ensdomains/ens-contracts": "0.0.22",
"@opengsn/contracts": "2.2.6",
"@openzeppelin/contracts": "4.4.2",
"@openzeppelin/contracts-upgradeable-4.4.2": "npm:@openzeppelin/[email protected]"
},
"devDependencies": {
"@chainsafe/as-sha256": "^0.3.1",
"@ensdomains/ens-contracts": "0.0.22",
"@ethersproject/providers": "5.7.0",
"@ethersproject/wallet": "5.7.0",
"@ethersproject/contracts": "5.7.0",
Expand Down
12 changes: 6 additions & 6 deletions packages/network-contracts/src/exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ export { abi as ERC677ABI } from "../artifacts/contracts/OperatorTokenomics/IERC
export type { IERC677 as ERC677 } from "../typechain/contracts/OperatorTokenomics/IERC677"

export { abi as ensRegistryABI, bytecode as ensRegistryBytecode }
from "@ensdomains/ens-contracts/artifacts/contracts/registry/ENSRegistry.sol/ENSRegistry.json"
from "../artifacts/@ensdomains/ens-contracts/contracts/registry/ENSRegistry.sol/ENSRegistry.json"
export type { ENS } from "../typechain/@ensdomains/ens-contracts/contracts/registry/ENS"

export { abi as fifsRegistrarABI, bytecode as fifsRegistrarBytecode }
from "@ensdomains/ens-contracts/artifacts/contracts/registry/FIFSRegistrar.sol/FIFSRegistrar.json"
from "../artifacts/@ensdomains/ens-contracts/contracts/registry/FIFSRegistrar.sol/FIFSRegistrar.json"
export type { FIFSRegistrar } from "../typechain/@ensdomains/ens-contracts/contracts/registry/FIFSRegistrar"

export { abi as publicResolverABI, bytecode as publicResolverBytecode }
from "@ensdomains/ens-contracts/deployments/archive/PublicResolver_mainnet_9412610.sol/PublicResolver_mainnet_9412610.json"
from "../artifacts/PublicResolver_mainnet_9412610.json"
export type { Resolver } from "../typechain/@ensdomains/ens-contracts/contracts/resolvers/Resolver"

export { abi as nodeModuleABI, bytecode as nodeModuleBytecode }
Expand Down Expand Up @@ -113,9 +113,9 @@ import { deployedBytecode as defaultDelegationPolicyBytecode } from "../artifact
import { deployedBytecode as defaultExchangeRatePolicyBytecode } from "../artifacts/contracts/OperatorTokenomics/OperatorPolicies/DefaultExchangeRatePolicy.sol/DefaultExchangeRatePolicy.json"
import { deployedBytecode as defaultUndelegationPolicyBytecode } from "../artifacts/contracts/OperatorTokenomics/OperatorPolicies/DefaultUndelegationPolicy.sol/DefaultUndelegationPolicy.json"
import { deployedBytecode as operatorContractOnlyJoinPolicyBytecode } from "../artifacts/contracts/OperatorTokenomics/SponsorshipPolicies/OperatorContractOnlyJoinPolicy.sol/OperatorContractOnlyJoinPolicy.json"
import { deployedBytecode as ensRegistryBytecode } from "@ensdomains/ens-contracts/artifacts/contracts/registry/ENSRegistry.sol/ENSRegistry.json"
import { deployedBytecode as fifsRegistrarBytecode } from "@ensdomains/ens-contracts/artifacts/contracts/registry/FIFSRegistrar.sol/FIFSRegistrar.json"
import { deployedBytecode as publicResolverBytecode } from "@ensdomains/ens-contracts/deployments/archive/PublicResolver_mainnet_9412610.sol/PublicResolver_mainnet_9412610.json"
import { deployedBytecode as ensRegistryBytecode } from "../artifacts/@ensdomains/ens-contracts/contracts/registry/ENSRegistry.sol/ENSRegistry.json"
import { deployedBytecode as fifsRegistrarBytecode } from "../artifacts/@ensdomains/ens-contracts/contracts/registry/FIFSRegistrar.sol/FIFSRegistrar.json"
import { deployedBytecode as publicResolverBytecode } from "../artifacts/PublicResolver_mainnet_9412610.json"
import { deployedBytecode as nodeModuleBytecode } from "../artifacts/contracts/OperatorTokenomics/OperatorPolicies/NodeModule.sol/NodeModule.json"
import { deployedBytecode as queueModuleBytecode } from "../artifacts/contracts/OperatorTokenomics/OperatorPolicies/QueueModule.sol/QueueModule.json"
import { deployedBytecode as stakeModuleBytecode } from "../artifacts/contracts/OperatorTokenomics/OperatorPolicies/StakeModule.sol/StakeModule.json"
Expand Down

0 comments on commit 933167d

Please sign in to comment.