jetton

package
v0.1.0-test Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorInvalidOp      tvm.ExitCode = tvm.ExitCode(72)
	ErrorWrongOp        tvm.ExitCode = tvm.ExitCode(0xffff)
	ErrorNotOwner       tvm.ExitCode = tvm.ExitCode(73)
	ErrorNotValidWallet tvm.ExitCode = tvm.ExitCode(74)
	ErrorWrongWorkchain tvm.ExitCode = tvm.ExitCode(333)
)
View Source
const (
	OpcodeMinterMint              = 0x642b7d07
	OpcodeMinterBurnNotification  = 0x7bdd97de
	OpcodeMinterChangeAdmin       = 0x6501f354
	OpcodeMinterClaimAdmin        = 0xfb88e119
	OpcodeMinterDropAdmin         = 0x7431f221
	OpcodeMinterChangeMetadataURL = 0xcb862902
	OpcodeMinterUpgrade           = 0x2508d66a
	OpcodeMinterInternalTransfer  = 0x178d4519
	OpcodeMinterExcesses          = 0xd53276db
)

JettonMinter opcodes

View Source
const (
	OpcodeWalletTransfer             = 0x0f8a7ea5
	OpcodeWalletTransferNotification = 0x7362d09c
	OpcodeWalletInternalTransfer     = 0x178d4519
	OpcodeWalletExcesses             = 0xd53276db
	OpcodeWalletBurn                 = 0x595f07bc
	OpcodeWalletBurnNotification     = 0x7bdd97de
)

JettonWallet opcodes

Variables

View Source
var MinterContractPath = path.Join(PathToContracts, "JettonMinter.compiled.json")
View Source
var PathToContracts = os.Getenv("PATH_CONTRACTS_JETTON")

Exposed by default nix shell

View Source
var WalletContractPath = path.Join(PathToContracts, "JettonWallet.compiled.json")

Functions

func MinterCode

func MinterCode() (*cell.Cell, error)

func WalletCode

func WalletCode() (*cell.Cell, error)

Types

type ChangeAdminMessage

type ChangeAdminMessage struct {
	QueryID  uint64           `tlb:"## 64"`
	NewAdmin *address.Address `tlb:"addr"`
	// contains filtered or unexported fields
}

type ChangeContentMessage

type ChangeContentMessage struct {
	QueryID uint64     `tlb:"## 64"`
	Content *cell.Cell `tlb:"^"`
	// contains filtered or unexported fields
}

type ClaimAdminMessage

type ClaimAdminMessage struct {
	QueryID uint64 `tlb:"## 64"`
	// contains filtered or unexported fields
}

type Client

type Client struct {
	MasterAddress *address.Address `tlb:"addr"`
	WalletCode    *cell.Cell       `tlb:"^"`
}

This is for the encoding of the JettonClient on-chain struct

type DropAdminMessage

type DropAdminMessage struct {
	QueryID uint64 `tlb:"## 64"`
	// contains filtered or unexported fields
}

type InternalTransferMessage

type InternalTransferMessage struct {
	QueryID          uint64           `tlb:"## 64"`
	Amount           tlb.Coins        `tlb:"."`
	From             *address.Address `tlb:"addr"`
	ResponseAddress  *address.Address `tlb:"addr"`
	ForwardTonAmount tlb.Coins        `tlb:"."`
	ForwardPayload   *cell.Cell       `tlb:"either . ^"`
	// contains filtered or unexported fields
}

type MintMessage

type MintMessage struct {
	QueryID     uint64                  `tlb:"## 64"`
	Destination *address.Address        `tlb:"addr"`
	TonAmount   tlb.Coins               `tlb:"."`
	MasterMsg   InternalTransferMessage `tlb:"^"`
	// contains filtered or unexported fields
}

type MinterInitData

type MinterInitData struct {
	TotalSupply   tlb.Coins        `tlb:"."`
	Admin         *address.Address `tlb:"addr"`
	TransferAdmin *address.Address `tlb:"addr"`
	WalletCode    *cell.Cell       `tlb:"^"`
	JettonContent *cell.Cell       `tlb:"^"`
}

type TopUpMessage

type TopUpMessage struct {
	QueryID uint64 `tlb:"## 64"`
	// contains filtered or unexported fields
}

For funding the contract with TON

type UpgradeMessage

type UpgradeMessage struct {
	QueryID uint64     `tlb:"## 64"`
	NewData *cell.Cell `tlb:"^"`
	NewCode *cell.Cell `tlb:"^"`
	// contains filtered or unexported fields
}

type WalletInitData

type WalletInitData struct {
	Status        uint8            `tlb:"## 4"`
	Balance       tlb.Coins        `tlb:"."`
	OwnerAddress  *address.Address `tlb:"addr"`
	MasterAddress *address.Address `tlb:"addr"`
}

type WalletProvider

type WalletProvider struct {
	MinterAddress *address.Address
}

func NewWalletProvider

func NewWalletProvider(minterAddress *address.Address) *WalletProvider

func (*WalletProvider) GetWalletInitCell

func (p *WalletProvider) GetWalletInitCell(ownerAddress *address.Address) (*cell.Cell, error)

Jump to

Keyboard shortcuts

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