Interactive demonstrations of our enterprise blockchain tools. Try commands, see real outputs, and explore the power of PACT Protocol.
Select a PACT Protocol tool to explore its CLI commands and see live demonstrations.
Explore code snippets and examples for integrating PACT Protocol tools into your applications.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import "@pact-protocol/contracts/compliance/Compliance.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract MyComplianceToken is ERC20, Compliance {
constructor() ERC20("MyToken", "MTK") {
_mint(msg.sender, 1000000 * 10**decimals());
}
function transfer(address to, uint256 amount)
public override returns (bool) {
require(isCompliant(msg.sender), "Sender not compliant");
require(isCompliant(to), "Recipient not compliant");
return super.transfer(to, amount);
}
}import { PACTClient } from '@pact-protocol/sdk';
const client = new PACTClient({
apiKey: process.env.PACT_API_KEY,
network: 'polygon'
});
// Generate QR code with compliance
const qrCode = await client.qrVerify.generate({
type: 'dynamic',
authMethod: 'wallet',
timeWindow: 3600,
complianceRules: ['kyc', 'sanctions']
});
// Check compliance status
const compliance = await client.compliance.check({
address: '0x742d35Cc6669C91fCe4d0a1D7A54C8C5e4c5C5e4',
rules: ['kyc', 'sanctions', 'geography']
});
console.log('QR Code:', qrCode.url);
console.log('Compliance:', compliance.status);Get started with our enterprise blockchain tools and experience the power of compliant, scalable infrastructure.