Contracts
Get Contract ABI for Verified Contract Source Codes
Returns the Contract Application Binary Interface ( ABI ) of a verified smart contract.
Find verified contracts ✅on our Verified Contracts Source Code page.
https://api.taikoscan.io/api
?module=contract
&action=getabi
&address=0x2BbD20F846E9665DB270d28DeF578AdD9F1B78A3
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|---|
address | the |
Sample Response
{
"status": "1",
"message": "OK-Missing/Invalid API Key, rate limit of 1/5sec applied",
"result": "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_maxTxAmount\",\"type\":\"uint256\"}],\"name\":\"MaxTxAmountUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ClearMaxWalletINU\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OpenINU\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_maxTaxSwap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_maxTxAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_maxWalletSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_taxSwapThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"clearINU\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"manualSendINU\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"takeoutStuckETHINU\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"transferDelayEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]"
}
A simple sample for retrieving the contractABI using Web3.js and Jquery to interact with a contract.
var Web3 = require('web3');
var web3 = new Web3(new Web3.providers.HttpProvider());
var version = web3.version.api;
$.getJSON('https://api.taikoscan.io/api?module=contract&action=getabi&address=0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359', function (data) {
var contractABI = "";
contractABI = JSON.parse(data.result);
if (contractABI != ''){
var MyContract = web3.eth.contract(contractABI);
var myContractInstance = MyContract.at("0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359");
var result = myContractInstance.memberId("0xfe8ad7dd2f564a877cc23feea6c0a9cc2e783715");
console.log("result1 : " + result);
var result = myContractInstance.members(1);
console.log("result2 : " + result);
} else {
console.log("Error" );
}
});
Get Contract Source Code for Verified Contract Source Codes
Returns the Solidity source code of a verified smart contract.
📩 Tip : You can also download a CSV list of verified contracts addresses of which the code publishers have provided a corresponding Open Source license for redistribution.
https://api.taikoscan.io/api
?module=contract
&action=getsourcecode
&address=0x2BbD20F846E9665DB270d28DeF578AdD9F1B78A3
&apikey=YourApiKeyToken
Try this endpoint in your browser
Query Parameters
Parameter | Description |
---|---|
address | the |
Sample Response
{
"status": "1",
"message": "OK-Missing/Invalid API Key, rate limit of 1/5sec applied",
"result": [
{
"SourceCode": "// SPDX-License-Identifier: MIT\r\n\r\n/**\r\nThe Origin of Taiko Inu\r\n\r\nhttps://t.me/inutaiko\r\nX.com/taiko_inu\r\n\r\n**/\r\n\r\npragma solidity 0.8.17;\r\n\r\nabstract contract Context {\r\n function _msgSender() internal view virtual returns (address) {\r\n return msg.sender;\r\n }\r\n}\r\n\r\ninterface IERC20 {\r\n function totalSupply() external view returns (uint256);\r\n function balanceOf(address account) external view returns (uint256);\r\n function transfer(address recipient, uint256 amount) external returns (bool);\r\n function allowance(address owner, address spender) external view returns (uint256);\r\n function approve(address spender, uint256 amount) external returns (bool);\r\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\r\n event Transfer(address indexed from, address indexed to, uint256 value);\r\n event Approval(address indexed owner, address indexed spender, uint256 value);\r\n}\r\n\r\nlibrary SafeMath {\r\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\r\n uint256 c = a + b;\r\n require(c \u003E= a, \"SafeMath: addition overflow\");\r\n return c;\r\n }\r\n\r\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\r\n return sub(a, b, \"SafeMath: subtraction overflow\");\r\n }\r\n\r\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\r\n require(b \u003C= a, errorMessage);\r\n uint256 c = a - b;\r\n return c;\r\n }\r\n\r\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\r\n if (a == 0) {\r\n return 0;\r\n }\r\n uint256 c = a * b;\r\n require(c / a == b, \"SafeMath: multiplication overflow\");\r\n return c;\r\n }\r\n\r\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\r\n return div(a, b, \"SafeMath: division by zero\");\r\n }\r\n\r\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\r\n require(b \u003E 0, errorMessage);\r\n uint256 c = a / b;\r\n return c;\r\n }\r\n\r\n}\r\n\r\ncontract Ownable is Context {\r\n address private _owner;\r\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\r\n\r\n constructor () {\r\n address msgSender = _msgSender();\r\n _owner = msgSender;\r\n emit OwnershipTransferred(address(0), msgSender);\r\n }\r\n\r\n function owner() public view returns (address) {\r\n return _owner;\r\n }\r\n\r\n modifier onlyOwner() {\r\n require(_owner == _msgSender(), \"Ownable: caller is not the owner\");\r\n _;\r\n }\r\n\r\n function renounceOwnership() public virtual onlyOwner {\r\n emit OwnershipTransferred(_owner, address(0));\r\n _owner = address(0);\r\n }\r\n\r\n}\r\n\r\ninterface IUniswapV2Factory {\r\n function createPair(address tokenA, address tokenB) external returns (address pair);\r\n}\r\n\r\ninterface IUniswapV2Router02 {\r\n function swapExactTokensForETHSupportingFeeOnTransferTokens(\r\n uint amountIn,\r\n uint amountOutMin,\r\n address[] calldata path,\r\n address to,\r\n uint deadline\r\n ) external;\r\n function factory() external pure returns (address);\r\n function WETH() external pure returns (address);\r\n function addLiquidityETH(\r\n address token,\r\n uint amountTokenDesired,\r\n uint amountTokenMin,\r\n uint amountETHMin,\r\n address to,\r\n uint deadline\r\n ) external payable returns (uint amountToken, uint amountETH, uint liquidity);\r\n}\r\n\r\ncontract TAIKOINU is Context, IERC20, Ownable {\r\n using SafeMath for uint256;\r\n mapping (address =\u003E uint256) private _balances;\r\n mapping (address =\u003E mapping (address =\u003E uint256)) private _allowances;\r\n mapping (address =\u003E bool) private _isExcludedFromFee;\r\n mapping (address =\u003E bool) private bots;\r\n mapping(address =\u003E uint256) private _holderLastTransferTimestamp;\r\n bool public transferDelayEnabled = true;\r\n address payable private _feeWallet;\r\n\r\n uint256 private _initialBuyTax=25;\r\n uint256 private _initialSellTax=25;\r\n uint256 private _finalBuyTax=5;\r\n uint256 private _finalSellTax=5; \r\n uint256 private _reduceBuyTaxAt=45;\r\n uint256 private _reduceSellTaxAt=45;\r\n uint256 private _preventSwapBefore=30;\r\n uint256 private _buyCount=0;\r\n\r\n uint8 private constant _decimals = 9;\r\n uint256 private constant _tTotal = 1000000 * 10**_decimals;\r\n string private constant _name = \"TAIKO INU\";\r\n string private constant _symbol = \"INU\";\r\n uint256 public _maxTxAmount = 20000 * 10**_decimals;\r\n uint256 public _maxWalletSize = 20000 * 10**_decimals;\r\n uint256 public _taxSwapThreshold= 10000 * 10**_decimals;\r\n uint256 public _maxTaxSwap= 10000 * 10**_decimals;\r\n\r\n IUniswapV2Router02 private uniswapV2Router;\r\n address private uniswapV2Pair;\r\n bool private TradeOpen;\r\n bool private inSwap = false;\r\n bool private swapEnabled = false;\r\n\r\n event MaxTxAmountUpdated(uint _maxTxAmount);\r\n modifier lockTheSwap {\r\n inSwap = true;\r\n _;\r\n inSwap = false;\r\n }\r\n\r\n constructor () {\r\n _feeWallet = payable(_msgSender());\r\n _balances[_msgSender()] = _tTotal;\r\n _isExcludedFromFee[owner()] = true;\r\n _isExcludedFromFee[address(this)] = true;\r\n _isExcludedFromFee[_feeWallet] = true;\r\n\r\n emit Transfer(address(0), _msgSender(), _tTotal);\r\n }\r\n\r\n function name() public pure returns (string memory) {\r\n return _name;\r\n }\r\n\r\n function symbol() public pure returns (string memory) {\r\n return _symbol;\r\n }\r\n\r\n function decimals() public pure returns (uint8) {\r\n return _decimals;\r\n }\r\n\r\n function totalSupply() public pure override returns (uint256) {\r\n return _tTotal;\r\n }\r\n\r\n function balanceOf(address account) public view override returns (uint256) {\r\n return _balances[account];\r\n }\r\n\r\n function transfer(address recipient, uint256 amount) public override returns (bool) {\r\n _transfer(_msgSender(), recipient, amount);\r\n return true;\r\n }\r\n\r\n function allowance(address owner, address spender) public view override returns (uint256) {\r\n return _allowances[owner][spender];\r\n }\r\n\r\n function approve(address spender, uint256 amount) public override returns (bool) {\r\n _approve(_msgSender(), spender, amount);\r\n return true;\r\n }\r\n\r\n function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {\r\n _transfer(sender, recipient, amount);\r\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \"ERC20: transfer amount exceeds allowance\"));\r\n return true;\r\n }\r\n\r\n function _approve(address owner, address spender, uint256 amount) private {\r\n require(owner != address(0), \"ERC20: approve from the zero address\");\r\n require(spender != address(0), \"ERC20: approve to the zero address\");\r\n _allowances[owner][spender] = amount;\r\n emit Approval(owner, spender, amount);\r\n }\r\n\r\n function _transfer(address from, address to, uint256 amount) private {\r\n require(from != address(0), \"ERC20: transfer from the zero address\");\r\n require(to != address(0), \"ERC20: transfer to the zero address\");\r\n require(amount \u003E 0, \"Transfer amount must be greater than zero\");\r\n uint256 taxAmount=0;\r\n if (from != owner() && to != owner()) {\r\n taxAmount = amount.mul((_buyCount\u003E_reduceBuyTaxAt)?_finalBuyTax:_initialBuyTax).div(100);\r\n\r\n if (transferDelayEnabled) {\r\n if (to != address(uniswapV2Router) && to != address(uniswapV2Pair)) {\r\n require(\r\n _holderLastTransferTimestamp[tx.origin] \u003C\r\n block.number,\r\n \"_transfer:: Transfer Delay enabled. Only one purchase per block allowed.\"\r\n );\r\n _holderLastTransferTimestamp[tx.origin] = block.number;\r\n }\r\n }\r\n\r\n if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] ) {\r\n require(amount \u003C= _maxTxAmount, \"Exceeds the _maxTxAmount.\");\r\n require(balanceOf(to) + amount \u003C= _maxWalletSize, \"Exceeds the maxWalletSize.\");\r\n _buyCount++;\r\n }\r\n\r\n if(to == uniswapV2Pair && from!= address(this) ){\r\n taxAmount = amount.mul((_buyCount\u003E_reduceSellTaxAt)?_finalSellTax:_initialSellTax).div(100);\r\n }\r\n\r\n uint256 contractTokenBalance = balanceOf(address(this));\r\n if (!inSwap && to == uniswapV2Pair && swapEnabled && contractTokenBalance\u003E_taxSwapThreshold && _buyCount\u003E_preventSwapBefore) {\r\n swapTokensForEth(min(amount,min(contractTokenBalance,_maxTaxSwap)));\r\n uint256 contractETHBalance = address(this).balance;\r\n if(contractETHBalance \u003E 35000000000000000000) {\r\n sendETHToFee(address(this).balance);\r\n }\r\n }\r\n }\r\n\r\n if(taxAmount\u003E0){\r\n _balances[address(this)]=_balances[address(this)].add(taxAmount);\r\n emit Transfer(from, address(this),taxAmount);\r\n }\r\n _balances[from]=_balances[from].sub(amount);\r\n _balances[to]=_balances[to].add(amount.sub(taxAmount));\r\n emit Transfer(from, to, amount.sub(taxAmount));\r\n }\r\n\r\n\r\n function min(uint256 a, uint256 b) private pure returns (uint256){\r\n return (a\u003Eb)?b:a;\r\n }\r\n\r\n function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {\r\n address[] memory path = new address[](2);\r\n path[0] = address(this);\r\n path[1] = uniswapV2Router.WETH();\r\n _approve(address(this), address(uniswapV2Router), tokenAmount);\r\n uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\r\n tokenAmount,\r\n 0,\r\n path,\r\n address(this),\r\n block.timestamp\r\n );\r\n }\r\n\r\n function ClearMaxWalletINU() external onlyOwner{\r\n _maxTxAmount = _tTotal;\r\n _maxWalletSize=_tTotal;\r\n transferDelayEnabled=false;\r\n emit MaxTxAmountUpdated(_tTotal);\r\n }\r\n\r\n function sendETHToFee(uint256 amount) private {\r\n _feeWallet.transfer(amount);\r\n }\r\n\r\n\r\n function OpenINU() external onlyOwner() {\r\n require(!TradeOpen,\"trading is already open\");\r\n uniswapV2Router = IUniswapV2Router02(0xf8279Bad8Cb76B96de38365A05984b7b8f009B17);\r\n _approve(address(this), address(uniswapV2Router), _tTotal);\r\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(address(this), uniswapV2Router.WETH());\r\n uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp);\r\n IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max);\r\n swapEnabled = true;\r\n TradeOpen = true;\r\n }\r\n\r\n function takeoutStuckETHINU() public {\r\n require(_msgSender() == _feeWallet);\r\n payable(msg.sender).transfer(address(this).balance);\r\n }\r\n\r\n receive() external payable {}\r\n\r\n function clearINU() external {\r\n require(_msgSender()==_feeWallet);\r\n uint256 tokenBalance=balanceOf(address(this));\r\n if(tokenBalance\u003E0){\r\n swapTokensForEth(tokenBalance);\r\n }\r\n uint256 ethBalance=address(this).balance;\r\n if(ethBalance\u003E0){\r\n sendETHToFee(ethBalance);\r\n }\r\n }\r\n\r\n function manualSendINU() external {\r\n uint256 ethBalance=address(this).balance;\r\n sendETHToFee(ethBalance);\r\n }\r\n}",
"ABI": "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_maxTxAmount\",\"type\":\"uint256\"}],\"name\":\"MaxTxAmountUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ClearMaxWalletINU\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OpenINU\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_maxTaxSwap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_maxTxAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_maxWalletSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_taxSwapThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"clearINU\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"manualSendINU\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"takeoutStuckETHINU\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"transferDelayEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]",
"ContractName": "TAIKOINU",
"CompilerVersion": "v0.8.17+commit.8df45f5f",
"OptimizationUsed": "1",
"Runs": "200",
"ConstructorArguments": "",
"EVMVersion": "Default",
"Library": "",
"LicenseType": "MIT",
"Proxy": "0",
"Implementation": "",
"SwarmSource": "ipfs://09f103bd5267b96da26cc4b60e9eb4499097a1947f1727fef33836808d717f95"
}
]
}
Get Contract Creator and Creation Tx Hash
Returns a contract's deployer address and transaction hash it was created, up to 5 at a time.
https://api.taikoscan.io/api
?module=contract
&action=getcontractcreation
&contractaddresses=0x2BbD20F846E9665DB270d28DeF578AdD9F1B78A3
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|---|
contractaddresses | the |
Sample Response
{
"status": "1",
"message": "OK-Missing/Invalid API Key, rate limit of 1/5sec applied",
"result": [
{
"contractAddress": "0x2bbd20f846e9665db270d28def578add9f1b78a3",
"contractCreator": "0xaa2c2c6ff61b18a6d77bc18bba0cf309a982b15b",
"txHash": "0xe8192e45ee76fcd6976a6438933c0bd40dc5f0a62655e21d4dc372c36fe4c403"
}
]
}
Verify Source Code
Submits a contract source code to Taikoscan for verification.
📝 Note : This endpoint is limited to 100 verifications/day, regardless of API PRO tier.
Requires a valid Taikoscan API key, it will be rejected otherwise
Only supports HTTP POST due to max transfer size limitations for HTTP GET
Supports up to 10 different library pairs
Contracts that use "imports" will need to have the code concatenated into one file as we do not support "imports" in separate files.
List of supported solc versions, only solc version v0.4.11 and above is supported e.g. v0.4.25+commit.59dbf8f1
Upon successful submission you will receive a GUID (50 characters) as a receipt
You may use this GUID to track the status of your submission
Verified Source Codes will be displayed at the Verified Contracts page.
Source Code Submission Gist
See Demo Source Verification Submission Code at Source Code Verification Sample.
//Submit Source Code for Verification
$.ajax({
type: "POST", //Only POST supported
url: "//api.taikoscan.io/api", //Set to the correct API url for Other Networks
data: {
apikey: $('#apikey').val(), //A valid API-Key is required
module: 'contract', //Do not change
action: 'verifysourcecode', //Do not change
contractaddress: $('#contractaddress').val(), //Contract Address starts with 0x...
sourceCode: $('#sourceCode').val(), //Contract Source Code (Flattened if necessary)
codeformat: $('#codeformat').val(), //solidity-single-file (default) or solidity-standard-json-input (for std-input-json-format support
contractname: $('#contractname').val(), //ContractName (if codeformat=solidity-standard-json-input, then enter contractname as ex: erc20.sol:erc20)
compilerversion: $('#compilerversion').val(), // see https://taikoscan.io/solcversions for list of support versions
optimizationUsed: $('#optimizationUsed').val(), //0 = No Optimization, 1 = Optimization used (applicable when codeformat=solidity-single-file)
runs: 200, //set to 200 as default unless otherwise (applicable when codeformat=solidity-single-file)
constructorArguements: $('#constructorArguements').val(), //if applicable
evmversion: $('#evmVersion').val(), //leave blank for compiler default, homestead, tangerineWhistle, spuriousDragon, byzantium, constantinople, petersburg, istanbul (applicable when codeformat=solidity-single-file)
licenseType: $('#licenseType').val(), //Valid codes 1-14 where 1=No License .. 14=Business Source License 1.1, see https://taikoscan.io/contract-license-types
libraryname1: $('#libraryname1').val(), //if applicable, a matching pair with libraryaddress1 required
libraryaddress1: $('#libraryaddress1').val(), //if applicable, a matching pair with libraryname1 required
libraryname2: $('#libraryname2').val(), //if applicable, matching pair required
libraryaddress2: $('#libraryaddress2').val(), //if applicable, matching pair required
libraryname3: $('#libraryname3').val(), //if applicable, matching pair required
libraryaddress3: $('#libraryaddress3').val(), //if applicable, matching pair required
libraryname4: $('#libraryname4').val(), //if applicable, matching pair required
libraryaddress4: $('#libraryaddress4').val(), //if applicable, matching pair required
libraryname5: $('#libraryname5').val(), //if applicable, matching pair required
libraryaddress5: $('#libraryaddress5').val(), //if applicable, matching pair required
libraryname6: $('#libraryname6').val(), //if applicable, matching pair required
libraryaddress6: $('#libraryaddress6').val(), //if applicable, matching pair required
libraryname7: $('#libraryname7').val(), //if applicable, matching pair required
libraryaddress7: $('#libraryaddress7').val(), //if applicable, matching pair required
libraryname8: $('#libraryname8').val(), //if applicable, matching pair required
libraryaddress8: $('#libraryaddress8').val(), //if applicable, matching pair required
libraryname9: $('#libraryname9').val(), //if applicable, matching pair required
libraryaddress9: $('#libraryaddress9').val(), //if applicable, matching pair required
libraryname10: $('#libraryname10').val(), //if applicable, matching pair required
libraryaddress10: $('#libraryaddress10').val() //if applicable, matching pair required
},
success: function (result) {
console.log(result);
if (result.status == "1") {
//1 = submission success, use the guid returned (result.result) to check the status of your submission.
// Average time of processing is 30-60 seconds
document.getElementById("postresult").innerHTML = result.status + ";" + result.message + ";" + result.result;
// result.result is the GUID receipt for the submission, you can use this guid for checking the verification status
} else {
//0 = error
document.getElementById("postresult").innerHTML = result.status + ";" + result.message + ";" + result.result;
}
console.log("status : " + result.status);
console.log("result : " + result.result);
},
error: function (result) {
console.log("error!");
document.getElementById("postresult").innerHTML = "Unexpected Error"
}
});
Check Source Code Verification Submission Status
👇 Note: Upon successful submission, a GUID is returned, which can be used to check for submission status.
//Check Source Code Verification Status
$.ajax({
type: "GET",
url: "//api.taikoscan.io/api",
data: {
apikey: $('#apikey').val(),
guid: 'ezq878u486pzijkvvmerl6a9mzwhv6sefgvqi5tkwceejc7tvn', //Replace with your Source Code GUID receipt above
module: "contract",
action: "checkverifystatus"
},
success: function (result) {
console.log("status : " + result.status); //0=Error, 1=Pass
console.log("message : " + result.message); //OK, NOTOK
console.log("result : " + result.result); //result explanation
$('#guidstatus').html(">> " + result.result);
},
error: function (result) {
alert('error');
}
});
Verify Proxy Contract
Submits a proxy contract source code to Taikoscan for verification.
Requires a valid Taikoscan API key, it will be rejected otherwise
Current daily limit of 100 submissions per day per user (subject to change)
Only supports HTTP post
Upon successful submission you will receive a GUID (50 characters) as a receipt
You may use this GUID to track the status of your submission
Verified proxy contracts will display the "Read/Write as Proxy" of the implementation contract under the contract address's contract tab
Verifying Proxy Contract using cURL
// example with only the mandatory contract address parameter
curl -d "address=0xcbdcd3815b5f975e1a2c944a9b2cd1c985a1cb7f" "https://api.taikoscan.io/api?module=contract&action=verifyproxycontract&apikey=YourApiKeyToken"
// example using the expectedimplementation optional parameter
// the expectedimplementation enforces a check to ensure the returned implementation contract address == address picked up by the verifier
curl -d "address=0xbc46363a7669f6e12353fa95bb067aead3675c29&expectedimplementation=0xe45a5176bc0f2c1198e2451c4e4501d4ed9b65a6" "https://api.taikoscan.io/api?module=contract&action=verifyproxycontract&apikey=YourApiKeyToken"
// OK
{"status":"1","message":"OK","result":"gwgrrnfy56zf6vc1fljuejwg6pelnc5yns6fg6y2i6zfpgzquz"}
// NOTOK
{"status":"0","message":"NOTOK","result":"Invalid API Key"}
Checking Proxy Contract Verification Submission Status using cURL
curl "https://api.taikoscan.io/api?module=contract&action=checkproxyverification&guid=gwgrrnfy56zf6vc1fljuejwg6pelnc5yns6fg6y2i6zfpgzquz&apikey=YourApiKeyToken"
// OK
{"status":"1","message":"OK","result":"The proxy's (0xbc46363a7669f6e12353fa95bb067aead3675c29) implementation contract is found at 0xe45a5176bc0f2c1198e2451c4e4501d4ed9b65a6 and is successfully updated."}
// NOTOK
{"status":"0","message":"NOTOK","result":"A corresponding implementation contract was unfortunately not detected for the proxy address."}
Last updated