@kagamidigital/salt-sdk-mirror
    Preparing search index...

    Type Alias ContractParamRestriction

    A single constraint on one argument of a contract call, used by contract_param_restriction policies.

    A restriction applies only to transactions that call functionSignature on contractAddress; the decoded argument at paramIndex must then satisfy the operator/value comparison, or the transaction breaches the policy. Calldata that matches a restriction but cannot be decoded is treated as a breach; a transaction that matches no restriction passes.

    type ContractParamRestriction = {
        contractAddress: string;
        functionSignature: string;
        operator: ContractParamRestrictionOperator;
        paramIndex: number;
        solidityType?: string;
        value: string;
    }
    Index

    Properties

    contractAddress: string

    Address of the contract the restriction applies to, matched case-insensitively against the transaction's to address.

    '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
    
    functionSignature: string

    Human-readable signature of the restricted function, without the function keyword. Parameter names are optional.

    'transfer(address,uint256)'
    
    'approve(address spender, uint256 amount)'
    

    The comparison the decoded argument must satisfy. Which operators are legal depends on the parameter's Solidity type — see ContractParamRestrictionOperator.

    paramIndex: number

    Zero-based index of the restricted parameter within functionSignature.

    1
    
    solidityType?: string

    The Solidity type of the restricted parameter (e.g. uint256, address). Optional on input: when creating or updating a contract_param_restriction policy the SDK derives this from functionSignature and paramIndex, so any value you pass is overwritten with the derived one. Present on restrictions returned by the SDK.

    value: string

    The value the argument is compared against. The expected format depends on the parameter's Solidity type:

    • uint*/int* — an integer string ('1000000'); 0x-hex is also accepted, and negative values are only meaningful for signed int* parameters. Important: the API does not currently validate this field, and a malformed value (e.g. '1.5' or 'abc') fails closed — every transaction matching the restriction is treated as a breach, freezing that contract call until the policy is fixed.
    • bool — exactly 'true' or 'false', lowercase. The comparison is case-sensitive; 'True' never matches eq.
    • address, bytes*, string — compared case-insensitively.
    '1000000'