飽き性の頭の中

List of ERC20 token addresses and assetData from 0x API (Mainnet & Kovan)

List of ERC20 token addresses and assetData from 0x API (Mainnet & Kovan)

tawachan
tawachan

Addresses and assetData are required to interact with ERC20 tokens on Ethereum.

They are basically constants that will not be changed. However, somehow I could not find the list for that and needed to fetch data via api.

Therefore, I listed up the token addresses and assetData for convenience. The list below contains only tokens available on 0x API.

Mainnet

   const tokensOnMainNet = [
  {
    symbol: "DAI",
    address: "0x6b175474e89094c44da98b954eedeac495271d0f",
    name: "Dai Stablecoin",
    decimals: 18,
    assetData: "0xf47261b00000000000000000000000006b175474e89094c44da98b954eedeac495271d0f",
  },
  {
    symbol: "REP",
    address: "0x1985365e9f78359a9B6AD760e32412f4a445E862",
    name: "Augur Reputation",
    decimals: 18,
    assetData: "0xf47261b00000000000000000000000001985365e9f78359a9b6ad760e32412f4a445e862",
  },
  {
    symbol: "WETH",
    address: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    name: "Wrapped Ether",
    decimals: 18,
    assetData: "0xf47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
  },
  {
    symbol: "ZRX",
    address: "0xe41d2489571d322189246dafa5ebde1f4699f498",
    name: "0x Protocol Token",
    decimals: 18,
    assetData: "0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498",
  },
  {
    symbol: "USDC",
    address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
    name: "USD Coin",
    decimals: 6,
    assetData: "0xf47261b0000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
  },
  {
    symbol: "BAT",
    address: "0x0d8775f648430679a709e98d2b0cb6250d2887ef",
    name: "Basic Attention Token",
    decimals: 18,
    assetData: "0xf47261b00000000000000000000000000d8775f648430679a709e98d2b0cb6250d2887ef",
  },
  {
    symbol: "MKR",
    address: "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2",
    name: "Maker",
    decimals: 18,
    assetData: "0xf47261b00000000000000000000000009f8f72aa9304c8b593d555f12ef6589cc3a579a2",
  },
  {
    symbol: "WBTC",
    address: "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
    name: "Wrapped BTC",
    decimals: 8,
    assetData: "0xf47261b00000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599",
  },
  {
    symbol: "SNX",
    address: "0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f",
    name: "Synthetix Network Token",
    decimals: 18,
    assetData: "0xf47261b0000000000000000000000000c011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f",
  },
  {
    symbol: "SUSD",
    address: "0x57ab1e02fee23774580c119740129eac7081e9d3",
    name: "sUSD",
    decimals: 18,
    assetData: "0xf47261b000000000000000000000000057ab1e02fee23774580c119740129eac7081e9d3",
  },
  {
    symbol: "KNC",
    address: "0xdd974d5c2e2928dea5f71b9825b8b646686bd200",
    name: "Kyber Network Crystal",
    decimals: 18,
    assetData: "0xf47261b0000000000000000000000000dd974d5c2e2928dea5f71b9825b8b646686bd200",
  },
  {
    symbol: "BNT",
    address: "0x1f573d6fb3f13d689ff844b4ce37794d79a7ff1c",
    name: "Bancor Network Token",
    decimals: 18,
    assetData: "0xf47261b00000000000000000000000001f573d6fb3f13d689ff844b4ce37794d79a7ff1c",
  },
  {
    symbol: "GNO",
    address: "0x6810e776880c02933d47db1b9fc05908e5386b96",
    name: "Gnosis Token",
    decimals: 18,
    assetData: "0xf47261b00000000000000000000000006810e776880c02933d47db1b9fc05908e5386b96",
  },
  {
    symbol: "LINK",
    address: "0x514910771af9ca656af840dff83e8264ecf986ca",
    name: "Chainlink Token",
    decimals: 18,
    assetData: "0xf47261b0000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca",
  },
  {
    symbol: "REN",
    address: "0x408e41876cccdc0f92210600ef50372656052a38",
    name: "Republic Protocol",
    decimals: 18,
    assetData: "0xf47261b0000000000000000000000000408e41876cccdc0f92210600ef50372656052a38",
  },
  {
    symbol: "GNT",
    address: "0xa74476443119a942de498590fe1f2454d7d4ac0d",
    name: "Golem Network Token",
    decimals: 18,
    assetData: "0xf47261b0000000000000000000000000a74476443119a942de498590fe1f2454d7d4ac0d",
  },
  {
    symbol: "OMG",
    address: "0xd26114cd6ee289accf82350c8d8487fedb8a0c07",
    name: "OmiseGO",
    decimals: 18,
    assetData: "0xf47261b0000000000000000000000000d26114cd6ee289accf82350c8d8487fedb8a0c07",
  },
  {
    symbol: "ANT",
    address: "0x960b236a07cf122663c4303350609a66a7b288c0",
    name: "Aragon Network Token",
    decimals: 18,
    assetData: "0xf47261b0000000000000000000000000960b236a07cf122663c4303350609a66a7b288c0",
  },
  {
    symbol: "SAI",
    address: "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359",
    name: "Sai Stablecoin v1.0",
    decimals: 18,
    assetData: "0xf47261b000000000000000000000000089d24a6b4ccb1b6faa2625fe562bdd9a23260359",
  },
  {
    symbol: "CVL",
    address: "0x01fa555c97d7958fa6f771f3bbd5ccd508f81e22",
    name: "Civil Token",
    decimals: 18,
    assetData: "0xf47261b000000000000000000000000001fa555c97d7958fa6f771f3bbd5ccd508f81e22",
  },
  {
    symbol: "DTH",
    address: "0x5adc961d6ac3f7062d2ea45fefb8d8167d44b190",
    name: "Dether",
    decimals: 18,
    assetData: "0xf47261b00000000000000000000000005adc961d6ac3f7062d2ea45fefb8d8167d44b190",
  },
  {
    symbol: "FOAM",
    address: "0x4946fcea7c692606e8908002e55a582af44ac121",
    name: "FOAM",
    decimals: 18,
    assetData: "0xf47261b00000000000000000000000004946fcea7c692606e8908002e55a582af44ac121",
  },
  {
    symbol: "AST",
    address: "0x27054b13b1b798b345b591a4d22e6562d47ea75a",
    name: "AirSwap Token",
    decimals: 4,
    assetData: "0xf47261b000000000000000000000000027054b13b1b798b345b591a4d22e6562d47ea75a",
  },
  {
    symbol: "AION",
    address: "0x4ceda7906a5ed2179785cd3a40a69ee8bc99c466",
    name: "Aion Network",
    decimals: 8,
    assetData: "0xf47261b00000000000000000000000004ceda7906a5ed2179785cd3a40a69ee8bc99c466",
  },
  {
    symbol: "GEN",
    address: "0x543ff227f64aa17ea132bf9886cab5db55dcaddf",
    name: "DAOstack",
    decimals: 18,
    assetData: "0xf47261b0000000000000000000000000543ff227f64aa17ea132bf9886cab5db55dcaddf",
  },
  {
    symbol: "STORJ",
    address: "0xb64ef51c888972c908cfacf59b47c1afbc0ab8ac",
    name: "Storj",
    decimals: 8,
    assetData: "0xf47261b0000000000000000000000000b64ef51c888972c908cfacf59b47c1afbc0ab8ac",
  },
  {
    symbol: "MANA",
    address: "0x0f5d2fb29fb7d3cfee444a200298f468908cc942",
    name: "Decentraland",
    decimals: 18,
    assetData: "0xf47261b00000000000000000000000000f5d2fb29fb7d3cfee444a200298f468908cc942",
  },
  {
    symbol: "ENTRP",
    address: "0x5bc7e5f0ab8b2e10d2d0a3f21739fce62459aef3",
    name: "Hut34 Entropy Token",
    decimals: 18,
    assetData: "0xf47261b00000000000000000000000005bc7e5f0ab8b2e10d2d0a3f21739fce62459aef3",
  },
  {
    symbol: "MLN",
    address: "0xbeb9ef514a379b997e0798fdcc901ee474b6d9a1",
    name: "Melon",
    decimals: 18,
    assetData: "0xf47261b0000000000000000000000000beb9ef514a379b997e0798fdcc901ee474b6d9a1",
  },
  {
    symbol: "LOOM",
    address: "0xa4e8c3ec456107ea67d3075bf9e3df3a75823db0",
    name: "Loom Network Token",
    decimals: 18,
    assetData: "0xf47261b0000000000000000000000000a4e8c3ec456107ea67d3075bf9e3df3a75823db0",
  },
  {
    symbol: "CELR",
    address: "0x4f9254c83eb525f9fcf346490bbb3ed28a81c667",
    name: "Celer Network Token",
    decimals: 18,
    assetData: "0xf47261b00000000000000000000000004f9254c83eb525f9fcf346490bbb3ed28a81c667",
  },
  {
    symbol: "RLC",
    address: "0x607f4c5bb672230e8672085532f7e901544a7375",
    name: "iExec RLC Token",
    decimals: 9,
    assetData: "0xf47261b0000000000000000000000000607f4c5bb672230e8672085532f7e901544a7375",
  },
  {
    symbol: "ICN",
    address: "0x888666ca69e0f178ded6d75b5726cee99a87d698",
    name: "ICONOMI",
    decimals: 18,
    assetData: "0xf47261b0000000000000000000000000888666ca69e0f178ded6d75b5726cee99a87d698",
  },
  {
    symbol: "DGD",
    address: "0xe0b7927c4af23765cb51314a0e0521a9645f0e2a",
    name: "Digix",
    decimals: 9,
    assetData: "0xf47261b0000000000000000000000000e0b7927c4af23765cb51314a0e0521a9645f0e2a",
  },
  {
    symbol: "ZIL",
    address: "0x05f4a42e251f2d52b8ed15e9fedaacfcef1fad27",
    name: "Zilliqa",
    decimals: 12,
    assetData: "0xf47261b000000000000000000000000005f4a42e251f2d52b8ed15e9fedaacfcef1fad27",
  },
  {
    symbol: "cBAT",
    address: "0x6c8c6b02e7b2be14d4fa6022dfd6d75921d90e4e",
    name: "Compound Basic Attention Token",
    decimals: 8,
    assetData: "0xf47261b00000000000000000000000006c8c6b02e7b2be14d4fa6022dfd6d75921d90e4e",
  },
  {
    symbol: "cSAI",
    address: "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
    name: "Compound Dai",
    decimals: 8,
    assetData: "0xf47261b00000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e3643",
  },
  {
    symbol: "cSAI",
    address: "0xf5dce57282a584d2746faf1593d3121fcac444dc",
    name: "Compound Sai (Legacy Dai)",
    decimals: 8,
    assetData: "0xf47261b0000000000000000000000000f5dce57282a584d2746faf1593d3121fcac444dc",
  },
  {
    symbol: "cETH",
    address: "0x4ddc2d193948926d02f9b1fe9e1daa0718270ed5",
    name: "Compound Ether",
    decimals: 8,
    assetData: "0xf47261b00000000000000000000000004ddc2d193948926d02f9b1fe9e1daa0718270ed5",
  },
  {
    symbol: "cREP",
    address: "0x158079ee67fce2f58472a96584a73c7ab9ac95c1",
    name: "Compound Augur",
    decimals: 8,
    assetData: "0xf47261b0000000000000000000000000158079ee67fce2f58472a96584a73c7ab9ac95c1",
  },
  {
    symbol: "cUSDC",
    address: "0x39aa39c021dfbae8fac545936693ac917d5e7563",
    name: "Compound USD Coin",
    decimals: 8,
    assetData: "0xf47261b000000000000000000000000039aa39c021dfbae8fac545936693ac917d5e7563",
  },
  {
    symbol: "cZRX",
    address: "0xb3319f5d18bc0d84dd1b4825dcde5d5f7266d407",
    name: "Compound 0x",
    decimals: 8,
    assetData: "0xf47261b0000000000000000000000000b3319f5d18bc0d84dd1b4825dcde5d5f7266d407",
  },
  {
    symbol: "0xBTC",
    address: "0xb6ed7644c69416d67b522e20bc294a9a9b405b31",
    name: "0xBitcoin Token",
    decimals: 8,
    assetData: "0xf47261b0000000000000000000000000b6ed7644c69416d67b522e20bc294a9a9b405b31",
  },
  {
    symbol: "SNT",
    address: "0x744d70fdbe2ba4cf95131626614a1763df805b9e",
    name: "Status Network Token",
    decimals: 18,
    assetData: "0xf47261b0000000000000000000000000744d70fdbe2ba4cf95131626614a1763df805b9e",
  },
  {
    symbol: "SPANK",
    address: "0x42d6622dece394b54999fbd73d108123806f6a18",
    name: "SPANK",
    decimals: 18,
    assetData: "0xf47261b000000000000000000000000042d6622dece394b54999fbd73d108123806f6a18",
  },
  {
    symbol: "BOOTY",
    address: "0x6b01c3170ae1efebee1a3159172cb3f7a5ecf9e5",
    name: "BOOTY",
    decimals: 18,
    assetData: "0xf47261b00000000000000000000000006b01c3170ae1efebee1a3159172cb3f7a5ecf9e5",
  },
  {
    symbol: "BNB",
    address: "0xb8c77482e45f1f44de1745f52c74426c631bdd52",
    name: "Binance Coin",
    decimals: 18,
    assetData: "0xf47261b0000000000000000000000000b8c77482e45f1f44de1745f52c74426c631bdd52",
  },
  {
    symbol: "ICX",
    address: "0xb5a5f22694352c15b00323844ad545abb2b11028",
    name: "ICON",
    decimals: 18,
    assetData: "0xf47261b0000000000000000000000000b5a5f22694352c15b00323844ad545abb2b11028",
  },
  {
    symbol: "NMR",
    address: "0x1776e1f26f98b1a5df9cd347953a26dd3cb46671",
    name: "Numeraire",
    decimals: 18,
    assetData: "0xf47261b00000000000000000000000001776e1f26f98b1a5df9cd347953a26dd3cb46671",
  },
  {
    symbol: "GUSD",
    address: "0x056fd409e1d7a124bd7017459dfea2f387b6d5cd",
    name: "Gemini Dollar",
    decimals: 2,
    assetData: "0xf47261b0000000000000000000000000056fd409e1d7a124bd7017459dfea2f387b6d5cd",
  },
  {
    symbol: "FUN",
    address: "0x419d0d8bdd9af5e606ae2232ed285aff190e711b",
    name: "FunFair",
    decimals: 8,
    assetData: "0xf47261b0000000000000000000000000419d0d8bdd9af5e606ae2232ed285aff190e711b",
  },
  {
    symbol: "PAX",
    address: "0x8e870d67f660d95d5be530380d0ec0bd388289e1",
    name: "PAX Stablecoin",
    decimals: 18,
    assetData: "0xf47261b00000000000000000000000008e870d67f660d95d5be530380d0ec0bd388289e1",
  },
  {
    symbol: "TUSD",
    address: "0x0000000000085d4780b73119b644ae5ecd22b376",
    name: "TrueUSD",
    decimals: 18,
    assetData: "0xf47261b00000000000000000000000000000000000085d4780b73119b644ae5ecd22b376",
  },
  {
    symbol: "LPT",
    address: "0x58b6a8a3302369daec383334672404ee733ab239",
    name: "Livepeer",
    decimals: 18,
    assetData: "0xf47261b000000000000000000000000058b6a8a3302369daec383334672404ee733ab239",
  },
  {
    symbol: "ENJ",
    address: "0xf629cbd94d3791c9250152bd8dfbdf380e2a3b9c",
    name: "EnjinCoin",
    decimals: 18,
    assetData: "0xf47261b0000000000000000000000000f629cbd94d3791c9250152bd8dfbdf380e2a3b9c",
  },
  {
    symbol: "POWR",
    address: "0x595832f8fc6bf59c85c527fec3740a1b7a361269",
    name: "PowerLedger",
    decimals: 6,
    assetData: "0xf47261b0000000000000000000000000595832f8fc6bf59c85c527fec3740a1b7a361269",
  },
  {
    symbol: "REQ",
    address: "0x8f8221afbb33998d8584a2b05749ba73c37a938a",
    name: "Request",
    decimals: 18,
    assetData: "0xf47261b00000000000000000000000008f8221afbb33998d8584a2b05749ba73c37a938a",
  },
  {
    symbol: "DNT",
    address: "0x0abdace70d3790235af448c88547603b945604ea",
    name: "district0x",
    decimals: 18,
    assetData: "0xf47261b00000000000000000000000000abdace70d3790235af448c88547603b945604ea",
  },
  {
    symbol: "MATIC",
    address: "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0",
    name: "Matic Network Token",
    decimals: 18,
    assetData: "0xf47261b00000000000000000000000007d1afa7b718fb893db30a3abc0cfc608aacfebb0",
  },
  {
    symbol: "LRC",
    address: "0xbbbbca6a901c926f240b89eacb641d8aec7aeafd",
    name: "Loopring",
    decimals: 18,
    assetData: "0xf47261b0000000000000000000000000bbbbca6a901c926f240b89eacb641d8aec7aeafd",
  },
  {
    symbol: "RDN",
    address: "0x255aa6df07540cb5d3d297f0d0d4d84cb52bc8e6",
    name: "Raiden Network Token",
    decimals: 18,
    assetData: "0xf47261b0000000000000000000000000255aa6df07540cb5d3d297f0d0d4d84cb52bc8e6",
  },
  {
    symbol: "USDT",
    address: "0xdac17f958d2ee523a2206206994597c13d831ec7",
    name: "Tether USD",
    decimals: 6,
    assetData: "0xf47261b0000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7",
  },
];

