Funds → reward

VLDistributionWallet

Holds merchant-funded rewards for controlled distribution.

What VLDistributionWallet is for.

Holds merchant-funded rewards for controlled distribution.

Only the configured MVD may release or recover assets. Customers normally observe release events.

How it fits together.

  1. A merchant funds its distribution wallet.
  2. The configured MVD presents a verified transaction identifier.
  3. The wallet releases the reward once or recovers funds under the same restricted authority.

Declared public interface.

These are the public and external methods declared directly by VLDistributionWallet. Inherited token, ownership, and upgrade methods follow their respective standards.

initialize(address mvd_, address settlement_, address merchant_, address vcurrency_)Transaction

Initializes the deployed contract and its required dependencies.

release(address customer, uint256 amount, bytes32 transactionId)Transaction · onlyMVD

Removes or releases the specified record, permission, or held value.

recover(address recipient, uint256 amount)Transaction · onlyMVD

Executes the recover operation.

tokensReceived(address, address, address to, uint256, bytes calldata, bytes calldata)Read

Handles an ERC-777 token-receipt callback.

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 wallet = at(DISTRIBUTION_WALLET, [
  "function release(address,uint256,bytes32)"
], true);
await (await wallet.release(customer, parseUnits("25", 18), transactionId)).wait();

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.