-
Notifications
You must be signed in to change notification settings - Fork 6
fix(token): __ERC20Pausable_init #51
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
Conversation
📝 WalkthroughWalkthroughThis pull request introduces several updates across the repository. The Changes
Sequence Diagram(s)sequenceDiagram
participant Owner as Contract Owner
participant UT as UniversalToken Contract
Owner->>UT: Call initialize(initialOwner, name, symbol, gatewayAddress, gas, uniswapRouterAddress)
UT->>UT: Invoke __ERC20Pausable_init()
Owner->>UT: Call pause()
UT->>UT: Set state to paused (restrict token transfers)
Owner->>UT: Call unpause()
UT->>UT: Resume token transfer operations
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 0
🔭 Outside diff range comments (1)
contracts/token/contracts/zetachain/UniversalToken.sol (1)
9-9
: 🛠️ Refactor suggestionRemove duplicate import.
The
ERC20BurnableUpgradeable
is imported twice.import {ERC20BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol"; -import {ERC20BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol";
Also applies to: 11-11
🧹 Nitpick comments (1)
readme.md (1)
27-27
: Remove trailing colons from headings.According to markdown best practices, headings should not end with punctuation.
-### For Universal NFT: +### For Universal NFT -### For Universal Token: +### For Universal TokenAlso applies to: 33-33
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
27-27: Trailing punctuation in heading
Punctuation: ':'(MD026, no-trailing-punctuation)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
contracts/nft/yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
contracts/token/yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
📒 Files selected for processing (6)
contracts/nft/.gitignore
(1 hunks)contracts/nft/package.json
(1 hunks)contracts/token/.gitignore
(1 hunks)contracts/token/contracts/zetachain/UniversalToken.sol
(1 hunks)contracts/token/package.json
(2 hunks)readme.md
(1 hunks)
✅ Files skipped from review due to trivial changes (2)
- contracts/token/.gitignore
- contracts/nft/.gitignore
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
readme.md
27-27: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
33-33: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: build
- GitHub Check: slither (contracts/token, token.sarif)
- GitHub Check: slither (contracts/nft, nft.sarif)
🔇 Additional comments (6)
contracts/token/contracts/zetachain/UniversalToken.sol (3)
44-44
: LGTM! Pausable functionality initialized correctly.The
__ERC20Pausable_init()
is correctly called in the initialization sequence.
50-56
: LGTM! Pause controls implemented securely.The pause/unpause functions are correctly restricted to the owner using the
onlyOwner
modifier.
68-74
: LGTM! Pausable state correctly enforced.The
_update
override correctly integrates withERC20PausableUpgradeable
to enforce the paused state.readme.md (1)
16-20
: LGTM! Clear installation instructions.Installation commands are well-documented with both npm and yarn options.
contracts/token/package.json (1)
31-31
: LGTM! Updated localnet version for Solana and Sui support.The update to
@zetachain/[email protected]
aligns with the PR objectives to support Solana and Sui networks.contracts/nft/package.json (1)
34-34
: LGTM! Consistent localnet version update.The update to
@zetachain/[email protected]
maintains consistency with the token package.
## Installation ⚙️ | ||
|
||
```bash | ||
npm install @zetachain/[email protected] |
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, but should we have release candidate hardcoded in top level readme? is there like @latest
in npm, or that doesnt include rc?
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.
npm's @latest
installs the latest stable version. We haven't released a stable version yet, hence the rc tag. As soon as a stable version is released, we'll update the docs.
For the record, the reason for this change was an error I was getting when trying to deploy the contract locally using Hardhat on localnet (Anvil).
|
__ERC20Pausable_init
initializer to Universal Token. This is a standard initializer in the OZ template, but it was missing from the contract.Summary by CodeRabbit