diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1e8d435d..0c53828a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,10 +34,18 @@ jobs: with: version: nightly + - name: Update package with soldeer + run: forge soldeer update + + - name: Recursively update dependencies + run: | + chmod +x ./update-deps.sh + ./update-deps.sh + - name: Run Forge build run: | forge --version - forge build --sizes + forge build id: build - name: Run Forge tests diff --git a/.gitignore b/.gitignore index 1101fdfb..516242c3 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,6 @@ node_modules/ yarn-error.log .yarn .yarnrc.yml -script/data/* \ No newline at end of file +script/data/* +dependencies +deployments/**/exported_address \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index c9a4b0a3..6b649dc3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,3 @@ -[submodule "lib/forge-std"] - path = lib/forge-std - url = https://github.com/foundry-rs/forge-std -[submodule "lib/openzeppelin-contracts"] - path = lib/openzeppelin-contracts - url = https://github.com/openzeppelin/openzeppelin-contracts [submodule "lib/contract-template"] path = lib/contract-template url = https://github.com/axieinfinity/contract-template @@ -13,15 +7,3 @@ [submodule "lib/buffer"] path = lib/buffer url = https://github.com/ensdomains/buffer -[submodule "lib/pyth-sdk-solidity"] - path = lib/pyth-sdk-solidity - url = https://github.com/pyth-network/pyth-sdk-solidity -[submodule "lib/solady"] - path = lib/solady - url = https://github.com/vectorized/solady -[submodule "lib/foundry-deployment-kit"] - path = lib/foundry-deployment-kit - url = https://github.com/axieinfinity/foundry-deployment-kit -[submodule "lib/contract-libs"] - path = lib/contract-libs - url = https://github.com/axieinfinity/contract-libs diff --git a/debug.sh b/debug.sh index fb3f8f8e..968eeb4d 100755 --- a/debug.sh +++ b/debug.sh @@ -1 +1 @@ -source lib/foundry-deployment-kit/debug.sh \ No newline at end of file +source dependencies/@fdk-0.3.0-beta/debug.sh diff --git a/foundry.toml b/foundry.toml index c7bbca5a..525a604c 100644 --- a/foundry.toml +++ b/foundry.toml @@ -27,4 +27,9 @@ localhost = "http://localhost:8545" runs = 256 [invariant] -runs = 256 \ No newline at end of file +runs = 256 + +[dependencies] +"@fdk" = { version = "0.3.0-beta", url = "https://github.com/axieinfinity/foundry-deployment-kit/archive/refs/tags/v0.3.0-beta.zip" } +"@pythnetwork-pyth-sdk-solidity" = { version = "2.2.0" } +"@openzeppelin-contracts" = { version = "4.9.3" } diff --git a/install.sh b/install.sh new file mode 100755 index 00000000..dbb30101 --- /dev/null +++ b/install.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Check if foundry is installed +if ! command -v $HOME/.foundry/bin/forge &>/dev/null; then + # Install foundryup + curl -L https://foundry.paradigm.xyz | bash + # Install foundry + $HOME/.foundry/bin/foundryup -v nightly-de33b6af53005037b463318d2628b5cfcaf39916 # Stable version +fi + +# Check if rustup is installed +if ! command -v rustup &>/dev/null; then + # Install rustup + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh +fi + +# Update rustup +$HOME/.cargo/bin/rustup update stable +# Install soldeer +$HOME/.cargo/bin/cargo install soldeer +# Update dependencies with soldeer +$HOME/.cargo/bin/soldeer update +# Run forge build +$HOME/.foundry/bin/forge build + +# Check if rustup is installed +if ! command -v jq &>/dev/null; then + # Install jq + brew install jq +fi diff --git a/lib/contract-libs b/lib/contract-libs deleted file mode 160000 index f177e3b4..00000000 --- a/lib/contract-libs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f177e3b4a498ec15ca1ca58d1a514f8b54c3f95a diff --git a/lib/forge-std b/lib/forge-std deleted file mode 160000 index 77876f8a..00000000 --- a/lib/forge-std +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 77876f8a5b44b770a935621bb331660c90ac928e diff --git a/lib/foundry-deployment-kit b/lib/foundry-deployment-kit deleted file mode 160000 index d363121b..00000000 --- a/lib/foundry-deployment-kit +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d363121bac338212c1540c53ddd9296c4cf2cf19 diff --git a/lib/openzeppelin-contracts b/lib/openzeppelin-contracts deleted file mode 160000 index fd81a96f..00000000 --- a/lib/openzeppelin-contracts +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fd81a96f01cc42ef1c9a5399364968d0e07e9e90 diff --git a/lib/pyth-sdk-solidity b/lib/pyth-sdk-solidity deleted file mode 160000 index 11d6bcfc..00000000 --- a/lib/pyth-sdk-solidity +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 11d6bcfc2e56885535a9a8e3c8417847cb20be14 diff --git a/lib/solady b/lib/solady deleted file mode 160000 index 2ba1cc1e..00000000 --- a/lib/solady +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2ba1cc1eaa3bffd5c093d94f76ef1b87b167ff3c diff --git a/remappings.txt b/remappings.txt index e0444d22..3bc9792b 100644 --- a/remappings.txt +++ b/remappings.txt @@ -1,10 +1,10 @@ @rns-contracts/=src/ ds-test/=lib/forge-std/lib/ds-test/src/ -forge-std/=lib/forge-std/src/ -@openzeppelin/=lib/openzeppelin-contracts/ +forge-std/=dependencies/@fdk-0.3.0-beta/dependencies/forge-std-1.8.2/src/ +@openzeppelin/contracts/=dependencies/@openzeppelin-contracts-4.9.3/ contract-template/=lib/contract-template/src/ -solady/=lib/solady/src/ +@solady/=dependencies/@fdk-0.3.0-beta/dependencies/solady-0.0.206/src/ @ensdomains/ens-contracts/=lib/ens-contracts/contracts/ @ensdomains/buffer/=lib/buffer/ -@pythnetwork/=lib/pyth-sdk-solidity/ -foundry-deployment-kit/=lib/foundry-deployment-kit/script/ \ No newline at end of file +@pythnetwork/=dependencies/@pythnetwork-pyth-sdk-solidity-2.2.0/ +@fdk/=dependencies/@fdk-0.3.0-beta/script \ No newline at end of file diff --git a/run.sh b/run.sh index 931b150b..d99f730e 100755 --- a/run.sh +++ b/run.sh @@ -1 +1 @@ -source lib/foundry-deployment-kit/run.sh \ No newline at end of file +source dependencies/@fdk-0.3.0-beta/run.sh diff --git a/script/20231015-deploy/20231015_Deploy.s.sol b/script/20231015-deploy/20231015_Deploy.s.sol index 5bbc1067..9f72803f 100644 --- a/script/20231015-deploy/20231015_Deploy.s.sol +++ b/script/20231015-deploy/20231015_Deploy.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 as console } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { Math } from "@openzeppelin/contracts/utils/math/Math.sol"; import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; @@ -109,7 +109,7 @@ contract Migration__20231015_Deploy is Migration { console.log(unicode"✅ Controller checks are passed"); } - function _validateRNSUnified(uint256 ronId, uint256 addrReverseId) internal logFn("validateRNSUnified") { + function _validateRNSUnified(uint256 ronId, uint256 addrReverseId) internal view logFn("validateRNSUnified") { assertEq(ronId, LibRNSDomain.RON_ID); assertEq(addrReverseId, LibRNSDomain.ADDR_REVERSE_ID); assertTrue(_rns.hasRole(_rns.CONTROLLER_ROLE(), address(_auction)), "grant controller role failed"); @@ -119,7 +119,7 @@ contract Migration__20231015_Deploy is Migration { console.log(unicode"✅ RNSUnified checks are passed"); } - function _validateReverseRegistrar() internal logFn("validateReverseRegistrar") { + function _validateReverseRegistrar() internal view logFn("validateReverseRegistrar") { assertEq(_rns.getApproved(LibRNSDomain.ADDR_REVERSE_ID), address(_reverseRegistrar)); } @@ -202,7 +202,7 @@ contract Migration__20231015_Deploy is Migration { console.log(unicode"✅ Domain price checks are passed"); } - function _validateNameChecker() internal logFn("validateNameChecker") { + function _validateNameChecker() internal view logFn("validateNameChecker") { string[] memory blacklistedWords = _blacklistedWords; (uint8 min, uint8 max) = _nameChecker.getWordRange(); bool valid; diff --git a/script/20231024-upgrade-domain-price/20231024_Config.s.sol b/script/20231024-upgrade-domain-price/20231024_Config.s.sol index 0b602d51..6c77ea26 100644 --- a/script/20231024-upgrade-domain-price/20231024_Config.s.sol +++ b/script/20231024-upgrade-domain-price/20231024_Config.s.sol @@ -9,7 +9,7 @@ abstract contract Config__20231024 is Migration { ISharedArgument.SharedParameter memory param = abi.decode(rawArgs, (ISharedArgument.SharedParameter)); - if (network() == DefaultNetwork.RoninTestnet.key()) { + if (network() == DefaultNetwork.RoninTestnet.key() || network() == DefaultNetwork.LocalHost.key()) { param.rnsDomainPrice.overrider = param.rnsDomainPrice.domainPriceOperators[0]; } else if (network() == DefaultNetwork.RoninMainnet.key()) { revert("Missing param"); diff --git a/script/20231024-upgrade-domain-price/20231024_UpgradeDomainPrice.s.sol b/script/20231024-upgrade-domain-price/20231024_UpgradeDomainPrice.s.sol index 42ff6657..8629cfa9 100644 --- a/script/20231024-upgrade-domain-price/20231024_UpgradeDomainPrice.s.sol +++ b/script/20231024-upgrade-domain-price/20231024_UpgradeDomainPrice.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 as console } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { Contract } from "script/utils/Contract.sol"; import { RNSDomainPrice } from "@rns-contracts/RNSDomainPrice.sol"; import { ISharedArgument, Config__20231024 } from "./20231024_Config.s.sol"; diff --git a/script/20231106-config-prelaunch/20231106_SubmitReservedNames.s.sol b/script/20231106-config-prelaunch/20231106_SubmitReservedNames.s.sol index 69dabe09..f62557b0 100644 --- a/script/20231106-config-prelaunch/20231106_SubmitReservedNames.s.sol +++ b/script/20231106-config-prelaunch/20231106_SubmitReservedNames.s.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 as console } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { Contract } from "script/utils/Contract.sol"; -import { JSONParserLib } from "solady/utils/JSONParserLib.sol"; +import { JSONParserLib } from "@solady/utils/JSONParserLib.sol"; import { Migration } from "script/Migration.s.sol"; import { LibRNSDomain, RNSUnified } from "@rns-contracts/RNSUnified.sol"; import { OwnedMulticaller, OwnedMulticallerDeploy } from "script/contracts/OwnedMulticallerDeploy.s.sol"; diff --git a/script/20231106-config-prelaunch/20231106_TransferOwnership.s.sol b/script/20231106-config-prelaunch/20231106_TransferOwnership.s.sol index 8842cc9d..cdd7d01a 100644 --- a/script/20231106-config-prelaunch/20231106_TransferOwnership.s.sol +++ b/script/20231106-config-prelaunch/20231106_TransferOwnership.s.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.19; import { Contract } from "script/utils/Contract.sol"; -import { console2 as console } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { Migration } from "script/Migration.s.sol"; import { RNSUnified } from "@rns-contracts/RNSUnified.sol"; import { OwnedMulticallerDeploy } from "script/contracts/OwnedMulticallerDeploy.s.sol"; diff --git a/script/20231106-deploy-mainnet/20231106_Deploy.s.sol b/script/20231106-deploy-mainnet/20231106_Deploy.s.sol index 2a7ed7c9..9580dfbb 100644 --- a/script/20231106-deploy-mainnet/20231106_Deploy.s.sol +++ b/script/20231106-deploy-mainnet/20231106_Deploy.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 as console } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { StdStyle } from "forge-std/StdStyle.sol"; import { Math } from "@openzeppelin/contracts/utils/math/Math.sol"; import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; diff --git a/script/20231114-deploy-name-checker-logic/20231114_DeployNameCheckerLogic.s.sol b/script/20231114-deploy-name-checker-logic/20231114_DeployNameCheckerLogic.s.sol index fd86c0d8..20bdc683 100644 --- a/script/20231114-deploy-name-checker-logic/20231114_DeployNameCheckerLogic.s.sol +++ b/script/20231114-deploy-name-checker-logic/20231114_DeployNameCheckerLogic.s.sol @@ -6,7 +6,7 @@ import { ITransparentUpgradeableProxy, TransparentUpgradeableProxy } from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; -import { LibProxy } from "foundry-deployment-kit/libraries/LibProxy.sol"; +import { LibProxy } from "@fdk/libraries/LibProxy.sol"; import { NameChecker } from "@rns-contracts/NameChecker.sol"; import { Contract } from "script/utils/Contract.sol"; import { Migration } from "script/Migration.s.sol"; diff --git a/script/20231115-migrate-invalid-auction-names/2021115_MigrateInvalidAuctionNames.s.sol b/script/20231115-migrate-invalid-auction-names/2021115_MigrateInvalidAuctionNames.s.sol index e5f5465c..b71ffd06 100644 --- a/script/20231115-migrate-invalid-auction-names/2021115_MigrateInvalidAuctionNames.s.sol +++ b/script/20231115-migrate-invalid-auction-names/2021115_MigrateInvalidAuctionNames.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 as console } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { INSAuction, EventRange, RNSAuction } from "@rns-contracts/RNSAuction.sol"; import { Contract } from "script/utils/Contract.sol"; import { Migration } from "script/Migration.s.sol"; diff --git a/script/20231123-upgrade-auction-claim-unbidded-names/20231123_UpgradeAuctionClaimUnbiddedNames.s.sol b/script/20231123-upgrade-auction-claim-unbidded-names/20231123_UpgradeAuctionClaimUnbiddedNames.s.sol index 5589d3bf..79b5daac 100644 --- a/script/20231123-upgrade-auction-claim-unbidded-names/20231123_UpgradeAuctionClaimUnbiddedNames.s.sol +++ b/script/20231123-upgrade-auction-claim-unbidded-names/20231123_UpgradeAuctionClaimUnbiddedNames.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 as console } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { Contract } from "script/utils/Contract.sol"; import { Migration } from "script/Migration.s.sol"; import { RNSUnified } from "@rns-contracts/RNSUnified.sol"; diff --git a/script/20231124-deploy-rns-operation/20231124_DeployRNSOperation.s.sol b/script/20231124-deploy-rns-operation/20231124_DeployRNSOperation.s.sol index 7f8bce69..e2f5641b 100644 --- a/script/20231124-deploy-rns-operation/20231124_DeployRNSOperation.s.sol +++ b/script/20231124-deploy-rns-operation/20231124_DeployRNSOperation.s.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.19; import { Math } from "@openzeppelin/contracts/utils/math/Math.sol"; -import { console2 as console } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { Contract } from "script/utils/Contract.sol"; import { Migration } from "script/Migration.s.sol"; import { RNSUnified } from "@rns-contracts/RNSUnified.sol"; diff --git a/script/20231205-deploy-upgrade-auction-and-deploy-rns-operation/20231205_UpgradeRNSAuctionAndDeployRNSOperation.s.sol b/script/20231205-deploy-upgrade-auction-and-deploy-rns-operation/20231205_UpgradeRNSAuctionAndDeployRNSOperation.s.sol index e057f5a6..88feaa59 100644 --- a/script/20231205-deploy-upgrade-auction-and-deploy-rns-operation/20231205_UpgradeRNSAuctionAndDeployRNSOperation.s.sol +++ b/script/20231205-deploy-upgrade-auction-and-deploy-rns-operation/20231205_UpgradeRNSAuctionAndDeployRNSOperation.s.sol @@ -1,11 +1,11 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 as console } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { ITransparentUpgradeableProxy } from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; import { ProxyAdmin } from "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; import { Contract } from "script/utils/Contract.sol"; -import { DefaultContract } from "foundry-deployment-kit/utils/DefaultContract.sol"; +import { DefaultContract } from "@fdk/utils/DefaultContract.sol"; import { ISharedArgument } from "script/interfaces/ISharedArgument.sol"; import { DefaultNetwork, diff --git a/script/20240215-separate-tier-and-domain-price/01_UpgradeRNSDomainPrice_OverrideTierForCommunityNames.s.sol b/script/20240215-separate-tier-and-domain-price/01_UpgradeRNSDomainPrice_OverrideTierForCommunityNames.s.sol index a77032ce..942bbcce 100644 --- a/script/20240215-separate-tier-and-domain-price/01_UpgradeRNSDomainPrice_OverrideTierForCommunityNames.s.sol +++ b/script/20240215-separate-tier-and-domain-price/01_UpgradeRNSDomainPrice_OverrideTierForCommunityNames.s.sol @@ -3,9 +3,9 @@ pragma solidity ^0.8.19; import { StdStyle } from "forge-std/StdStyle.sol"; import { IMulticall3 } from "forge-std/interfaces/IMulticall3.sol"; -import { LibString } from "solady/utils/LibString.sol"; -import { DefaultNetwork } from "foundry-deployment-kit/utils/DefaultNetwork.sol"; -import { DefaultContract } from "foundry-deployment-kit/utils/DefaultContract.sol"; +import { LibString } from "@solady/utils/LibString.sol"; +import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; +import { DefaultContract } from "@fdk/utils/DefaultContract.sol"; import { Contract } from "../utils/Contract.sol"; import { INSDomainPrice, RNSDomainPrice } from "@rns-contracts/RNSDomainPrice.sol"; import "./20240215_Migration.s.sol"; @@ -58,7 +58,7 @@ contract Migration__01_UpgradeRNSDomainPriceAndOverrideTierForCommunityNames_RNS _validateOtherDomainTiers(); } - function _validateOtherDomainTiers() internal logFn("_validating other domain tiers ...") { + function _validateOtherDomainTiers() internal view logFn("_validating other domain tiers ...") { if (network() == DefaultNetwork.RoninMainnet.key()) { assertEq(uint8(_domainPrice.getTier("tudo")), uint8(INSDomainPrice.Tier.Tier2), "invalid tier for tudo"); assertEq(uint8(_domainPrice.getTier("duke")), uint8(INSDomainPrice.Tier.Tier2), "invalid tier for duke"); diff --git a/script/20240215-separate-tier-and-domain-price/03_DeployNewRNSOperation_RNSOperation.s.sol b/script/20240215-separate-tier-and-domain-price/03_DeployNewRNSOperation_RNSOperation.s.sol index abd1327d..df25964a 100644 --- a/script/20240215-separate-tier-and-domain-price/03_DeployNewRNSOperation_RNSOperation.s.sol +++ b/script/20240215-separate-tier-and-domain-price/03_DeployNewRNSOperation_RNSOperation.s.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.19; import { StdStyle } from "forge-std/StdStyle.sol"; import { Math } from "@openzeppelin/contracts/utils/math/Math.sol"; -import { console2 as console } from "forge-std/console2.sol"; +import { console } from "forge-std/console.sol"; import { Contract } from "script/utils/Contract.sol"; import { Migration } from "script/Migration.s.sol"; import { RNSUnified } from "@rns-contracts/RNSUnified.sol"; diff --git a/script/20240215-separate-tier-and-domain-price/20240215_Migration.s.sol b/script/20240215-separate-tier-and-domain-price/20240215_Migration.s.sol index 3aba2723..a7428a91 100644 --- a/script/20240215-separate-tier-and-domain-price/20240215_Migration.s.sol +++ b/script/20240215-separate-tier-and-domain-price/20240215_Migration.s.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { console2 as console } from "forge-std/console2.sol"; -import { JSONParserLib } from "solady/utils/JSONParserLib.sol"; +import { console } from "forge-std/console.sol"; +import { JSONParserLib } from "@solady/utils/JSONParserLib.sol"; import { Migration, ISharedArgument } from "../Migration.s.sol"; import { LibRNSDomain } from "@rns-contracts/libraries/LibRNSDomain.sol"; import { INSDomainPrice } from "@rns-contracts/interfaces/INSDomainPrice.sol"; diff --git a/script/GeneralConfig.sol b/script/GeneralConfig.sol index 495f6a6a..d5f0870c 100644 --- a/script/GeneralConfig.sol +++ b/script/GeneralConfig.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { BaseGeneralConfig } from "foundry-deployment-kit/BaseGeneralConfig.sol"; +import { BaseGeneralConfig } from "@fdk/BaseGeneralConfig.sol"; import { Contract } from "./utils/Contract.sol"; contract GeneralConfig is BaseGeneralConfig { diff --git a/script/Migration.s.sol b/script/Migration.s.sol index f8f2e496..e4c73c36 100644 --- a/script/Migration.s.sol +++ b/script/Migration.s.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { BaseMigration } from "foundry-deployment-kit/BaseMigration.s.sol"; -import { DefaultNetwork } from "foundry-deployment-kit/utils/DefaultNetwork.sol"; +import { BaseMigration } from "@fdk/BaseMigration.s.sol"; +import { DefaultNetwork } from "@fdk/utils/DefaultNetwork.sol"; import { GeneralConfig } from "./GeneralConfig.sol"; import "./interfaces/ISharedArgument.sol"; @@ -16,7 +16,7 @@ abstract contract Migration is BaseMigration { function _sharedArguments() internal view virtual override returns (bytes memory rawArgs) { ISharedArgument.SharedParameter memory param; - if (network() == DefaultNetwork.RoninTestnet.key()) { + if (network() == DefaultNetwork.RoninTestnet.key() || network() == DefaultNetwork.LocalHost.key()) { address defaultAdmin = 0x968D0Cd7343f711216817E617d3f92a23dC91c07; address defaultPauser = defaultAdmin; address defaultOperator = defaultAdmin; diff --git a/script/interfaces/ISharedArgument.sol b/script/interfaces/ISharedArgument.sol index ddeef103..535b588c 100644 --- a/script/interfaces/ISharedArgument.sol +++ b/script/interfaces/ISharedArgument.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { IGeneralConfig } from "foundry-deployment-kit/interfaces/IGeneralConfig.sol"; +import { IGeneralConfig } from "@fdk/interfaces/IGeneralConfig.sol"; import { IPyth, INSDomainPrice, PeriodScaler } from "@rns-contracts/RNSDomainPrice.sol"; import { NameChecker } from "@rns-contracts/NameChecker.sol"; import { PublicResolver } from "@rns-contracts/resolvers/PublicResolver.sol"; diff --git a/script/utils/Contract.sol b/script/utils/Contract.sol index 90a54063..15042b5d 100644 --- a/script/utils/Contract.sol +++ b/script/utils/Contract.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import { LibString } from "lib/solady/src/utils/LibString.sol"; -import { TContract } from "foundry-deployment-kit/types/Types.sol"; +import { LibString } from "@solady/utils/LibString.sol"; +import { TContract } from "@fdk/types/Types.sol"; enum Contract { RNSUnified, diff --git a/soldeer.lock b/soldeer.lock new file mode 100644 index 00000000..026df440 --- /dev/null +++ b/soldeer.lock @@ -0,0 +1,17 @@ +[[dependencies]] +name = "@fdk" +version = "0.3.0-beta" +source = "https://github.com/axieinfinity/foundry-deployment-kit/archive/refs/tags/v0.3.0-beta.zip" +checksum = "aabeda6cc1fe02227d26f3edd86d4af6c91e2167e8b9f1971cc1ea7ce33d34f9" + +[[dependencies]] +name = "@pythnetwork-pyth-sdk-solidity" +version = "2.2.0" +source = "https://soldeer-revisions.s3.amazonaws.com/@pythnetwork-pyth-sdk-solidity/2_2_0_15-04-2024_18:50:54_pyth-sdk-solidity.zip" +checksum = "54e3bda3b27467f84c1605722f58e1d2b5a19d6ca3c24840550f1d6cf3bc2231" + +[[dependencies]] +name = "@openzeppelin-contracts" +version = "4.9.3" +source = "https://soldeer-revisions.s3.amazonaws.com/@openzeppelin-contracts/4_9_3_22-01-2024_13:13:53_contracts.zip" +checksum = "95886307069cf73310b41396c49df51801a73f31f18f62e7d05adfc2031e7725" diff --git a/test/RNSUnified/RNSUnified.namehash.t.sol b/test/RNSUnified/RNSUnified.namehash.t.sol index 2d3b537f..8bbaab6c 100644 --- a/test/RNSUnified/RNSUnified.namehash.t.sol +++ b/test/RNSUnified/RNSUnified.namehash.t.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.19; import "./RNSUnified.t.sol"; -import { LibString as SoladyLibString } from "solady/utils/LibString.sol"; +import { LibString as SoladyLibString } from "@solady/utils/LibString.sol"; contract RNSUnified_NameHash_Test is RNSUnifiedTest { using SoladyLibString for *; diff --git a/update-deps.sh b/update-deps.sh new file mode 100644 index 00000000..d07e2b8d --- /dev/null +++ b/update-deps.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +# Set the path to the dependencies folder +DEPENDENCIES_FOLDER="./dependencies" + +# Check if the dependencies folder exists +if [ ! -d "$DEPENDENCIES_FOLDER" ]; then + echo "Dependencies folder does not exist: $DEPENDENCIES_FOLDER" + exit 1 +fi + +# Change directory to the dependencies folder +cd "$DEPENDENCIES_FOLDER" || exit 1 + +# Iterate through each subdirectory in the dependencies folder +for dir in */; do + if [ -d "$dir" ]; then + echo "Updating dependencies in: $dir" + cd "$dir" || exit 1 + + # Check if soldeer.lock exists + if [ ! -f "soldeer.lock" ]; then + echo "soldeer.lock does not exist in: $dir" + echo "Skipping update for: $dir" + cd .. + continue + fi + + # Run soldeer update + forge soldeer update + + # Return to the dependencies folder + cd .. + fi +done + +# Return to the original directory +cd .. + +echo "All dependencies updated." diff --git a/upload-sig.sh b/upload-sig.sh index ea7cb2b9..a71849a9 100755 --- a/upload-sig.sh +++ b/upload-sig.sh @@ -1 +1 @@ -source lib/foundry-deployment-kit/upload-sig.sh \ No newline at end of file +source dependencies/@fdk-0.3.0-beta/upload-sig.sh