proxy

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Proxy contract is a contract deployed in FrostFS sidechain.

Proxy contract pays for all multisignature transaction executions when notary service is enabled in the sidechain. Notary service prepares multisigned transactions, however they should contain sidechain GAS to be executed. It is inconvenient to ask Alphabet nodes to pay for these transactions: nodes can change over time, some nodes will spend sidechain GAS faster. It leads to economic instability.

Proxy contract exists to solve this issue. While Alphabet contracts hold all sidechain NEO, proxy contract holds most of the sidechain GAS. Alphabet contracts emit half of the available GAS to the proxy contract. The address of the Proxy contract is used as the first signer in a multisignature transaction. Therefore, NeoVM executes Verify method of the contract; and if invocation is verified, Proxy contract pays for the execution.

Contract notifications

Proxy contract does not produce notifications to process.

Contract storage scheme

Proxy contract does not use storage

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAccount added in v0.19.0

func AddAccount(addr interop.Hash160)

func OnNEP11Payment added in v0.19.0

func OnNEP11Payment(from interop.Hash160, amount int, token []byte, data any)

OnNEP11Payment is a callback for NEP-11 compatible NNS contract.

func OnNEP17Payment

func OnNEP17Payment(from interop.Hash160, amount int, data any)

OnNEP17Payment is a callback for NEP-17 compatible native GAS contract.

func RemoveAccount added in v0.19.0

func RemoveAccount(addr interop.Hash160)

func Update

func Update(script []byte, manifest []byte, data any)

Update method updates contract source code and manifest. It can be invoked only by committee.

func Verify

func Verify() bool

Verify method returns true if transaction contains valid multisignature of Alphabet nodes of the Inner Ring or any of the trusted accounts added via AddAccount.

func Version

func Version() int

Version returns the version of the contract.

Types

This section is empty.

Jump to

Keyboard shortcuts

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