Last active
September 25, 2021 13:25
-
-
Save fakenickels/7d5bacd7d0d3b74cc5845e60a1c0ecda to your computer and use it in GitHub Desktop.
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
contract Kittens { | |
function claim() public payable {} | |
function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) public {} | |
function totalSupply() public uint256 {} | |
} | |
// aaaaaa I’m acoooomulating | |
contract Acoomulator { | |
Kittens kittens = Kittens(0xfD211f3B016a75bC8d73550aC5AdC2f1cAE780C0) | |
function claimN(uint n) public payable { | |
require(n * 4.2 ether, "payable amount gotta match quantity") | |
uint256 currentTokenId = kittens.totalSupply() | |
for(uint i=0; i<n;i++ ) { | |
kittens.claim{value: 4.2}() | |
kittens.safeTransferFrom(address(this), msg.sender, currentTokenId + i) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment