Complete guide to integrating SUT (SuperTrust) token payments into your application.
SUT (SuperTrust) is a utility token on the Polygon network used for AI services.
| Property | Value |
|---|---|
| Network | Polygon |
| Contract | 0x98965474EcBeC2F532F1f780ee37b0b05F77Ca55 |
| Decimals | 18 |
npm install ethersimport { ethers } from "ethers";
const SUT_CONTRACT = "0x98965474EcBeC2F532F1f780ee37b0b05F77Ca55";
async function verifySUTPayment(txHash: string, wallet: string): Promise<number> {
const provider = new ethers.JsonRpcProvider("https://polygon-rpc.com");
const receipt = await provider.getTransactionReceipt(txHash);
if (!receipt) return 0;
const transferTopic = ethers.id("Transfer(address,address,uint256)");
for (const log of receipt.logs) {
if (log.address.toLowerCase() === SUT_CONTRACT.toLowerCase() &&
log.topics[0] === transferTopic) {
const to = ethers.getAddress("0x" + log.topics[2].slice(26));
if (to.toLowerCase() === wallet.toLowerCase()) {
return Number(ethers.formatUnits(log.data, 18));
}
}
}
return 0;
}- AI Services - Pay for code review, content writing, analysis
- API Access - Metered API usage with SUT
- Subscriptions - Recurring payments in crypto
- Micropayments - Low-fee small transactions
MIT