Skip to content

Instantly share code, notes, and snippets.

@evanVtatum
evanVtatum / NFT Express custom mint.bash
Created April 11, 2022 09:11
NFT Express custom mint
curl --location --request POST 'https://api-us-west1.tatum.io/v3/nft/mint/' \
--header 'Content-Type: application/json' \
--header 'x-api-key: cf5ad61b-40a3-4ac2-a72c-dab397e25e3e_100' \
--data-raw '{
"to": "0x4a08bf00f83e6ada9a243dbf04a51aae10f1526b",
"url": "ipfs://bafkreibiqkirqhb3c7evrezmbhrzeupky7exycgeqmqrylxlkngwcy2oe4",
"minter": "0x542b9ac4945a3836fd12ad98acbc76a0c8b743f5",
"contractAddress":"0xcd2ada00c48a27faa5cc67f9a1ed55b89ddf7f77",
"tokenId": "123123123",
"chain": "MATIC"
@evanVtatum
evanVtatum / Mint NFT KMS Celo
Created April 5, 2022 08:14
Mint NFT KMS Celo
{
"chain": "CELO",
"tokenId": "100000",
"to": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
"contractAddress": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
"url": "https://my_token_data.com",
"signatureId": "26d3883e-4e17-48b3-a0ee-09a3e484ac83",
"nonce": 0,
"feeCurrency": "CELO"
}
@evanVtatum
evanVtatum / Mint NFT private key Celo
Created April 5, 2022 08:13
Mint NFT private key Celo
{
"chain": "CELO",
"tokenId": "100000",
"to": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
"contractAddress": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
"url": "https://my_token_data.com",
"fromPrivateKey": "0x05e150c73f1920ec14caa1e0b6aa09940899678051a78542840c2668ce5080c2",
"nonce": 0,
"feeCurrency": "CELO"
}
@evanVtatum
evanVtatum / Generate Gas Pump Express wallets.bash
Created March 23, 2022 17:58
Generate Gas Pump Express wallets
curl --location --request POST 'https://api-us-west1.tatum.io/v3/blockchain/sc/custodial/batch' \
--header 'Content-Type: application/json' \
--header 'x-api-key: f510b3f6-c6eb-4458-95cb-1c3d75ad3189_100' \
--data-raw '{
"owner": "0x80d8bac9a6901698b3749fe336bbd1385c1f98f2",
"batchCount": 1,
"chain": "CELO",
"feesCovered":true
}'
@evanVtatum
evanVtatum / Get NFTs by collection response.json
Created March 7, 2022 10:03
Get NFTs by collection response.json
[
{
"tokenId": "9001",
"metadata": {
"url": "ipfs://QmUgSR2c21Y6YtjXB4htRmbqNC93tSzf4zgKp8S6n6dnjF/9001.json",
"metadata": {
"name": "Majestic Apes #9001",
"description": "Majestic Apes is a collection of Apes with Traditional Chlothes And Items NFTs. Collect these unique digital collectibles living on the Polygon blockchain.",
"file_url": "ipfs://QmUCcr8vRA8GdeDuhFz4Hcr3srWSWe9z67aN1ehWkKA29f/9001.png",
"custom_fields": {
@evanVtatum
evanVtatum / Get NFTs by collection.bash
Created March 7, 2022 10:01
Get NFTs by collection
curl --location --request GET 'https://api-us-west1.tatum.io/v3/nft/collection/MATIC/0x489b79f1bE574da9FAaFCF60DCd24823f73023F7?pageSize=50' \
--header 'x-api-key: cf5ad61b-40a3-4ac2-a72c-dab397e25e3e_100'
@evanVtatum
evanVtatum / Deploy ERC-20 Celo.js
Last active March 2, 2022 09:38
Deploy ERC-20 Celo
import {prepareDeployErc20SignedTransaction} from '@tatumio/tatum'
/**
* Sign Ethereum deploy ERC20 transaction with private keys locally. Nothing is broadcast to the blockchain.
* @param body content of the transaction to broadcast
* @param provider url of the Ethereum Server to connect to. If not set, default public server will be used.
* @returns transaction data to be broadcast to blockchain.
*/
const body = {
chain: "CELO",
symbol: "ERC_SYMBOL",
@evanVtatum
evanVtatum / Deploy ERC-1155 Celo.js
Last active March 2, 2022 09:37
Deploy ERC-1155 Celo
import {Currency, deployMultiToken} from '@tatumio/tatum';
/**
* Deploy MultiTokens (1155) contract.
* @param testnet - testnet or mainnet
* @param body - body of the request - https://docs.tatum.io/rest/smart-contracts#/deploy-multi-token-smart-contract
* @param provider - (optional) provider to broadcast tx
*/
const body = {
fromPrivateKey: '0x4874827a55d87f2309c55b835af509e3427aa4d52321eeb49a2b93b5c0f8edfb',
chain: Currency.CELO,
@evanVtatum
evanVtatum / Deploy standard Celo NFT smart contract.js
Created March 2, 2022 09:25
Deploy standard Celo NFT smart contract
const transactionHash = await deployNFT(false, {
body.chain: Currency.CELO,
body.name: 'MY_ERC721',
body.symbol: 'ERC_SYMBOL',
body.fromPrivateKey: '0x4874827a55d87f2309c55b835af509e3427aa4d52321eeb49a2b93b5c0f8edfb',
body.feeCurrency: Currency.CUSD
});
@evanVtatum
evanVtatum / Create subscription to Solana address.js
Last active February 28, 2022 12:56
Create subscription to Solana address
import { createNewSubscription, CreateSubscription, SubscriptionType } from '@tatumio/tatum'
export const createAddressNotificationTransactionSubscription = async () => {
const data: CreateSubscription = {
"type": SubscriptionType.ADDRESS_TRANSACTION,
"attr": {
"address": "FykfMwA9WNShzPJbbb9DNXsfgDgS3XZzWiFgrVXfWoPJ",
"chain": "SOL",
"url": "https://webhook.site/d7eb36b5-a6ed-458a-b3be-836a6b7f0918"
}