Skip to content

BREAKING_CHANGE(RNSDomainPrice): adopt chainlink pricefeed #298

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

Open
wants to merge 10 commits into
base: release/v0.3.8
Choose a base branch
from

Conversation

TuDo1403
Copy link
Collaborator

@TuDo1403 TuDo1403 commented Apr 1, 2025

This pull request includes several updates across multiple files to upgrade dependencies, update configurations, and improve code consistency. The most important changes include upgrading the Solidity compiler version and EVM version, updating dependencies, changing function visibility, and replacing the Pyth price feed with Chainlink.

Dependency and Configuration Updates:

  • foundry.toml: Updated the Solidity compiler version to 0.8.22, changed the EVM version to Cancun, enabled the optimizer with 1000 runs, and added new dependencies (fdk-0.3.5-rc, openzeppelin-4.9.3, contract-libs-0.1.3). [1] [2]
  • remappings.txt: Updated remappings to reflect the new dependency versions.

Script Updates:

  • generate-artifact.sh, run.sh, debug.sh: Updated to source the new fdk-0.3.5-rc version. [1] [2] [3]

Function Visibility Changes:

Typo Fixes:

  • Corrected the spelling of "overridden" in multiple places. [1] [2] [3] [4]

Price Feed Update:

  • RNSDomainPrice.sol, Migration.s.sol, ISharedArgument.sol: Replaced the Pyth price feed with Chainlink's ChainlinkPriceFeedConsumer. [1] [2] [3] [4] [5] [6] [7] [8]

Deployment logs

Saigon Testnet

== Logs ==
  GeneralConfig:  
  ContractConfig: Deployment data loaded in 4 milliseconds
  NetworkConfig: ronin-testnet fork created with forkId: 0
  Network: ronin-testnet - Block Number 36585077 - Timestamp 1743499322 - Period 20179 - Chain ID 2021 - Gas Price 0 GWEI - Explorer https://saigon-app.roninchain.com/
  (ronin-testnet)env-sender[0x968D0Cd7343f711216817E617d3f92a23dC91c07] | Balance: 92506264499 ETHER
  
>> Prechecking...
  ScriptExtended: Prechecking completed in 19259 milliseconds.

  >  _upgradeProxy RNSDomainPrice ...
  >  _deployLogic RNSDomainPrice ...
  (ronin-testnet)RNSDomainPriceLogic[0x8D79CB3103Cd060F54DcC7238D6564Dc22fe993B] at: https://saigon-app.roninchain.com/address/0x8d79cb3103cd060f54dcc7238d6564dc22fe993b
  By: (ronin-testnet)env-sender[0x968D0Cd7343f711216817E617d3f92a23dC91c07], nonce: 395013

  [INIT] (ronin-testnet)RNSDomainPrice[0x51cAF51678f469e9DD4c878a7b0ceBEbbd4A4AB5]: v1 → v2
  
>> Postchecking...
  ScriptExtended: Postchecking completed in 944 milliseconds.

@TuDo1403 TuDo1403 requested a review from Copilot April 1, 2025 08:38
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request adopts the Chainlink price feed by updating dependencies, refactoring function modifiers, and revising shared interfaces. Key changes include:

  • Updating dependency references in foundry.toml and remappings.txt.
  • Adding the "view" modifier to migration script functions.
  • Replacing the Pyth oracle with the Chainlink price feed in RNSDomainPrice.sol.
Files not reviewed (17)
  • remappings.txt: Language not supported
  • script/20231106-config-prelaunch/20231106_SubmitReservedNames.s.sol: Language not supported
  • script/20231106-deploy-mainnet/20231106_Deploy.s.sol: Language not supported
  • script/20240215-separate-tier-and-domain-price/02_ResetCommunityNameRenewalFees_RNSDomainPrice.s.sol: Language not supported
  • script/20240215-separate-tier-and-domain-price/03_DeployNewRNSOperation_RNSOperation.s.sol: Language not supported
  • script/20240704-upgrade-controller-deploy-rnscommission-mainnet/20240704_UpgradeControllerAndDeployRNSCommissionMainnet.sol: Language not supported
  • script/20241105-upgrade-rnscommission-mainnet /20241105_UpgradRNSCommissionMainnet.sol: Language not supported
  • script/20242406-migrate-auction-controller-treasury-and-deploy-rns-commission/20240624_MigrateAuctionAndControllerTreasuryAndDeployRNSCommission.s.sol: Language not supported
  • script/Migration.s.sol: Language not supported
  • script/contracts/RNSDomainPriceDeploy.s.sol: Language not supported
  • script/interfaces/ISharedArgument.sol: Language not supported
  • src/RNSDomainPrice.sol: Language not supported
  • src/interfaces/INSDomainPrice.sol: Language not supported
  • src/libraries/pyth/PythConverter.sol: Language not supported
  • src/utils/OwnedMulticaller.sol: Language not supported
  • test/RONRegistrarController/RONRegistrarController.bulkRenew.t.sol: Language not supported
  • test/RONRegistrarController/RONRegistrarController.t.sol: Language not supported