Kovan

   const tokensOnKovan = [
  {
    symbol: "DAI",
    address: "0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa",
    name: "Dai Stablecoin",
    decimals: 18,
    assetData: "0xf47261b00000000000000000000000004f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa",
  },
  {
    symbol: "REP",
    address: "0x4e5cb5a0caca30d1ad27d8cd8200a907854fb518",
    name: "Augur Reputation",
    decimals: 18,
    assetData: "0xf47261b00000000000000000000000004e5cb5a0caca30d1ad27d8cd8200a907854fb518",
  },
  {
    symbol: "WETH",
    address: "0xd0a1e359811322d97991e03f863a0c30c2cf029c",
    name: "Wrapped Ether",
    decimals: 18,
    assetData: "0xf47261b0000000000000000000000000d0a1e359811322d97991e03f863a0c30c2cf029c",
  },
  {
    symbol: "ZRX",
    address: "0x2002d3812f58e35f0ea1ffbf80a75a38c32175fa",
    name: "0x Protocol Token",
    decimals: 18,
    assetData: "0xf47261b00000000000000000000000002002d3812f58e35f0ea1ffbf80a75a38c32175fa",
  },
  {
    symbol: "USDC",
    address: "0x75b0622cec14130172eae9cf166b92e5c112faff",
    name: "USD Coin",
    decimals: 6,
    assetData: "0xf47261b000000000000000000000000075b0622cec14130172eae9cf166b92e5c112faff",
  },
  {
    symbol: "BAT",
    address: "0x9f8cfb61d3b2af62864408dd703f9c3beb55dff7",
    name: "Basic Attention Token",
    decimals: 18,
    assetData: "0xf47261b00000000000000000000000009f8cfb61d3b2af62864408dd703f9c3beb55dff7",
  },
  {
    symbol: "MKR",
    address: "0xaaf64bfcc32d0f15873a02163e7e500671a4ffcd",
    name: "Maker",
    decimals: 18,
    assetData: "0xf47261b0000000000000000000000000aaf64bfcc32d0f15873a02163e7e500671a4ffcd",
  },
  {
    symbol: "WBTC",
    address: "0xa0a5ad2296b38bd3e3eb59aaeaf1589e8d9a29a9",
    name: "Wrapped BTC",
    decimals: 8,
    assetData: "0xf47261b0000000000000000000000000a0a5ad2296b38bd3e3eb59aaeaf1589e8d9a29a9",
  },
  {
    symbol: "KNC",
    address: "0xad67cb4d63c9da94aca37fdf2761aadf780ff4a2",
    name: "Kyber Network Crystal",
    decimals: 18,
    assetData: "0xf47261b0000000000000000000000000ad67cb4d63c9da94aca37fdf2761aadf780ff4a2",
  },
  {
    symbol: "SAI",
    address: "0xc4375b7de8af5a38a93548eb8453a498222c4ff2",
    name: "Sai Stablecoin v1.0",
    decimals: 18,
    assetData: "0xf47261b0000000000000000000000000c4375b7de8af5a38a93548eb8453a498222c4ff2",
  },
  {
    symbol: "cREP",
    address: "0xfd874be7e6733bdc6dca9c7cdd97c225ec235d39",
    name: "Compound Augur",
    decimals: 8,
    assetData: "0xf47261b0000000000000000000000000fd874be7e6733bdc6dca9c7cdd97c225ec235d39",
  },
  {
    symbol: "cZRX",
    address: "0xc014dc10a57ac78350c5fddb26bb66f1cb0960a0",
    name: "Compound 0x",
    decimals: 8,
    assetData: "0xf47261b0000000000000000000000000c014dc10a57ac78350c5fddb26bb66f1cb0960a0",
  },
];

How to fetch data above

   import fetch from "node-fetch";

import { assetDataUtils } from "@0x/order-utils";

const fetchTokens = async (): Promise<
  {
    symbol: string;
    address: string;
    name: string;
    decimals: number;
    assetData: string;
  }[]
> => {
  const host0xApi = "https://api.0x.org";
  const path = "/swap/v0/tokens";

  const queries = {};
  const qs = new URLSearchParams(queries);
  const url = new URL(host0xApi + path + "?" + qs);

  const response = await fetch(url);
  const json = await response.json();

  tokens = json.records.map((t: any) => {
    const assetData = assetDataUtils.encodeERC20AssetData(t.address);
    return { ...t, assetData };
  });
  return tokens;
};

関連記事

カテゴリー

タグ