This repository was archived by the owner on Jan 28, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Added script to clone an ERC20 and to getRoles #9
Open
xdamman
wants to merge
3
commits into
main
Choose a base branch
from
xdamman-clone
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kevtechi
suggested changes
Jan 17, 2024
Comment on lines
+1
to
+6
| const ethers = require("ethers"); | ||
|
|
||
| const roleName = process.argv[2] || "MINTER_ROLE"; // replace with the actual role name | ||
| const roleHash = ethers.utils.id(roleName); | ||
|
|
||
| console.log(roleName, roleHash); |
Contributor
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.
Are you sure you want to commit this? Seems like debug code.
Comment on lines
+41
to
+65
| const skip = {"0xaa0f7EddCF6CaA17d2DBC919D0Fd6232D1b345c4": true, "0x4053289aa2e0E8556c6e1c6F6CD7D1183e2232ac": true}; | ||
| // const skip = { | ||
| // "0xaa0f7EddCF6CaA17d2DBC919D0Fd6232D1b345c4": true, | ||
| // "0x3E483246e3178e9834549f2be9cC6547db750777": true, | ||
| // "0xCF1A8e25982E8B8e9C43B30D5F104940Aa5b13F2": true, | ||
| // "0xCc7142DE40Ed1c2D86308145DcC6836eFb370D6c": true, | ||
| // "0x2b4ACB6305fEF10be4Bc34a1FEF1Cf912ac39638": true, | ||
| // "0xB771864AC27Cd3e4F26a307DB05517bf10fF42A9": true, | ||
| // "0xe4f2633eb55A66473B50c9630EC8550945268874": true, | ||
| // "0x4053289aa2e0E8556c6e1c6F6CD7D1183e2232ac": true }; | ||
|
|
||
| const mapping: AddressMapping = { | ||
| "0xadDCA8E4b04AA119168b37DFa11C97827493ABe4": "0x39F2638B50DED59f9385BC76C96E44374f0A2119", // @bank | ||
| "0xb1F9B11D8D5A0C69c0a4c337c5FdA823617cAF44": "0xaa34c2d6C923c176eCa418E681Aa7520c0e7BCFD", // @bank2 | ||
| "0x323b57416eb47aEeCE53F35E207228Eed765105F": "0x508846a71989ea4e07da68F4a838C9A5442dA617", // @kevex91 | ||
| "0x5EBfd5359D819AbB9c067b1d57f28597f8e949da": "0x34C4360bd268a9d615Bc3382f35792e03C026Ca7", // @bar | ||
| "0xCF1A8e25982E8B8e9C43B30D5F104940Aa5b13F2": "0xabf962E0DaFa36126DB6C38F7599fe889837c320" // Xavier | ||
| }; | ||
|
|
||
| // const tokenHolders: string[] = [ | ||
| // "0xaa0f7EddCF6CaA17d2DBC919D0Fd6232D1b345c4", | ||
| // "0x4053289aa2e0E8556c6e1c6F6CD7D1183e2232ac", | ||
| // "0xe0aB8F24c97d0BF1c1AB7aAbD76f861C7ca1e70A", | ||
| // "0x1f16E4425144cE4A9C7f55c74756Df793A3AE32f", | ||
| // "0x5EBfd5359D819AbB9c067b1d57f28597f8e949da"]; |
Contributor
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.
maybe this can be provided as json files that the user needs to provide with args? -skip skip.json -mapping mapping.json
Comment on lines
+155
to
+158
| // const transactionResponse = await deployerWallet.sendTransaction(tx); | ||
| // const transactionResponse = await newToken.mint(accountAddress, holder.balance, "recovered from old token", options); | ||
| console.log(">>> hash", transactionResponse.hash); | ||
| const transactionReceipt = await transactionResponse.wait(); |
Contributor
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 can't see where transactionResponse is defined. Will crash.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.