Skip to content
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

Self Serve Token Pool Factory Contract #1410

Closed
wants to merge 65 commits into from

Conversation

jhweintraub
Copy link
Contributor

@jhweintraub jhweintraub commented Sep 4, 2024

Motivation

To better ease the process of deploying and configuring self-serve token pools, a factory contract has been deployed which will deploy the tokens, pools, etc. and configure them with the token admin registry. This reduces the number of transactions the end user must make to configure a pool from >12 to ~3-4.

Copy link
Contributor

github-actions bot commented Sep 10, 2024

LCOV of commit d3ab628 during Solidity Foundry #8625

Summary coverage rate:
  lines......: 97.7% (2361 of 2416 lines)
  functions..: 95.2% (459 of 482 functions)
  branches...: 93.4% (554 of 593 branches)

Files changed coverage rate: n/a

@@ -0,0 +1,461 @@
pragma solidity ^0.8.24;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this comment still applies ☝️

Copy link
Contributor

@RyanRHall RyanRHall left a comment

Choose a reason for hiding this comment

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

just a handful of nits left. Sorry to be so picky!

Comment on lines +35 to +40
string memory name = "Chainlink token v2";
string memory symbol = "LINK2";
uint8 decimals = 19;
uint256 maxSupply = 1e33;

s_burnMintERC20 = new FactoryBurnMintERC20(name, symbol, decimals, maxSupply, 1e18, s_alice);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I feel like we could just assert against the contract deployed in the setup() function, rather than deploying a new one

Copy link
Contributor Author

@jhweintraub jhweintraub Oct 22, 2024

Choose a reason for hiding this comment

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

I could've sworn that coverage tests don't apply to the setup function which is why there's always a testConstructorSuccess() function

RemoteChainConfig memory remoteChainConfig,
address remoteTokenAddress,
PoolType poolType
) internal pure virtual returns (bytes32) {
Copy link
Contributor

Choose a reason for hiding this comment

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

can this be made private?

Copy link
Contributor Author

@jhweintraub jhweintraub Oct 22, 2024

Choose a reason for hiding this comment

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

Not if we want to make it virtual, which I kept in there for potential modifications and inheritance in the next version of the contract which is deprioritized until next year. I'm not sure if we will need it to be that way or not but I prefer to keep it instead of foreclosing the possibility.

Copy link
Contributor

@RyanRHall RyanRHall left a comment

Choose a reason for hiding this comment

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

just a handful of nits left. Sorry to be so picky!

@cl-sonarqube-production
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

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