mirror of
https://github.com/luxfi/evm.git
synced 2026-09-24 00:27:44 +00:00
- 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
38 lines
1.5 KiB
Go
38 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 nativeminter
|
|
|
|
import (
|
|
"math/big"
|
|
|
|
"github.com/luxfi/evm/precompile/contract"
|
|
"github.com/luxfi/geth/common"
|
|
)
|
|
|
|
const (
|
|
// NativeCoinMintedEventGasCost is the gas cost of the NativeCoinMinted event.
|
|
// It is the base gas cost + the gas cost of the topics (signature, sender, recipient)
|
|
// and the gas cost of the non-indexed data (32 bytes for amount).
|
|
NativeCoinMintedEventGasCost = contract.LogGas + contract.LogTopicGas*3 + contract.LogDataGas*common.HashLength
|
|
)
|
|
|
|
// PackNativeCoinMintedEvent packs the event into the appropriate arguments for NativeCoinMinted.
|
|
// It returns topic hashes and the encoded non-indexed data.
|
|
func PackNativeCoinMintedEvent(sender common.Address, recipient common.Address, amount *big.Int) ([]common.Hash, []byte, error) {
|
|
return NativeMinterABI.PackEvent("NativeCoinMinted", sender, recipient, amount)
|
|
}
|
|
|
|
// UnpackNativeCoinMintedEventData attempts to unpack non-indexed [dataBytes].
|
|
func UnpackNativeCoinMintedEventData(dataBytes []byte) (*big.Int, error) {
|
|
var eventData = struct {
|
|
Amount *big.Int
|
|
}{}
|
|
err := NativeMinterABI.UnpackIntoInterface(&eventData, "NativeCoinMinted", dataBytes)
|
|
return eventData.Amount, err
|
|
}
|