The RSK CLI supports creating on-chain attestations for transfers using the Ethereum Attestation Service (EAS) deployed on Rootstock.
Attestations provide cryptographic proof and additional metadata about blockchain transactions. They are stored on-chain and can be queried and verified by anyone.
- EAS Contract:
0xc300aeEaDd60999933468738c9F5D7e9C0671e1c - Schema Registry:
0x679c62956cD2801AbAbF80e9D430f18859Eea2d5
- EAS Contract:
0x54C0726E9d2D57Bc37AD52c7E219A3229e0eE963 - Schema Registry:
0xeF29675d82CC5967069d6d9C17F2719f67728F5B
Create attestations when transferring RBTC or tokens on testnet:
# Interactive transfer with attestation
node dist/bin/index.js transfer --testnet -i --attest-transfer
# Direct transfer with attestation
node dist/bin/index.js transfer \
--testnet \
--address 0x... \
--value 0.001 \
--attest-transfer \
--attest-reason "Payment for services"
# Token transfer with attestation
node dist/bin/index.js transfer \
--testnet \
--token 0x... \
--address 0x... \
--value 10 \
--attest-transferCreate attestations when deploying contracts:
node dist/bin/index.js deploy \
--testnet \
--abi path/to/abi.json \
--bytecode 0x... \
--attest-deploymentCreate attestations when verifying contracts:
node dist/bin/index.js verify \
--testnet \
--contract 0x... \
--attest-verification| Option | Description |
|---|---|
--attest-transfer |
Enable attestation for transfers |
--attest-deployment |
Enable attestation for deployments |
--attest-verification |
Enable attestation for verifications |
--attest-schema-uid <UID> |
Custom schema UID (optional on testnet, required on mainnet) |
--attest-recipient <address> |
Custom attestation recipient (optional) |
--attest-reason <text> |
Reason for transfer (optional) |
Testnet has pre-registered default schemas for all attestation types. You can use attestations without specifying a schema UID:
- Transfer Schema UID:
0x0da2422c401f8810a6be8f4451aaa0c0a5a6601701cba17bba14f50bb0039dc8 - Deployment Schema UID:
0xac72a47948bf42cad950de323c51a0033346629ae4a42da45981ae9748118a72 - Verification Schema UID:
0xdf68ba5414a61a12f26d41df4f5a1ef3ffe2ab809fea94d9c76fa7cb84b8fb4a
Mainnet currently has no default schemas. You must register your own schema and provide its UID using --attest-schema-uid <UID>.
Schema Definition:
address sender,address recipient,string amount,address tokenAddress,string tokenSymbol,bytes32 transactionHash,uint256 blockNumber,uint256 timestamp,string reason,string transferType,string version
Description:
sender: Address that sent the transferrecipient: Address that received the transferamount: Amount transferred (as string to preserve precision)tokenAddress: Address of the token contract (0x0 for RBTC)tokenSymbol: Symbol of the token (e.g., "RBTC", "RIF")transactionHash: Transaction hash of the transferblockNumber: Block number when the transfer occurredtimestamp: Unix timestamp of the transferreason: Optional reason for the transfertransferType: Type of transfer (e.g., "RBTC", "ERC20")version: Schema version identifier (e.g., "1.0")
Schema Definition:
string contractName,address contractAddress,address deployer,uint256 blockNumber,bytes32 transactionHash,uint256 timestamp,string abiHash,string bytecodeHash,string version
Description:
contractName: Name of the deployed contractcontractAddress: Address where the contract was deployeddeployer: Address that deployed the contractblockNumber: Block number when the contract was deployedtransactionHash: Transaction hash of the deploymenttimestamp: Unix timestamp of the deploymentabiHash: Keccak256 hash of the contract ABIbytecodeHash: Keccak256 hash of the contract bytecodeversion: Schema version identifier (e.g., "1.0")
Schema Definition:
string contractName,address contractAddress,address verifier,string sourceCodeHash,string compilationTarget,string compilerVersion,bool optimizationUsed,uint256 timestamp,string verificationTool,string version,string schemaVersion
Description:
contractName: Name of the verified contractcontractAddress: Address of the verified contractverifier: Address that performed the verificationsourceCodeHash: Hash of the verified source codecompilationTarget: Compilation target (e.g., "contracts/MyContract.sol:MyContract")compilerVersion: Solidity compiler version usedoptimizationUsed: Whether optimization was enabled during compilationtimestamp: Unix timestamp of the verificationverificationTool: Tool used for verification (e.g., "rsk-cli")version: Schema version identifier (e.g., "1.0")schemaVersion: Schema revision identifier (e.g., "2.0")
For mainnet deployments, you must register schemas before creating attestations. Schema registration is an on-chain operation that requires RBTC for gas fees.
-
Connect your wallet and select the Rootstock network
-
Enter your schema definition using one of the structures documented above
-
Set revocable to
true(recommended for flexibility) -
Submit the transaction (you'll need RBTC for gas fees)
-
Copy the returned Schema UID
-
Use the Schema UID with the
--attest-schema-uidflag when creating attestations
Alternatively, you can interact directly with the Schema Registry contract at 0xeF29675d82CC5967069d6d9C17F2719f67728F5B.
When using this CLI as an MCP server, attestations are fully supported with automatic logging suppression for clean JSON responses.
- Testnet uses default schemas - no schema UID required
- Mainnet requires schema registration and the
--attest-schema-uidflag - All attestations incur additional gas costs
- Attestations are permanent and immutable on-chain