Skip to main content

Overview

StaticAddressCondition restricts an action to a single designated address. Unlike PayerCondition and ReceiverCondition (which read from payment data), this condition checks against an immutable address set at deployment. Type: Per-deployment (deploy one per designated address via factory)

Logic

contract StaticAddressCondition is ICondition {
    address public immutable DESIGNATED_ADDRESS;

    constructor(address _designatedAddress) {
        DESIGNATED_ADDRESS = _designatedAddress;
    }

    function check(PaymentInfo calldata payment, uint256, address caller)
        external view returns (bool)
    {
        return caller == DESIGNATED_ADDRESS;
    }
}

When to Use

RoleDescription
ArbiterDeploy with arbiter address for dispute resolution
Service ProviderDeploy with provider address for subscriptions
DAO TreasuryDeploy with multisig address for governance
Compliance OfficerDeploy with compliance address for approvals
PlatformDeploy with platform address for controlled releases

Example

Deploy via StaticAddressConditionFactory:
// For marketplace arbiter
const arbiterCondition = await staticAddressConditionFactory.write.deploy([arbiterAddress]);

// For subscription service provider
const providerCondition = await staticAddressConditionFactory.write.deploy([serviceProviderAddress]);

// For DAO governance — same address = same deterministic address (idempotent)
const daoCondition = await staticAddressConditionFactory.write.deploy([daoMultisigAddress]);

Gas

Cost: Minimal — view function with a single immutable read (compiled as a constant in bytecode, not a storage read).

Next Steps