Skip to content

Commit

Permalink
ALL-3492 usdc matic native (#1026)
Browse files Browse the repository at this point in the history
ALL-3492 Add support for USDC matic native token

Co-authored-by: jiri.andras <jiri.andras@tatum.io>
  • Loading branch information
oliverjantar and jiri.andras authored Nov 20, 2023
1 parent aed5166 commit a309bb2
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tatumio",
"version": "2.2.40",
"version": "2.2.41",
"license": "MIT",
"repository": "https://github.com/tatumio/tatum-js",
"scripts": {
Expand Down
10 changes: 6 additions & 4 deletions packages/api-client/src/api_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -59426,7 +59426,7 @@
"CreateAccount": {
"properties": {
"currency": {
"description": "<p>The currency for the virtual account</p>\n<ul>\n<li><b>Native blockchain assets:</b> ALGO, BCH, BNB, BSC, BTC, CELO, DOGE, EGLD, ETH, FLOW, KCS, KLAY, LTC, MATIC, ONE, SOL, TRON, VET, XDC, XLM, XRP</li>\n<li><b>Digital assets:</b> BADA, BAT, BBCH, BBTC, BDOT, BETH, BLTC, BUSD, BUSD_BSC, BXRP, CAKE, FREE, GMC, LEO, LINK, MKR, MMY, PAX, PAXG, TUSD, UNI, USD_BSC, USDC, USDC_MATIC, USDT, USDT_TRON, WBNB, WBTC, XCON</li>\n<li><b><a href=\"https://apidoc.tatum.io/tag/Virtual-Currency\" target=\"_blank\">Virtual currency</a></b> registered on the Tatum platform and starting with the \"VC_\" prefix</li>\n<li><b><a href=\"https://apidoc.tatum.io/tag/Blockchain-operations#operation/BnbAssetOffchain\" target=\"_blank\">BNB assets</a>, <a href=\"https://apidoc.tatum.io/tag/Blockchain-operations#operation/XlmAssetOffchain\" target=\"_blank\">XLM assets</a>, and <a href=\"https://apidoc.tatum.io/tag/Blockchain-operations#operation/XrpAssetOffchain\" target=\"_blank\">XRP assets</a></b> created via the Tatum platform</li>\n<li><b>Custom fungible tokens</b> (ERC-20 or equivalent, such as BEP-20 or TRC-10/20) registered on the Tatum platform; for more information, see <a href=\"https://docs.tatum.io/guides/ledger-and-off-chain/how-to-connect-custom-erc-20-token-to-the-ledger\" target=\"_blank\">our user documentation</a>\n<br/>The fungible tokens do not have direct faucets on the testnet. To use them in a testnet environment, you have to register a new fungible token in a virtual account (use <a href=\"https://apidoc.tatum.io/tag/Blockchain-operations/#operation/createTrc\" target=\"_blank\">this API</a> for TRON TRC-10/20 tokens and <a href=\"https://apidoc.tatum.io/tag/Blockchain-operations/#operation/registerErc20Token\" target=\"_blank\">this API</a> for any other tokens) and make sure that your tokens minted on the testnet are <a href=\"https://apidoc.tatum.io/tag/Blockchain-operations/#operation/storeTokenAddress\" target=\"_blank\">linked to the token smart contract</a>.</li>\n</ul>\n",
"description": "<p>The currency for the virtual account</p>\n<ul>\n<li><b>Native blockchain assets:</b> ALGO, BCH, BNB, BSC, BTC, CELO, DOGE, EGLD, ETH, FLOW, KCS, KLAY, LTC, MATIC, ONE, SOL, TRON, VET, XDC, XLM, XRP</li>\n<li><b>Digital assets:</b> BADA, BAT, BBCH, BBTC, BDOT, BETH, BLTC, BUSD, BUSD_BSC, BXRP, CAKE, FREE, GMC, LEO, LINK, MKR, MMY, PAX, PAXG, TUSD, UNI, USD_BSC, USDC, USDC_MATIC, USDC_MATIC_NATIVE, USDT, USDT_TRON, WBNB, WBTC, XCON</li>\n<li><b><a href=\"https://apidoc.tatum.io/tag/Virtual-Currency\" target=\"_blank\">Virtual currency</a></b> registered on the Tatum platform and starting with the \"VC_\" prefix</li>\n<li><b><a href=\"https://apidoc.tatum.io/tag/Blockchain-operations#operation/BnbAssetOffchain\" target=\"_blank\">BNB assets</a>, <a href=\"https://apidoc.tatum.io/tag/Blockchain-operations#operation/XlmAssetOffchain\" target=\"_blank\">XLM assets</a>, and <a href=\"https://apidoc.tatum.io/tag/Blockchain-operations#operation/XrpAssetOffchain\" target=\"_blank\">XRP assets</a></b> created via the Tatum platform</li>\n<li><b>Custom fungible tokens</b> (ERC-20 or equivalent, such as BEP-20 or TRC-10/20) registered on the Tatum platform; for more information, see <a href=\"https://docs.tatum.io/guides/ledger-and-off-chain/how-to-connect-custom-erc-20-token-to-the-ledger\" target=\"_blank\">our user documentation</a>\n<br/>The fungible tokens do not have direct faucets on the testnet. To use them in a testnet environment, you have to register a new fungible token in a virtual account (use <a href=\"https://apidoc.tatum.io/tag/Blockchain-operations/#operation/createTrc\" target=\"_blank\">this API</a> for TRON TRC-10/20 tokens and <a href=\"https://apidoc.tatum.io/tag/Blockchain-operations/#operation/registerErc20Token\" target=\"_blank\">this API</a> for any other tokens) and make sure that your tokens minted on the testnet are <a href=\"https://apidoc.tatum.io/tag/Blockchain-operations/#operation/storeTokenAddress\" target=\"_blank\">linked to the token smart contract</a>.</li>\n</ul>\n",
"example": "BTC",
"maxLength": 40,
"minLength": 2,
Expand Down Expand Up @@ -59468,7 +59468,7 @@
"CreateAccountXpub": {
"properties": {
"currency": {
"description": "<p>The currency for the virtual account</p>\n<ul>\n<li><b>Native blockchain assets:</b> ALGO, BCH, BNB, BSC, BTC, CELO, DOGE, EGLD, ETH, FLOW, KCS, KLAY, LTC, MATIC, ONE, SOL, TRON, VET, XDC, XLM, XRP</li>\n<li><b>Digital assets:</b> BADA, BAT, BBCH, BBTC, BDOT, BETH, BLTC, BUSD, BUSD_BSC, BXRP, CAKE, FREE, GMC, LEO, LINK, MKR, MMY, PAX, PAXG, TUSD, UNI, USD_BSC, USDC, USDC_MATIC, USDT, USDT_TRON, WBNB, WBTC, XCON</li>\n<li><b><a href=\"https://apidoc.tatum.io/tag/Virtual-Currency\" target=\"_blank\">Virtual currency</a></b> registered on the Tatum platform and starting with the \"VC_\" prefix</li>\n<li><b><a href=\"https://apidoc.tatum.io/tag/Blockchain-operations#operation/BnbAssetOffchain\" target=\"_blank\">BNB assets</a>, <a href=\"https://apidoc.tatum.io/tag/Blockchain-operations#operation/XlmAssetOffchain\" target=\"_blank\">XLM assets</a>, and <a href=\"https://apidoc.tatum.io/tag/Blockchain-operations#operation/XrpAssetOffchain\" target=\"_blank\">XRP assets</a></b> created via the Tatum platform</li>\n<li><b>Custom fungible tokens</b> (ERC-20 or equivalent, such as BEP-20 or TRC-10/20) registered on the Tatum platform; for more information, see <a href=\"https://docs.tatum.io/guides/ledger-and-off-chain/how-to-connect-custom-erc-20-token-to-the-ledger\" target=\"_blank\">our user documentation</a>\n<br/>The fungible tokens do not have direct faucets on the testnet. To use them in a testnet environment, you have to register a new fungible token in a virtual account (use <a href=\"https://apidoc.tatum.io/tag/Blockchain-operations/#operation/createTrc\" target=\"_blank\">this API</a> for TRON TRC-10/20 tokens and <a href=\"https://apidoc.tatum.io/tag/Blockchain-operations/#operation/registerErc20Token\" target=\"_blank\">this API</a> for any other tokens) and make sure that your tokens minted on the testnet are <a href=\"https://apidoc.tatum.io/tag/Blockchain-operations/#operation/storeTokenAddress\" target=\"_blank\">linked to the token smart contract</a>.</li>\n</ul>\n",
"description": "<p>The currency for the virtual account</p>\n<ul>\n<li><b>Native blockchain assets:</b> ALGO, BCH, BNB, BSC, BTC, CELO, DOGE, EGLD, ETH, FLOW, KCS, KLAY, LTC, MATIC, ONE, SOL, TRON, VET, XDC, XLM, XRP</li>\n<li><b>Digital assets:</b> BADA, BAT, BBCH, BBTC, BDOT, BETH, BLTC, BUSD, BUSD_BSC, BXRP, CAKE, FREE, GMC, LEO, LINK, MKR, MMY, PAX, PAXG, TUSD, UNI, USD_BSC, USDC, USDC_MATIC, USDC_MATIC_NATIVE, USDT, USDT_TRON, WBNB, WBTC, XCON</li>\n<li><b><a href=\"https://apidoc.tatum.io/tag/Virtual-Currency\" target=\"_blank\">Virtual currency</a></b> registered on the Tatum platform and starting with the \"VC_\" prefix</li>\n<li><b><a href=\"https://apidoc.tatum.io/tag/Blockchain-operations#operation/BnbAssetOffchain\" target=\"_blank\">BNB assets</a>, <a href=\"https://apidoc.tatum.io/tag/Blockchain-operations#operation/XlmAssetOffchain\" target=\"_blank\">XLM assets</a>, and <a href=\"https://apidoc.tatum.io/tag/Blockchain-operations#operation/XrpAssetOffchain\" target=\"_blank\">XRP assets</a></b> created via the Tatum platform</li>\n<li><b>Custom fungible tokens</b> (ERC-20 or equivalent, such as BEP-20 or TRC-10/20) registered on the Tatum platform; for more information, see <a href=\"https://docs.tatum.io/guides/ledger-and-off-chain/how-to-connect-custom-erc-20-token-to-the-ledger\" target=\"_blank\">our user documentation</a>\n<br/>The fungible tokens do not have direct faucets on the testnet. To use them in a testnet environment, you have to register a new fungible token in a virtual account (use <a href=\"https://apidoc.tatum.io/tag/Blockchain-operations/#operation/createTrc\" target=\"_blank\">this API</a> for TRON TRC-10/20 tokens and <a href=\"https://apidoc.tatum.io/tag/Blockchain-operations/#operation/registerErc20Token\" target=\"_blank\">this API</a> for any other tokens) and make sure that your tokens minted on the testnet are <a href=\"https://apidoc.tatum.io/tag/Blockchain-operations/#operation/storeTokenAddress\" target=\"_blank\">linked to the token smart contract</a>.</li>\n</ul>\n",
"example": "BTC",
"maxLength": 40,
"minLength": 2,
Expand Down Expand Up @@ -88788,10 +88788,11 @@
"type": "string"
},
"currency": {
"description": "Currency to transfer from Polygon Blockchain Account. ERC20 tokens like USDC_MATIC, USDT_MATIC, GAMEE, INTENT, EURTENT, GOLDAX are available only for mainnet use.",
"description": "Currency to transfer from Polygon Blockchain Account. ERC20 tokens like USDC_MATIC, USDC_MATIC_NATIVE, USDT_MATIC, GAMEE, INTENT, EURTENT, GOLDAX are available only for mainnet use.",
"enum": [
"MATIC",
"USDC_MATIC",
"USDC_MATIC_NATIVE",
"USDT_MATIC",
"GAMEE",
"INTENT",
Expand Down Expand Up @@ -88884,10 +88885,11 @@
"type": "string"
},
"currency": {
"description": "Currency to transfer from Polygon Blockchain Account. ERC20 tokens like USDC_MATIC, USDT_MATIC, GAMEE, INTENT, EURTENT, GOLDAX are available only for mainnet use.",
"description": "Currency to transfer from Polygon Blockchain Account. ERC20 tokens like USDC_MATIC, USDC_MATIC_NATIVE, USDT_MATIC, GAMEE, INTENT, EURTENT, GOLDAX are available only for mainnet use.",
"enum": [
"MATIC",
"USDC_MATIC",
"USDC_MATIC_NATIVE",
"USDT_MATIC",
"GAMEE",
"INTENT",
Expand Down
2 changes: 1 addition & 1 deletion packages/api-client/src/generated/models/CreateAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type CreateAccount = {
* <p>The currency for the virtual account</p>
* <ul>
* <li><b>Native blockchain assets:</b> ALGO, BCH, BNB, BSC, BTC, CELO, DOGE, EGLD, ETH, FLOW, KCS, KLAY, LTC, MATIC, ONE, SOL, TRON, VET, XDC, XLM, XRP</li>
* <li><b>Digital assets:</b> BADA, BAT, BBCH, BBTC, BDOT, BETH, BLTC, BUSD, BUSD_BSC, BXRP, CAKE, FREE, GMC, LEO, LINK, MKR, MMY, PAX, PAXG, TUSD, UNI, USD_BSC, USDC, USDC_MATIC, USDT, USDT_TRON, WBNB, WBTC, XCON</li>
* <li><b>Digital assets:</b> BADA, BAT, BBCH, BBTC, BDOT, BETH, BLTC, BUSD, BUSD_BSC, BXRP, CAKE, FREE, GMC, LEO, LINK, MKR, MMY, PAX, PAXG, TUSD, UNI, USD_BSC, USDC, USDC_MATIC, USDC_MATIC_NATIVE, USDT, USDT_TRON, WBNB, WBTC, XCON</li>
* <li><b><a href="https://apidoc.tatum.io/tag/Virtual-Currency" target="_blank">Virtual currency</a></b> registered on the Tatum platform and starting with the "VC_" prefix</li>
* <li><b><a href="https://apidoc.tatum.io/tag/Blockchain-operations#operation/BnbAssetOffchain" target="_blank">BNB assets</a>, <a href="https://apidoc.tatum.io/tag/Blockchain-operations#operation/XlmAssetOffchain" target="_blank">XLM assets</a>, and <a href="https://apidoc.tatum.io/tag/Blockchain-operations#operation/XrpAssetOffchain" target="_blank">XRP assets</a></b> created via the Tatum platform</li>
* <li><b>Custom fungible tokens</b> (ERC-20 or equivalent, such as BEP-20 or TRC-10/20) registered on the Tatum platform; for more information, see <a href="https://docs.tatum.io/guides/ledger-and-off-chain/how-to-connect-custom-erc-20-token-to-the-ledger" target="_blank">our user documentation</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type CreateAccountXpub = {
* <p>The currency for the virtual account</p>
* <ul>
* <li><b>Native blockchain assets:</b> ALGO, BCH, BNB, BSC, BTC, CELO, DOGE, EGLD, ETH, FLOW, KCS, KLAY, LTC, MATIC, ONE, SOL, TRON, VET, XDC, XLM, XRP</li>
* <li><b>Digital assets:</b> BADA, BAT, BBCH, BBTC, BDOT, BETH, BLTC, BUSD, BUSD_BSC, BXRP, CAKE, FREE, GMC, LEO, LINK, MKR, MMY, PAX, PAXG, TUSD, UNI, USD_BSC, USDC, USDC_MATIC, USDT, USDT_TRON, WBNB, WBTC, XCON</li>
* <li><b>Digital assets:</b> BADA, BAT, BBCH, BBTC, BDOT, BETH, BLTC, BUSD, BUSD_BSC, BXRP, CAKE, FREE, GMC, LEO, LINK, MKR, MMY, PAX, PAXG, TUSD, UNI, USD_BSC, USDC, USDC_MATIC, USDC_MATIC_NATIVE, USDT, USDT_TRON, WBNB, WBTC, XCON</li>
* <li><b><a href="https://apidoc.tatum.io/tag/Virtual-Currency" target="_blank">Virtual currency</a></b> registered on the Tatum platform and starting with the "VC_" prefix</li>
* <li><b><a href="https://apidoc.tatum.io/tag/Blockchain-operations#operation/BnbAssetOffchain" target="_blank">BNB assets</a>, <a href="https://apidoc.tatum.io/tag/Blockchain-operations#operation/XlmAssetOffchain" target="_blank">XLM assets</a>, and <a href="https://apidoc.tatum.io/tag/Blockchain-operations#operation/XrpAssetOffchain" target="_blank">XRP assets</a></b> created via the Tatum platform</li>
* <li><b>Custom fungible tokens</b> (ERC-20 or equivalent, such as BEP-20 or TRC-10/20) registered on the Tatum platform; for more information, see <a href="https://docs.tatum.io/guides/ledger-and-off-chain/how-to-connect-custom-erc-20-token-to-the-ledger" target="_blank">our user documentation</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ export type TransferPolygonBlockchain = {
*/
to: string;
/**
* Currency to transfer from Polygon Blockchain Account. ERC20 tokens like USDC_MATIC, USDT_MATIC, GAMEE, INTENT, EURTENT, GOLDAX are available only for mainnet use.
* Currency to transfer from Polygon Blockchain Account. ERC20 tokens like USDC_MATIC, USDT_MATIC, USDC_MATIC_NATIVE, GAMEE, INTENT, EURTENT, GOLDAX are available only for mainnet use.
*/
currency: 'MATIC' | 'USDC_MATIC' | 'USDT_MATIC' | 'GAMEE' | 'INTENT' | 'EURTENT' | 'GOLDAX';
currency: 'MATIC' | 'USDC_MATIC' | 'USDC_MATIC_NATIVE' | 'USDT_MATIC' | 'GAMEE' | 'INTENT' | 'EURTENT' | 'GOLDAX';
fee?: CustomFee;
/**
* Amount to be sent.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ export type TransferPolygonBlockchainKMS = {
*/
to: string;
/**
* Currency to transfer from Polygon Blockchain Account. ERC20 tokens like USDC_MATIC, USDT_MATIC, GAMEE, INTENT, EURTENT, GOLDAX are available only for mainnet use.
* Currency to transfer from Polygon Blockchain Account. ERC20 tokens like USDC_MATIC, USDT_MATIC, USDC_MATIC_NATIVE, GAMEE, INTENT, EURTENT, GOLDAX are available only for mainnet use.
*/
currency: 'MATIC' | 'USDC_MATIC' | 'USDT_MATIC' | 'GAMEE' | 'INTENT' | 'EURTENT' | 'GOLDAX';
currency: 'MATIC' | 'USDC_MATIC' | 'USDC_MATIC_NATIVE' | 'USDT_MATIC' | 'GAMEE' | 'INTENT' | 'EURTENT' | 'GOLDAX';
fee?: CustomFee;
/**
* Amount to be sent.
Expand Down
2 changes: 2 additions & 0 deletions packages/api-client/src/lib/models/Currency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export enum Currency {
GAMEE = 'GAMEE',
MATIC_ETH = 'MATIC_ETH',
USDC_MATIC = 'USDC_MATIC',
USDC_MATIC_NATIVE = 'USDC_MATIC_NATIVE',
USDC_BSC = 'USDC_BSC',
USDC_SOL = 'USDC_SOL',
RMD = 'RMD',
Expand Down Expand Up @@ -172,6 +173,7 @@ export const CELO_CURRENCIES = [Currency.CELO, Currency.CEUR, Currency.CUSD]

export const MATIC20_CURRENCIES = [
Currency.USDC_MATIC,
Currency.USDC_MATIC_NATIVE,
Currency.GAMEE,
Currency.USDT_MATIC,
Currency.INTENT,
Expand Down
2 changes: 2 additions & 0 deletions packages/shared/core/src/lib/contract.common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const CONTRACT_ADDRESSES = {
[Currency.USDT_TRON.toString()]: 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t',
[Currency.INRT_TRON.toString()]: 'TX66VmiV1txm45vVLvcHYEqPXXLoREyAXm',
[Currency.USDC_MATIC.toString()]: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174',
[Currency.USDC_MATIC_NATIVE.toString()]: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359',
[Currency.USDC_BSC.toString()]: '0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d',
[Currency.B2U_BSC.toString()]: '0x02926e6e2898e9235fdddde3f51c3b644af8c403',
[Currency.BUSD.toString()]: '0x4fabb145d64652a948d72533023f6e7a623c7c53',
Expand Down Expand Up @@ -76,6 +77,7 @@ export const CONTRACT_DECIMALS = {
[Currency.REVV.toString()]: 18,
[Currency.SAND.toString()]: 18,
[Currency.USDC_MATIC.toString()]: 6,
[Currency.USDC_MATIC_NATIVE.toString()]: 6,
[Currency.USDC_BSC.toString()]: 18,
[Currency.B2U_BSC.toString()]: 18,
[Currency.BETH.toString()]: 18,
Expand Down

0 comments on commit a309bb2

Please sign in to comment.