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

Decrease Batch Transfer gas usage 7%, reduce contract deployment gas by 21% #144

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
bump to 834 transfers
tenthirtyone committed Jul 29, 2024
commit baa6734d47a8fb96ea710715709dc6bb06e9a3bb
6 changes: 3 additions & 3 deletions test/ERC721BatchTransfer.test.ts
Original file line number Diff line number Diff line change
@@ -56,17 +56,17 @@ describe('ERC721BatchTransfer', function () {
}
});

it.skip('batchTransferToSingleWallet max Batch', async () => {
it.only('batchTransferToSingleWallet max Batch', async () => {
// old cap was 777
const batchAmount = 833;
const batchAmount = 834;
const tx = await transferContract.batchTransferToSingleWallet(
nftContract.address,
addresses.addr1,
Array.from({ length: batchAmount }, (_, i) => i),
);
const receipt = await tx.wait();

// console.log(receipt.gasUsed);
console.log(receipt.gasUsed);

for (let i = 0; i < batchAmount; i++) {
const tokenOwner = await nftContract.ownerOf(i);