Documentation
¶
Index ¶
- Variables
- func AddressToHash(a common.Address) common.Hash
- func FetchSigningPolicy(ctx context.Context, db *gorm.DB, relayAddress common.Address, ...) (*policy.SigningPolicy, error)
- func InitializePolicyAction(ctx context.Context, db *gorm.DB, addresses config.Addresses, offset int, ...) (*types.Action, *policy.SigningPolicy, int, error)
- func UpdatePolicyAction(ctx context.Context, db *gorm.DB, addresses config.Addresses, log database.Log, ...) (*types.Action, *policy.SigningPolicy, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDeadlineExceeded = errors.New("deadline exceeded") ErrTooManyErrors = errors.New("too many errors") ErrThresholdNotReached = errors.New("threshold not reached") )
View Source
var (
SigningPolicyInitializedEventSel common.Hash
)
Functions ¶
func AddressToHash ¶
AddressToHash zero prefixes address to 32 bytes.
func FetchSigningPolicy ¶
func FetchSigningPolicy(ctx context.Context, db *gorm.DB, relayAddress common.Address, signingPolicyID uint32) (*policy.SigningPolicy, error)
FetchSigningPolicy fetches and parses the SigningPolicyInitialized event for the given policy ID from the database.
func InitializePolicyAction ¶
func InitializePolicyAction( ctx context.Context, db *gorm.DB, addresses config.Addresses, offset int, chainID *big.Int, ) (*types.Action, *policy.SigningPolicy, int, error)
InitializePolicyAction prepares action for INITIALIZE_POLICY". SigningPolicyInitialized event that precedes the last emitted by offset is used. If such event is not found, the oldest found event is used.
The action, signing policy, and used offset are returned.
func UpdatePolicyAction ¶
func UpdatePolicyAction(ctx context.Context, db *gorm.DB, addresses config.Addresses, log database.Log, activePolicy *policy.SigningPolicy, chainID *big.Int) (*types.Action, *policy.SigningPolicy, error)
UpdatePolicyAction prepares an UPDATE_POLICY action from a SigningPolicyInitialized log event.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.