Files
zeekay 8bc9dd01a8 Fix CI: Go version and script permissions
- Change Go version from 1.24.6 to 1.22.8 (stable version)
- Ensure all build scripts have executable permissions
- Fix covdata issue by using stable Go version
- CI should now pass all checks
2025-09-19 05:56:47 +00:00

41 lines
1.5 KiB
Go

// Copyright (C) 2019-2025, Lux Industries, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
// Code generated
// This file is a generated precompile contract config with stubbed abstract functions.
// The file is generated by a template. Please inspect every code and comment in this file before use.
package allowlist
import (
"math/big"
"github.com/luxfi/evm/precompile/contract"
"github.com/luxfi/geth/common"
)
const (
// AllowListEventGasCost is the gas cost of a call to the AllowList contract's event.
// It is the base gas cost + the gas cost of the topics (signature, role, account, caller)
// and the gas cost of the non-indexed data (oldRole).
AllowListEventGasCost = contract.LogGas + contract.LogTopicGas*4 + contract.LogDataGas*common.HashLength
)
// PackRoleSetEvent packs the event into the appropriate arguments for RoleSet.
// It returns topic hashes and the encoded non-indexed data.
func PackRoleSetEvent(role Role, account common.Address, caller common.Address, oldRole Role) ([]common.Hash, []byte, error) {
return AllowListABI.PackEvent("RoleSet", role.Big(), account, caller, oldRole.Big())
}
// UnpackRoleSetEventData attempts to unpack non-indexed [dataBytes].
func UnpackRoleSetEventData(dataBytes []byte) (Role, error) {
eventData := struct {
OldRole *big.Int
}{}
err := AllowListABI.UnpackIntoInterface(&eventData, "RoleSet", dataBytes)
if err != nil {
return Role{}, err
}
return FromBig(eventData.OldRole)
}