Purpose
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.
Funds → reward
Holds merchant-funded rewards for controlled distribution.
Purpose
Holds merchant-funded rewards for controlled distribution.
Only the configured MVD may release or recover assets. Customers normally observe release events.
Basic workflow
Methods
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_)TransactionInitializes the deployed contract and its required dependencies.
release(address customer, uint256 amount, bytes32 transactionId)Transaction · onlyMVDRemoves or releases the specified record, permission, or held value.
recover(address recipient, uint256 amount)Transaction · onlyMVDExecutes the recover operation.
tokensReceived(address, address, address to, uint256, bytes calldata, bytes calldata)ReadHandles an ERC-777 token-receipt callback.
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 wallet = at(DISTRIBUTION_WALLET, [
"function release(address,uint256,bytes32)"
], true);
await (await wallet.release(customer, parseUnits("25", 18), transactionId)).wait();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.