Purpose
What VLSettlement is for.
Global claim consumption and merchant settlement replay protection.
Only accounts with the transaction-verifier role may consume or settle a claim.
Claim → settlement
Global claim consumption and merchant settlement replay protection.
Purpose
Global claim consumption and merchant settlement replay protection.
Only accounts with the transaction-verifier role may consume or settle a claim.
Basic workflow
Methods
These are the public and external methods declared directly by VLSettlement. Inherited token, ownership, and upgrade methods follow their respective standards.
initialize(address authorityRegistry_, address voting_)TransactionInitializes the deployed contract and its required dependencies.
registryName() returns (string memory)ReadReturns the human-readable name used for contract registration.
setTransactionAuthorityGrantor(address grantor)Transaction · onlyVotingUpdates the named protocol configuration value or permission.
settle(address mvd, VLTransactionTypes.Claim calldata claim)TransactionUpdates the named protocol configuration value or permission.
consume(VLTransactionTypes.Claim calldata claim)TransactionConsumes or destroys the specified value under the contract's authorization rules.
Node.js
import { Contract, JsonRpcProvider, Wallet, encodeBytes32String, parseUnits } from "ethers";
const provider = new JsonRpcProvider(process.env.RPC_URL);
const signer = new Wallet(process.env.SIGNER_PRIVATE_KEY, provider);
const at = (address, abi, writable = false) =>
new Contract(address, abi, writable ? signer : provider);
const settlement = at(SETTLEMENT, [
"function settled(bytes32) view returns (bool)"
]);
if (await settlement.settled(transactionId)) throw new Error("already settled");Deployment
Read the deployment manifest or resolve the configured registry entry for the target network. Test on a local or test network before using a privileged signer. See the contract source and contract index for the full interface.