Mainnet Deployment

Following a successful prototyping/testing of the integration using TACo's Testnet(s), we are ready to swith to TACo Mainnet and deploy our application to production. TACo Mainnet is the fully decentralized version of the TACo encrypt/decrypt API and network.

DKG Initialization

In order to use TACo in production, developers must request Mainnet Access.

Mainnet use of TACo post-DKG initialization

There are no substantial changes in the code when one switches from using testnet domain to mainnet domain. However, when calling to the encryption or decryption functions, take into account the following:

  • The RPC provider URL (Infura, Alchemy, etc) must be changed to from Polygon Amoy (testnet) to Polygon (mainnet) since the L2 of TACo's mainnet domain is the latter.

  • The domain variable must be set to mainnet.

  • The Ritual ID must be set to the ritual generated by you.

import { domains } from "@nucypher/taco"

// This should be a environment variable
const rpcProviderUrl = "https://polygon-mainnet.infura.io/v3/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

const provider = new ethers.providers.JsonRpcProvider(rpcProviderUrl);
const domain = domains.MAINNET;
const ritualId = 0 // Replace by the Ritual ID

// Encryption
const messageKit = await encrypt(
    provider,
    domain,
    message,
    hasPositiveBalance,
    ritualId,
    encryptorSigner,
);

// Decryption
const decrypted = decrypt(provider, domain, messageKit, conditionContext);

Last updated