Skip to content
ClearClear
Docs
Protocol/SavingsIntentFactory

SavingsIntentFactory

Source: contracts/peripherals/SavingsIntentFactory.sol · Guide: savings

1 min readUpdated View source

On this page
Network
Chain id
Address
Base Sepolia
84532

Functions that change state

Function
Who can call
Also
createIntentDeterministic(bytes32 salt, (address,address,address,address,address,uint256,uint64,uint8) config)
onlyRole(CREATOR_ROLE)
grantRole(bytes32 role, address account)
The role's admin role (DEFAULT_ADMIN_ROLE unless set otherwise)
refundDeterministic(bytes32 salt, (address,address,address,address,address,uint256,uint64,uint8) config)
onlyRole(SETTLER_ROLE)
renounceRole(bytes32 role, address account)
Only the account renouncing its own role
revokeRole(bytes32 role, address account)
The role's admin role (DEFAULT_ADMIN_ROLE unless set otherwise)
settleDeterministic(bytes32 salt, (address,address,address,address,address,uint256,uint64,uint8) config)
onlyRole(SETTLER_ROLE)

Read functions

Anyone can call these; they change nothing.

Function
Returns
CREATOR_ROLE()
bytes32
DEFAULT_ADMIN_ROLE()
bytes32
escrowImplementation()
address
getRoleAdmin(bytes32 role)
bytes32
hasRole(bytes32 role, address account)
bool
predictIntentAddress(bytes32 salt)
address
SETTLER_ROLE()
bytes32
supportsInterface(bytes4 interfaceId)
bool

Events

Event
IntentCreated(bytes32 salt indexed, address escrow indexed, address depositor indexed, uint8 action, uint256 amount)
IntentRefunded(bytes32 salt indexed, address escrow indexed, uint256 refundedAmount)
IntentSettled(bytes32 salt indexed, address escrow indexed, uint256 resultAmount)
RoleAdminChanged(bytes32 role indexed, bytes32 previousAdminRole indexed, bytes32 newAdminRole indexed)
RoleGranted(bytes32 role indexed, address account indexed, address sender indexed)
RoleRevoked(bytes32 role indexed, address account indexed, address sender indexed)

Errors

Error
SavingsIntentFactoryInvalidAddress()