-
Notifications
You must be signed in to change notification settings - Fork 54
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
Conversation
LCOV of commit
|
contracts/src/v0.8/ccip/test/tokenAdminRegistry/TokenPoolFactory.t.sol
Outdated
Show resolved
Hide resolved
contracts/src/v0.8/ccip/test/tokenAdminRegistry/TokenPoolFactory.t.sol
Outdated
Show resolved
Hide resolved
contracts/src/v0.8/ccip/tokenAdminRegistry/TokenPoolFactory.sol
Outdated
Show resolved
Hide resolved
contracts/src/v0.8/ccip/tokenAdminRegistry/TokenPoolFactory.sol
Outdated
Show resolved
Hide resolved
contracts/src/v0.8/ccip/tokenAdminRegistry/TokenPoolFactory.sol
Outdated
Show resolved
Hide resolved
contracts/src/v0.8/ccip/tokenAdminRegistry/TokenPoolFactory.sol
Outdated
Show resolved
Hide resolved
contracts/src/v0.8/ccip/tokenAdminRegistry/TokenPoolFactory.sol
Outdated
Show resolved
Hide resolved
contracts/src/v0.8/ccip/tokenAdminRegistry/TokenPoolFactory.sol
Outdated
Show resolved
Hide resolved
contracts/src/v0.8/shared/util/DeterministicContractDeployer.sol
Outdated
Show resolved
Hide resolved
5b3af81
to
9355849
Compare
299daec
to
9355849
Compare
f7c97f0
to
9355849
Compare
contracts/src/v0.8/ccip/interfaces/IRegistryModuleOwnerCustom.sol
Outdated
Show resolved
Hide resolved
contracts/src/v0.8/ccip/interfaces/IRegistryModuleOwnerCustom.sol
Outdated
Show resolved
Hide resolved
contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20.t.sol
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,461 @@ | |||
pragma solidity ^0.8.24; |
There was a problem hiding this comment.
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 ☝️
contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20.t.sol
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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!
contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20.t.sol
Outdated
Show resolved
Hide resolved
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); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
contracts/src/v0.8/ccip/test/tokenAdminRegistry/FactoryBurnMintERC20.t.sol
Outdated
Show resolved
Hide resolved
contracts/src/v0.8/ccip/test/tokenAdminRegistry/TokenPoolFactory.t.sol
Outdated
Show resolved
Hide resolved
contracts/src/v0.8/ccip/tokenAdminRegistry/TokenPoolFactory/FactoryBurnMintERC20.sol
Outdated
Show resolved
Hide resolved
RemoteChainConfig memory remoteChainConfig, | ||
address remoteTokenAddress, | ||
PoolType poolType | ||
) internal pure virtual returns (bytes32) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
contracts/src/v0.8/shared/token/ERC677/OpStackBurnMintERC677.sol
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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!
Quality Gate passedIssues Measures |
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.