testnet
GitHub

Set Contract Policy

MsgSetContractPolicy(admin, contract_address, policy_id) → Response

Assigns a specific policy template to a smart contract address. This enforces the policy's rules on all transactions interacting with that contract.

Parameters

Name Type Required Description
contract_address string The address of the smart contract.

Returns

Type: MsgSetContractPolicyResponse

Empty response on success.

Examples

Apply Policy to Contract

msg := &pclv1.MsgSetContractPolicy{
    Admin: "maroo1...",
    ContractAddress: "0x...",
    PolicyId: "kyc_required",
}
ESC
Type to search