We also take 5% cut on each withdraw.
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
// CAUTION | |
// This version of SafeMath should only be used with Solidity 0.8 or later, | |
// because it relies on the compiler's built in overflow checks. | |
/** | |
* @dev Wrappers over Solidity's arithmetic operations. |
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
// SPDX-License-Identifier: MIT | |
// Adapted from World of Women: https://etherscan.io/token/0xe785e82358879f061bc3dcac6f0444462d4b5330#readContract | |
pragma solidity ^0.8.2; | |
import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
contract AvatarNFT is ERC721, ERC721Enumerable, Ownable { |
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
// put breakpoint at etherscan VM:280 | |
// use "res" variable | |
res.askInfo.map((i, index) => ({ ...i, tokenId: res.tokenIds[index], priceBNB: Number(i.price) / 1e18, link: `https://pancakeswap.finance/nfts/collections/0x0a8901b0E25DEb55A87524f0cC164E9644020EBA/${res.tokenIds[index]}` })).sort((a,b) => Number(a.price) - Number(b.price)).filter(i => i.priceBNB == 5) |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "../utils/Context.sol"; | |
/** | |
* @dev Contract module which provides a basic access control mechanism, where | |
* there is an account (an owner) that can be granted exclusive access to | |
* specific functions. |
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
const Greeter = artifacts.require("Greeter"); | |
module.exports = async function (deployer, network, accounts) { | |
// await deployer.deploy(Greeter); | |
// replace with: | |
const [ owner ] = accounts; | |
const lastNonce = await web3.eth.getTransactionCount(owner); | |
// this DOESN'T include pending transactions, so lastNonce + 1 always replaces pending |
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
did:3:kjzl6cwe1jw145aodppl0512hfsnars2sd8tf49iz838r92wkwvc222k4vgiklu |
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
// use this on https://api.opensea.io/api/v1/ | |
// in browser console | |
const startIndex = 0 // use to skip N first | |
const collection = "0x78569146f5635a31dd2ce08ea614360e8be7315d" | |
const getOpenSeaURL = id => `https://api.opensea.io/api/v1/asset/${collection}/${id}?force_update=true` | |
DELAY = 200 // ms |
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
{ | |
"0x3C7Cf88eA97cF9e8a74cdB22b81811092c027211": [ | |
{ | |
"inputs": [], | |
"stateMutability": "nonpayable", | |
"type": "constructor" | |
}, | |
{ | |
"anonymous": false, | |
"inputs": [ |
- Download JSON with Moralis API https://github.com/nft-api/nft-api#getnftowners
- Use jqplay or jq command line to create csv list https://jqplay.org/
export NFT_ADDRESS = ...
curl -X 'GET' \
'https://deep-index.moralis.io/api/v2/nft/$NFT_ADDRESS/owners?chain=eth&format=decimal' \
-H 'accept: application/json' \
-H 'X-API-Key: YOUR_API_KEY' \
| jq --raw-output '.result[] .owner_of' > holders.csv