privatetransfer

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MethodShield          = "shield"
	MethodUnshield        = "unshield"
	MethodPrivateTransfer = "privateTransfer"
	MethodIsKnownRoot     = "isKnownRoot"
	MethodIsSpent         = "isSpent"
	MethodGetTreeSize     = "getTreeSize"

	GasShield          = 100000
	GasUnshield        = 350000
	GasPrivateTransfer = 500000
	GasIsKnownRoot     = 1000
	GasIsSpent         = 1000
	GasGetTreeSize     = 500

	ModuleName = "privacy"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Precompile

type Precompile struct {
	cmn.Precompile
	// contains filtered or unexported fields
}

func NewPrecompile

func NewPrecompile(k privacykeeper.Keeper, bankKeeper PrivacyBankKeeper) (*Precompile, error)

func (Precompile) Address

func (Precompile) Address() common.Address

func (Precompile) IsTransaction

func (p Precompile) IsTransaction(method *abi.Method) bool

func (Precompile) RequiredGas

func (p Precompile) RequiredGas(input []byte) uint64

func (Precompile) Run

func (p Precompile) Run(evm *vm.EVM, contract *vm.Contract, readonly bool) ([]byte, error)

type PrivacyBankKeeper

type PrivacyBankKeeper interface {
	cmn.BankKeeper
	SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
	SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
}

PrivacyBankKeeper extends cmn.BankKeeper with the module-account transfer primitives required by the shielded pool.

Jump to

Keyboard shortcuts

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