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

Script for ERC20 token migration #212

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Script for ERC20 token migration #212

wants to merge 7 commits into from

Conversation

olga24912
Copy link
Contributor

The script creates a proposal for a batch transaction in Gnosis Safe. In Gnosis Safe, you can add a Proposer who can create transactions but cannot sign them. Therefore, the transaction will be created without using a Ledger.

On the testnet, I confirmed that it's possible to create a batch of 200 transactions at once.

Example transaction: https://sepolia.etherscan.io/tx/0xf36f721160ad09b0652dc088a5f73daf94c55c2da07b3dc33ccd8372b423a14e

const txs = [];
for (let i = 0; i < tokens_list.length; i++) {
const contract = new web3.eth.Contract(erc20BalanceOfAbi, tokens_list[i]);
const balance = await contract.methods.balanceOf(destination).call();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Add zero check and skip if balance = 0

@@ -0,0 +1,9 @@
```
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Install the dependencies:

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.

1 participant