This file contains 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
/* | |
* 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 |
This file contains 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
/* | |
* 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 |
This file contains 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
/* | |
* 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 |
This file contains 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
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); |