Skip to content

Commit

Permalink
Merge pull request #55 from immutable/SMR-NOJIRA-Doc-Comments
Browse files Browse the repository at this point in the history
comments updated as per feedback
  • Loading branch information
proletesseract authored Nov 24, 2023
2 parents 95c535d + 5af1349 commit 7b0e82f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/child/ChildERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,18 @@ import "../interfaces/child/IChildERC20.sol";
* @title ChildERC20
* @author Polygon Technology (@QEDK)
* @notice Child token template for ChildERC20 predicate deployments
* @dev All child tokens are clones of this contract. Burning and minting is controlled by respective predicates only.
* @dev All child tokens are clones of this contract. Burning and minting is controlled by the ChildERC20Bridge.
*
* @dev Upgradability:
* This contract is deployed using cloneDeterministic. It is then initialized using an initialize function.
* However, the contract is accessed directly, and not via a transparent upgrade proxy. As such, this contract is not upgradeable.
*
* @dev Cloning and Initialization:
* During the bootstrap process this contract is deployed on-chain.
* When a token is initially mapped by the ChildERC20Bridge the deployed contract is cloned by the ChildERC20Bridge to a deterministic address.
* The new ChildERC20 token is created using cloneDeterministic with the keccak256 hash of the rootToken's address as the salt.
* This new ChildERC20 token is then initialized with the same name, symbol and decimals as the rootToken.
* This deterministic cloning approach allows the token mapping on the root and child bridges to stay congruent.
*/
// solhint-disable reason-string
contract ChildERC20 is EIP712MetaTransaction, ERC20Upgradeable, IChildERC20 {
Expand Down

0 comments on commit 7b0e82f

Please sign in to comment.