Claim → settlement

VLSettlement

Global claim consumption and merchant settlement replay protection.

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.

How it fits together.

  1. An authorized verifier submits a typed claim.
  2. VLSettlement derives its unique claim identifier and rejects replay.
  3. The claim is consumed or forwarded to the selected merchant distribution contract.

Declared public interface.

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_)Transaction

Initializes the deployed contract and its required dependencies.

registryName() returns (string memory)Read

Returns the human-readable name used for contract registration.

setTransactionAuthorityGrantor(address grantor)Transaction · onlyVoting

Updates the named protocol configuration value or permission.

settle(address mvd, VLTransactionTypes.Claim calldata claim)Transaction

Updates the named protocol configuration value or permission.

consume(VLTransactionTypes.Claim calldata claim)Transaction

Consumes or destroys the specified value under the contract's authorization rules.

Connect with ethers v6.

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");

Use the address for the chain you selected.

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.