Skip to content

Instantly share code, notes, and snippets.

@fakenickels
Last active September 25, 2021 13:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fakenickels/7d5bacd7d0d3b74cc5845e60a1c0ecda to your computer and use it in GitHub Desktop.
Save fakenickels/7d5bacd7d0d3b74cc5845e60a1c0ecda to your computer and use it in GitHub Desktop.
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