Skip to content

Instantly share code, notes, and snippets.

@taoblockchain
taoblockchain / trc21.js
Created September 16, 2020 14:53
Tao TRC21
/*
* RPC: https://rpc.tao.network mainnet, https://rpc.testnet.tao.network testnet
* chainId: 558 mainnet, 559 testnet
*/
const Web3 = require('web3')
const rpc = 'https://rpc.testnet.tao.network'
const chainId = 559
const pkey = 'YOUR_PKEY' // token holder pkey
@taoblockchain
taoblockchain / trc20.js
Last active September 16, 2020 14:53
Tao TRC20
/*
* RPC: https://rpc.tao.network mainnet, https://rpc.testnet.tao.network testnet
* chainId: 558 mainnet, 559 testnet
*/
const Web3 = require('web3')
const rpc = 'https://rpc.testnet.tao.network'
const chainId = 559
const pkey = 'YOUR_PKEY' // token holder pkey
@taoblockchain
taoblockchain / staking_tao.js
Created September 16, 2020 14:38
Tao Staking Script
/*
* RPC: https://rpc.tao.network mainnet, https://rpc.testnet.tao.network testnet
* chainId: 558 mainnet, 559 testnet
* Owner address: balance at least 100000 TOMO
* Coinbase is node address. You can create a empty wallet with https://wallet.testnet.tao.network
*/
const rpc = 'https://rpc.testnet.tao.network'
chainId = 559
const pkey = '[OWNER_PKEY]' // include 0x
@taoblockchain
taoblockchain / ERC20.sol
Created February 21, 2019 09:06 — forked from anonymous/ERC20.sol
Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://ethereum.github.io/browser-solidity/#version=soljson-v0.4.19+commit.c4cbbb05.js&optimize=false&gist=
pragma solidity ^0.4.10;
interface ERC20 {
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);