Documentation ¶
Overview ¶
Package notaryproxy contains RPC wrappers for Notary Proxy contract.
Index ¶
- type Actor
- type Contract
- func (c *Contract) AddAccount(addr util.Uint160) (util.Uint256, uint32, error)
- func (c *Contract) AddAccountTransaction(addr util.Uint160) (*transaction.Transaction, error)
- func (c *Contract) AddAccountUnsigned(addr util.Uint160) (*transaction.Transaction, error)
- func (c *Contract) RemoveAccount(addr util.Uint160) (util.Uint256, uint32, error)
- func (c *Contract) RemoveAccountTransaction(addr util.Uint160) (*transaction.Transaction, error)
- func (c *Contract) RemoveAccountUnsigned(addr util.Uint160) (*transaction.Transaction, error)
- func (c *Contract) Update(script []byte, manifest []byte, data any) (util.Uint256, uint32, error)
- func (c *Contract) UpdateTransaction(script []byte, manifest []byte, data any) (*transaction.Transaction, error)
- func (c *Contract) UpdateUnsigned(script []byte, manifest []byte, data any) (*transaction.Transaction, error)
- type ContractReader
- type Invoker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Actor ¶
type Actor interface { Invoker MakeCall(contract util.Uint160, method string, params ...any) (*transaction.Transaction, error) MakeRun(script []byte) (*transaction.Transaction, error) MakeUnsignedCall(contract util.Uint160, method string, attrs []transaction.Attribute, params ...any) (*transaction.Transaction, error) MakeUnsignedRun(script []byte, attrs []transaction.Attribute) (*transaction.Transaction, error) SendCall(contract util.Uint160, method string, params ...any) (util.Uint256, uint32, error) SendRun(script []byte) (util.Uint256, uint32, error) }
Actor is used by Contract to call state-changing methods.
type Contract ¶
type Contract struct { ContractReader // contains filtered or unexported fields }
Contract implements all contract methods.
func (*Contract) AddAccount ¶
AddAccount creates a transaction invoking `addAccount` method of the contract. This transaction is signed and immediately sent to the network. The values returned are its hash, ValidUntilBlock value and error if any.
func (*Contract) AddAccountTransaction ¶
func (c *Contract) AddAccountTransaction(addr util.Uint160) (*transaction.Transaction, error)
AddAccountTransaction creates a transaction invoking `addAccount` method of the contract. This transaction is signed, but not sent to the network, instead it's returned to the caller.
func (*Contract) AddAccountUnsigned ¶
func (c *Contract) AddAccountUnsigned(addr util.Uint160) (*transaction.Transaction, error)
AddAccountUnsigned creates a transaction invoking `addAccount` method of the contract. This transaction is not signed, it's simply returned to the caller. Any fields of it that do not affect fees can be changed (ValidUntilBlock, Nonce), fee values (NetworkFee, SystemFee) can be increased as well.
func (*Contract) RemoveAccount ¶
RemoveAccount creates a transaction invoking `removeAccount` method of the contract. This transaction is signed and immediately sent to the network. The values returned are its hash, ValidUntilBlock value and error if any.
func (*Contract) RemoveAccountTransaction ¶
func (c *Contract) RemoveAccountTransaction(addr util.Uint160) (*transaction.Transaction, error)
RemoveAccountTransaction creates a transaction invoking `removeAccount` method of the contract. This transaction is signed, but not sent to the network, instead it's returned to the caller.
func (*Contract) RemoveAccountUnsigned ¶
func (c *Contract) RemoveAccountUnsigned(addr util.Uint160) (*transaction.Transaction, error)
RemoveAccountUnsigned creates a transaction invoking `removeAccount` method of the contract. This transaction is not signed, it's simply returned to the caller. Any fields of it that do not affect fees can be changed (ValidUntilBlock, Nonce), fee values (NetworkFee, SystemFee) can be increased as well.
func (*Contract) Update ¶
Update creates a transaction invoking `update` method of the contract. This transaction is signed and immediately sent to the network. The values returned are its hash, ValidUntilBlock value and error if any.
func (*Contract) UpdateTransaction ¶
func (c *Contract) UpdateTransaction(script []byte, manifest []byte, data any) (*transaction.Transaction, error)
UpdateTransaction creates a transaction invoking `update` method of the contract. This transaction is signed, but not sent to the network, instead it's returned to the caller.
func (*Contract) UpdateUnsigned ¶
func (c *Contract) UpdateUnsigned(script []byte, manifest []byte, data any) (*transaction.Transaction, error)
UpdateUnsigned creates a transaction invoking `update` method of the contract. This transaction is not signed, it's simply returned to the caller. Any fields of it that do not affect fees can be changed (ValidUntilBlock, Nonce), fee values (NetworkFee, SystemFee) can be increased as well.
type ContractReader ¶
type ContractReader struct {
// contains filtered or unexported fields
}
ContractReader implements safe contract methods.
func NewReader ¶
func NewReader(invoker Invoker, hash util.Uint160) *ContractReader
NewReader creates an instance of ContractReader using provided contract hash and the given Invoker.
func (*ContractReader) Verify ¶
func (c *ContractReader) Verify() (bool, error)
Verify invokes `verify` method of contract.