code

package
v1.14.1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: MIT Imports: 8 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Methods = map[int64]ContractMethod{
	81467:  GetSubwalletId,
	107653: GetPluginList,
	92260:  GetSubscriptionData,
	102491: GetCollectionData,
	102351: GetNftData,
	106029: GetJettonData,
	97026:  GetWalletData,
	85719:  RoyaltyParams,
	90228:  GetEditor,
	72748:  GetSaleData,
	123660: DnsResolve,
	119378: GetDomain,
	66763:  GetFullDomain,
	80697:  GetAuctionInfo,
	69506:  GetTelemintTokenName,
	129619: GetTelemintAuctionConfig,
	107305: GetLockupData,
}

crc16 xmodem || 0x10000

Functions

func FindLibraries added in v1.8.7

func FindLibraries(cell *boc.Cell) ([]ton.Bits256, error)

FindLibraries looks for library cells inside the given cell tree and returns a list of hashes of found library cells.

func LibrariesToBase64 added in v1.8.7

func LibrariesToBase64(libraries map[ton.Bits256]*boc.Cell) (string, error)

LibrariesToBase64 converts a map with libraries to a base64 string.

func ParseContractMethods

func ParseContractMethods(code []byte) ([]int64, error)

ParseContractMethods tries to extract method names from the given code. It does work for most of the code compiled by FunC but there are smart contracts that can't be handled by ParseContractMethods. So if ParseContractMethods returns an error, you need to find another way to get method names.

Types

type ContractMethod

type ContractMethod string
const (
	GetSubwalletId           ContractMethod = "get_subwallet_id"
	GetPluginList            ContractMethod = "get_plugin_list"
	GetSubscriptionData      ContractMethod = "get_subscription_data"
	GetCollectionData        ContractMethod = "get_collection_data"
	GetNftData               ContractMethod = "get_nft_data"
	GetJettonData            ContractMethod = "get_jetton_data"
	GetWalletData            ContractMethod = "get_wallet_data"
	RoyaltyParams            ContractMethod = "royalty_params"
	GetEditor                ContractMethod = "get_editor"
	GetSaleData              ContractMethod = "get_sale_data"
	DnsResolve               ContractMethod = "dnsresolve"
	GetDomain                ContractMethod = "get_domain"
	GetFullDomain            ContractMethod = "get_full_domain"
	GetAuctionInfo           ContractMethod = "get_auction_info"
	GetTelemintTokenName     ContractMethod = "get_telemint_token_name"
	GetTelemintAuctionConfig ContractMethod = "get_telemint_auction_config"
	GetLockupData            ContractMethod = "get_lockup_data"
)

type FunCCompiler added in v1.1.0

type FunCCompiler struct {
	// contains filtered or unexported fields
}

FunCCompiler is not real compiler - it just send code to tonapi.io be careful - it behavior can be changed in the future

func NewFunCCompiler added in v1.1.0

func NewFunCCompiler() *FunCCompiler

func (*FunCCompiler) Compile added in v1.1.0

func (c *FunCCompiler) Compile(files map[string]string) (string, []byte, error)

Compile returns FIFT code, BoC with compiled code and error

Jump to

Keyboard shortcuts

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