Skip to content

Instantly share code, notes, and snippets.

Avatar

Tao Network Repository taoblockchain

View GitHub Profile
View trc21.js
/*
* 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
View trc20.js
/*
* 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
View staking_tao.js
/*
* 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 Feb 21, 2019 — 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=
View ERC20.sol
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);