Polygon POS Chain

Polygon POS chain

Polygon can be accessed with the following coin types

EnvironmentCoin TypeFaucet
Polygon Productionpolygon
Polygon Amoy Testnettpolygonhttps://faucet.polygon.technology/

Explorer

https://polygonscan.com/

Enterprise fee address

1 2 3 4 5 ENTERPRISEID=585c51a5df8380e0e3082e46 curl -X POST \ -H "Authorization: Bearer $ACCESS_TOKEN" \ https://app.bitgo-test.com/api/v2/tpolygon/enterprise/$ENTERPRISEID/feeAddressBalance

Polygon is a Layer-2 scaling solution created to help speed up the Ethereum platform and help in adoption. Each enterprise has a fee address which will be used to pay for transaction fees on all Polygon wallets in that enterprise. The fee address is displayed in the dashboard of the BitGo website, and you must fund it before creating a wallet, address, or sending a transaction. If the enterprise's fee address runs out of funds, you will not be able to create new wallets, addresses, or send transactions until you fund the fee address. You will not be able to use one of your own Polygon wallets to fund the fee address if the fee address is too low (because you will not be able to send transactions from your Polygon wallet). It is best to create and fund a non-BitGo Polygon account, so you can use it to fund your BitGo enterprise fee address. Any open source Polygon wallet can be used to create an account.

Please note that the fee address is a single-signature account, and that the private key is created and owned by BitGo. You will not be able to send funds out of the fee address once you have sent them in.

There will be a feeAddress field under the CoinSpecific key for Polygon wallets. You will use this address to pay the fees for creating transactions and addresses.

Wallet construction

  • SDK
  • API
1 2 3 4 5 6 7 8 9 10 11 12 13 bitgo .coin('tpolygon') .wallets() .generateWallet({ label: 'My Test Wallet', passphrase: 'secretpassphrase1a5df8380e0e30', enterprise: '5612c2beeecf83610b621b90964448cd', walletVersion: 2, }) .then(function (wallet) { // print the new wallet console.dir(wallet); });

Polygon wallets can only be created under an enterprise. You must pass in the id of the enterprise to associate the wallet with.

The creation of Polygon wallets requires deployment of contract on the wallet base address. When you create a Polygon wallet, BitGo only generates the base address for the wallet and does not deploy it right away. BitGo sends an initialization transaction on the Polygon network in order to create the wallet when the address receives an incoming transaction. Wallet initialization will be initiated on chain after any amount of funds are received. While the wallet is not initialized, the wallet will be having pendingChainInitialization flag as true.

  • SDK
  • API
1 2 3 4 5 6 7 8 9 10 11 bitgo .coin('tpolygon') .wallets() .getWallet({ id: '585c51a5df8380e0e3082e46' }) .then(function (wallet) { return wallet.createAddress(); }) .then(function (newAddress) { // print new address details console.dir(newAddress); });

The creation of Polygon addresses/forwarders requires deployment of contract on the address. When you create a forwarder for Polygon wallet BitGo only generates the address for it and does not deploy contract on it right away. BitGo sends an initialization transaction on the Polygon network in order to create the wallet when the address receives an incoming transaction. Address initialization will be initiated on chain after some funds are received. While the address is not initialized, the address will be having pendingChainInitialization flag as true.

Balances

Each Polygon is comprised of 1,000,000,000,000,000,000 (1018) wei, so not even a single Polygon can be stored numerically without exceeding the range of Javascript numbers.

For that reason, only string balance properties are available, which are balanceString, confirmedBalanceString, and spendableBalanceString.

Transactions

BitGo's Polygon multisig contract currently only supports one sender and one recipient. That means that the sendMany call will only accept one recipient.