Infrastructure Configuration
Varity SDK handles all infrastructure configuration automatically. You rarely need to configure anything manually.
USDC Handling
Section titled “USDC Handling”USDC on Varity uses 6 decimals. Use the helpers to avoid errors:
import { formatUSDC, parseUSDC, USDC_DECIMALS } from '@varity-labs/sdk/chains';
// Convert human-readable to raw (for operations)const amount = parseUSDC("10.50");// Returns: 10500000n (bigint)
// Convert raw to human-readable (for display)const display = formatUSDC(10500000n);// Returns: "10.50" (string)
// The decimal constantconsole.log(USDC_DECIMALS); // 6Accessing Contract Addresses
Section titled “Accessing Contract Addresses”The following contract addresses are pre-deployed on Varity’s infrastructure:
| Contract | Address |
|---|---|
| TemplateMarketplace | 0x5EfAF2219F9957461125485Eae49Bac07505bB34 |
| TemplateRegistry | 0x1697055bf6d135934F1F533f43eCE8CA469325Ed |
| VarityAppRegistry | 0xbf9f4849a5508e9f271c30205c1ce924328e5e1c |
| SimplifiedPaymaster | 0x579772Bfa5Ec1e8f33B81F304ffDbC55135db154 |
| VarityWalletFactory | 0x23dcca8E063CB0Eea8Ec6e56657c07E11fFa4E78 |
Revenue Split
Section titled “Revenue Split”The platform uses a 90/10 revenue split:
The revenue split is enforced automatically by the platform.
When users purchase your app:
- 90% goes to you (the developer)
- 10% goes to the Varity platform
Advanced: Network Details
Varity manages these credentials automatically. Only use this if you need custom configuration.
Varity Infrastructure
Section titled “Varity Infrastructure”| Property | Value |
|---|---|
| Chain ID | 33529 |
| RPC URL | https://rpc-varity-testnet-rroe52pwjp.t.conduit.xyz |
| Explorer | https://explorer-varity-testnet-rroe52pwjp.t.conduit.xyz |
| Native Token | Bridged USDC |
| Decimals | 6 (not 18!) |
Backend Contracts
Section titled “Backend Contracts”Pre-deployed on Varity’s infrastructure:
| Contract | Address | Purpose |
|---|---|---|
| TemplateMarketplace | 0x5EfAF2219F9957461125485Eae49Bac07505bB34 | 90/10 Revenue Split |
| TemplateRegistry | 0x1697055bf6d135934F1F533f43eCE8CA469325Ed | Template metadata |
| VarityAppRegistry | 0xbf9f4849a5508e9f271c30205c1ce924328e5e1c | App Store submissions |
| SimplifiedPaymaster | 0x579772Bfa5Ec1e8f33B81F304ffDbC55135db154 | Fee sponsorship |
| VarityWalletFactory | 0x23dcca8E063CB0Eea8Ec6e56657c07E11fFa4E78 | Smart accounts |
Supported Networks
Section titled “Supported Networks”| Network | Chain ID | Status |
|---|---|---|
| Varity (Beta) | 33529 | Active |
| Varity (Production) | TBD | Coming post-MVP |
Network Configuration
Section titled “Network Configuration”import { varityL3Testnet, SUPPORTED_CHAINS } from '@varity-labs/sdk/chains';
// Varity L3 testnet chain definitionconsole.log(varityL3Testnet); // { id: 33529, name: 'Varity L3 Testnet', ... }console.log(SUPPORTED_CHAINS);Direct Chain Access
Section titled “Direct Chain Access”import { createThirdwebClient, getContract } from 'thirdweb';import { varityL3Testnet } from '@varity-labs/sdk/chains';
const client = createThirdwebClient({ clientId: process.env.NEXT_PUBLIC_THIRDWEB_CLIENT_ID,});
const contract = getContract({ client, chain: varityL3Testnet, address: '0x5EfAF2219F9957461125485Eae49Bac07505bB34',});Wagmi Format
Section titled “Wagmi Format”import { varityL3Wagmi } from '@varity-labs/sdk/chains';
const config = createConfig({ chains: [varityL3Wagmi],});Next Steps
Section titled “Next Steps”- SDK Overview - Full SDK capabilities
- Deploy Your App - Deploy your app
- Free Operations - How fee sponsorship works