Skip to content

Add CreateX factory for new chain deployment - #215

Merged
gfournierPro merged 41 commits into
developfrom
feature/create-x-clean
Apr 15, 2025
Merged

Add CreateX factory for new chain deployment #215
gfournierPro merged 41 commits into
developfrom
feature/create-x-clean

Conversation

@gfournierPro

Copy link
Copy Markdown
Contributor

No description provided.

@codecov

codecov Bot commented Apr 9, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.50%. Comparing base (993b920) to head (e737a6b).
Report is 42 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #215   +/-   ##
========================================
  Coverage    84.50%   84.50%           
========================================
  Files           35       35           
  Lines         1084     1084           
  Branches       221      221           
========================================
  Hits           916      916           
  Misses         168      168           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread config/config.json Outdated
Comment on lines +163 to +164
"usefactory": true,
"Factory": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
"usefactory": true,
"Factory": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed",
"factory": "0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Was to match with the other addresses but I can change to lower case :)

        "AppRegistry": null,
        "DatasetRegistry": null,
        "WorkerpoolRegistry": null

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Lowercase is not really the issue, mentioning merge :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

oh sorry, thanks for that

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment thread deploy/0_deploy.ts Outdated
const rlcFactory = new RLC__factory().connect(owner);
if (token) {
console.log(`Using existing RLC token at: ${token}`);
await deployments.save('RLC', {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I guess you are doing this for later deployments.get('RLC'). For which network is it missing?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes doing that for arbitrum sepolia actually and local test on hardhat those two deploy the RLC contract and the addresses are different

Comment thread deploy/0_deploy.ts Outdated
Comment on lines +230 to +232
const rlcContract = await rlcFactory.deploy();
await rlcContract.waitForDeployment();
const rlcAddress = await rlcContract.getAddress();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
const rlcContract = await rlcFactory.deploy();
await rlcContract.waitForDeployment();
const rlcAddress = await rlcContract.getAddress();
const rlcAddress = await rlcFactory.deploy()
.then((contract) => contract.waitForDeployment())
.then((contract) => contract.getAddress());

?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment thread hardhat.config.ts
Comment on lines +16 to +17
const isFujiFork = process.env.FUJI_FORK == 'true';
const isArbitrumSepoliaFork = process.env.ARBITRUM_SEPOLIA_FORK == 'true';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Keeping only a single variable isFork doesn't fit us?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Here is to select the current chain to fork either local as bellecour, fuji, or arbi
Maybe I can re-work on it, but did not seen yet how I could change it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Gonna check that

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Made some research, can't figure it out a better way than what we have rn

Comment thread hardhat.config.ts Outdated
etherscan: {
apiKey: {
mainnet: process.env.ETHERSCAN_API_KEY || '',
fuji: process.env.SNOWTRACE_API_KEY || '',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Which purpose is it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Make it possible to verify poco in case of new deployment of these chains (?)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

oups typo I guess

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment thread hardhat.config.ts Outdated
bellecour: 'nothing', // a non-empty string is needed by the plugin.
},
customChains: [
{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

thanks

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment thread deploy/0_deploy.ts Outdated
Comment thread deploy/0_deploy.ts Outdated
Comment thread package.json Outdated
Comment thread package.json Outdated
Comment thread scripts/deploy-timelock.ts Outdated
Comment thread utils/config.ts Outdated
Comment thread utils/FactoryDeployer.ts Outdated
Comment thread CHANGELOG.md Outdated
Comment thread config/config.json
Comment thread hardhat.config.ts Outdated
Comment thread hardhat.config.ts Outdated
Comment thread hardhat.config.ts Outdated
Comment thread test/utils/hardhat-fixture-deployer.ts
Comment thread test/utils/hardhat-fixture-deployer.ts Outdated
Comment thread CHANGELOG.md
Comment thread config/config.json
Comment thread utils/FactoryDeployer.ts Outdated
Comment thread hardhat.config.ts Outdated
Comment thread package.json
Comment thread test/utils/hardhat-fixture-deployer.ts Outdated
Comment thread utils/FactoryDeployer.ts
Comment thread utils/FactoryDeployer.ts
@zguesmi zguesmi changed the title Add CreateX factory for new chain X deployment Add CreateX factory for new chain deployment Apr 14, 2025

@zguesmi zguesmi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Clean!

@gfournierPro
gfournierPro merged commit a8ffae3 into develop Apr 15, 2025
@gfournierPro
gfournierPro deleted the feature/create-x-clean branch April 15, 2025 15:11
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.

4 participants