Documentation
¶
Index ¶
- Constants
- Variables
- func GetAddress() common.Address
- func GetAddressV2() common.Address
- type Precompile
- func (Precompile) IsTransaction(method *abi.Method) bool
- func (p Precompile) RequiredGas(input []byte) uint64
- func (p Precompile) Run(evm *vm.EVM, contract *vm.Contract, readOnly bool) (bz []byte, err error)
- func (p Precompile) VerifyEd25519(method *abi.Method, args []interface{}) ([]byte, error)
- func (p Precompile) VerifyEd25519RawMessage(method *abi.Method, args []interface{}) ([]byte, error)
Constants ¶
View Source
const ( VerifyEd25519Method = "verifyEd25519" VerifyEd25519RawMessageMethod = "verifyEd25519RawMessage" )
View Source
const ( USigVerifierPrecompileAddress = "0x00000000000000000000000000000000000000ca" USigVerifierPrecompileAddressV2 = "0xEC00000000000000000000000000000000000001" // VerifyEd25519Gas is the gas cost for verifying an Ed25519 signature. VerifyEd25519Gas uint64 = 4000 // VerifyEd25519RawMessageGas matches VerifyEd25519Gas — same Ed25519 // verification cost, only the message-prep step differs (no hex encoding). VerifyEd25519RawMessageGas uint64 = 4000 )
Variables ¶
View Source
var ABI abi.ABI
Functions ¶
func GetAddressV2 ¶ added in v0.0.23
GetAddressV2 returns the new (0xEC..01) address of the precompile
Types ¶
type Precompile ¶
type Precompile struct {
cmn.Precompile
abi.ABI
}
Precompile defines the precompile
func NewPrecompile ¶
func NewPrecompile() (*Precompile, error)
func NewPrecompileV2 ¶ added in v0.0.23
func NewPrecompileV2() (*Precompile, error)
NewPrecompileV2 creates a new USigVerifier precompile at the new address (0xEC..01). It provides the same functionality as NewPrecompile but at the reserved address range.
func (Precompile) IsTransaction ¶
func (Precompile) IsTransaction(method *abi.Method) bool
IsTransaction checks if the given method name corresponds to a transaction or query.
func (Precompile) RequiredGas ¶
func (p Precompile) RequiredGas(input []byte) uint64
func (Precompile) VerifyEd25519 ¶
func (p Precompile) VerifyEd25519( method *abi.Method, args []interface{}, ) ([]byte, error)
VerifyEd25519 verifies a signature over the ASCII bytes of "0x"+hex(msgDigest). This is the legacy / Solana-wallet-friendly form used by UEA_SVM.
func (Precompile) VerifyEd25519RawMessage ¶ added in v0.0.40
func (p Precompile) VerifyEd25519RawMessage( method *abi.Method, args []interface{}, ) ([]byte, error)
VerifyEd25519RawMessage verifies a signature over raw message bytes — standard Ed25519 semantics. Use this when the signer used the conventional ed25519.Sign(privKey, rawBytes) API.
Click to show internal directories.
Click to hide internal directories.