Comments suppressed due to low confidence (1)

foundry.toml:33

  • The dependency name has been changed from '@fdk' to 'fdk'. Please ensure that this renaming is consistent across the build configuration and any scripts that reference the package.
+"fdk" = { version = "0.3.4-beta", url = "https://github.com/axieinfinity/foundry-deployment-kit/archive/refs/tags/v0.3.4-beta.zip" }

@TuDo1403 TuDo1403 requested a review from Copilot April 1, 2025 09:26
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request adopts the Chainlink price feed in place of the Pyth oracle, while also updating dependencies and refactoring several functions to improve clarity and maintainability.

  • Updated compiler settings and dependency versions in foundry.toml
  • Removed old dependency references and introduced new ones with updated naming conventions
  • Adjusted remappings and configuration to support the Chainlink price feed
Files not reviewed (19)
  • broadcast/01_UpgradeRNSDomainPrice_AdoptChainlink.s.sol/2021/run-1743499416.json: Language not supported
  • broadcast/01_UpgradeRNSDomainPrice_AdoptChainlink.s.sol/2021/run-latest.json: Language not supported
  • debug.sh: Language not supported
  • generate-artifact.sh: Language not supported
  • remappings.txt: Language not supported
  • run.sh: Language not supported
  • script/20231106-config-prelaunch/20231106_SubmitReservedNames.s.sol: Language not supported
  • script/20231106-deploy-mainnet/20231106_Deploy.s.sol: Language not supported
  • script/20240215-separate-tier-and-domain-price/01_UpgradeRNSDomainPrice_OverrideTierForCommunityNames.s.sol: Language not supported
  • script/20240215-separate-tier-and-domain-price/02_ResetCommunityNameRenewalFees_RNSDomainPrice.s.sol: Language not supported
  • script/20240215-separate-tier-and-domain-price/03_DeployNewRNSOperation_RNSOperation.s.sol: Language not supported
  • script/20240704-upgrade-controller-deploy-rnscommission-mainnet/20240704_UpgradeControllerAndDeployRNSCommissionMainnet.sol: Language not supported
  • script/20241105-upgrade-rnscommission-mainnet /20241105_UpgradRNSCommissionMainnet.sol: Language not supported
  • script/20242406-migrate-auction-controller-treasury-and-deploy-rns-commission/20240624_MigrateAuctionAndControllerTreasuryAndDeployRNSCommission.s.sol: Language not supported
  • script/20250104-upgrade-rns-domain-price-adopt-chainlink/01_UpgradeRNSDomainPrice_AdoptChainlink.s.sol: Language not supported
  • script/Migration.s.sol: Language not supported
  • script/contracts/RNSDomainPriceDeploy.s.sol: Language not supported
  • script/interfaces/ISharedArgument.sol: Language not supported
  • src/RNSDomainPrice.sol: Language not supported
Comments suppressed due to low confidence (2)

foundry.toml:36

  • The dependency key 'fdk' now excludes the '@' prefix used previously. Please ensure that all related documentation and remapping configurations are updated to align with this new naming convention.
fdk = { version = "0.3.5-rc", url = "https://github.com/axieinfinity/foundry-deployment-kit/archive/refs/tags/v0.3.5-rc.zip" }

foundry.toml:10

  • Verify that 'cancun' is fully supported by all development, testing, and deployment environments, as this change may affect compatibility with existing tooling.
evm_version = 'cancun'

@TuDo1403 TuDo1403 requested a review from huyhuynh3103 April 2, 2025 08:36
Copy link

@fuluu fuluu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

huyhuynh3103
huyhuynh3103 previously approved these changes Apr 11, 2025
Copy link
Contributor

@huyhuynh3103 huyhuynh3103 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants