encoding

package
v0.0.0-...-9345ff8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultEntrypoint         = "__default__"
	ConstructorEntrypoint     = "constructor"
	DefaultL1Entrypoint       = "__l1_default__"
	ExecuteEntrypoint         = "__execute__"
	TransferEntrypoint        = "transfer"
	ValidateEntrypoint        = "__validate__"
	ValidateDeclareEntrypoint = "__validate_declare__"
	ValidateDeployEntrypoint  = "__validate_deploy__"
	ChangeModulesEntrypoint   = "changeModules"

	DefaultEntrypoitSelector = 0x0
)

entrypoint names

Variables

View Source
var (
	ExecuteEntrypointSelector         = MustDecodeHex("0x15d40a3d6ca2ac30f4031e42be28da9b056fef9bb7357ac5e85627ee876e5ad")
	ConstructorSelector               = MustDecodeHex("0x28ffe4ff0f226a9107253e17a904099aa4f63a02a5621de0576e5aa71bc5194")
	ValidateDeclareEntrypointSelector = MustDecodeHex("0x289da278a8dc833409cabfdad1581e8e7d40e42dcaed693fa4008dcdb4963b3")
	ChangeModuleEntrypointSelector    = MustDecodeHex("0x3ffada7235f48d4811be030385f19e6d50e2cfa368ded42f1892666f834e407")
)

Functions

func AddHexPrefix

func AddHexPrefix(s string) string

AddHexPrefix -

func DecimalFromHex

func DecimalFromHex(s string) decimal.Decimal

DecimalFromHex -

func EncodeHex

func EncodeHex(data []byte) string

EncodeHex -

func GetSelectorFromName

func GetSelectorFromName(name string) string

GetSelectorFromName -

func GetSelectorWithPrefixFromName

func GetSelectorWithPrefixFromName(name string) string

GetSelectorWithPrefixFromName -

func Keccak

func Keccak(data []byte) []byte

Keccak - A variant of eth-keccak that computes a value that fits in a StarkNet field element.

func MustDecodeHex

func MustDecodeHex(s string) []byte

MustDecodeHex -

func TrimHex

func TrimHex(val string) string

TrimHex - trims prefix '0x' if it exists and all padding left zeroes.

func TrimmedHex

func TrimmedHex(data []byte) string

TrimmedHex -

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL