Infernet
SDK
Reference
Patterns
Delegator

Delegator

Git Source (opens in a new tab)

Exposes a signer address that allows an authorized EOA to sign off on actions on behalf of a contract

Allows developers to create Coordinator subscriptions off-chain, on behalf of a contract, by signing a DelegateSubscription from signer and submitting to EIP712Coordinator.createSubscriptionDelegatee()

State Variables

signer

Authorized address with signing privileges

Recommended to use an EOA so that it can sign EIP-712 messages

Visibility is public to automatically generate and expose a getter

address public signer;

Functions

constructor

Initialize new Delegator

constructor(address signer_);

Parameters

NameTypeDescription
signer_addressauthorized address

_updateSigner

Update delegated signer

No event is emitted given contract is meant to be inherited

function _updateSigner(address newSigner) internal;

Parameters

NameTypeDescription
newSigneraddressnew delegated signer address