rpcbinding: provide links to types in comments

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
Anna Shaleva 2023-05-31 15:47:10 +03:00
parent 8ae4a1e957
commit 9f9cec53bd
8 changed files with 106 additions and 106 deletions

View file

@ -339,7 +339,7 @@ func (c *Contract) DeleteRecordUnsigned(name string, typev *big.Int) (*transacti
} }
// SetAdminEventsFromApplicationLog retrieves a set of all emitted events // SetAdminEventsFromApplicationLog retrieves a set of all emitted events
// with "SetAdmin" name from the provided ApplicationLog. // with "SetAdmin" name from the provided [result.ApplicationLog].
func SetAdminEventsFromApplicationLog(log *result.ApplicationLog) ([]*SetAdminEvent, error) { func SetAdminEventsFromApplicationLog(log *result.ApplicationLog) ([]*SetAdminEvent, error) {
if log == nil { if log == nil {
return nil, errors.New("nil application log") return nil, errors.New("nil application log")
@ -363,7 +363,7 @@ func SetAdminEventsFromApplicationLog(log *result.ApplicationLog) ([]*SetAdminEv
return res, nil return res, nil
} }
// FromStackItem converts provided stackitem.Array to SetAdminEvent or // FromStackItem converts provided [stackitem.Array] to SetAdminEvent or
// returns an error if it's not possible to do to so. // returns an error if it's not possible to do to so.
func (e *SetAdminEvent) FromStackItem(item *stackitem.Array) error { func (e *SetAdminEvent) FromStackItem(item *stackitem.Array) error {
if item == nil { if item == nil {
@ -432,7 +432,7 @@ func (e *SetAdminEvent) FromStackItem(item *stackitem.Array) error {
} }
// RenewEventsFromApplicationLog retrieves a set of all emitted events // RenewEventsFromApplicationLog retrieves a set of all emitted events
// with "Renew" name from the provided ApplicationLog. // with "Renew" name from the provided [result.ApplicationLog].
func RenewEventsFromApplicationLog(log *result.ApplicationLog) ([]*RenewEvent, error) { func RenewEventsFromApplicationLog(log *result.ApplicationLog) ([]*RenewEvent, error) {
if log == nil { if log == nil {
return nil, errors.New("nil application log") return nil, errors.New("nil application log")
@ -456,7 +456,7 @@ func RenewEventsFromApplicationLog(log *result.ApplicationLog) ([]*RenewEvent, e
return res, nil return res, nil
} }
// FromStackItem converts provided stackitem.Array to RenewEvent or // FromStackItem converts provided [stackitem.Array] to RenewEvent or
// returns an error if it's not possible to do to so. // returns an error if it's not possible to do to so.
func (e *RenewEvent) FromStackItem(item *stackitem.Array) error { func (e *RenewEvent) FromStackItem(item *stackitem.Array) error {
if item == nil { if item == nil {

View file

@ -243,7 +243,7 @@ func (c *Contract) UpdateCapUnsigned(newCap *big.Int) (*transaction.Transaction,
} }
// OnMintEventsFromApplicationLog retrieves a set of all emitted events // OnMintEventsFromApplicationLog retrieves a set of all emitted events
// with "OnMint" name from the provided ApplicationLog. // with "OnMint" name from the provided [result.ApplicationLog].
func OnMintEventsFromApplicationLog(log *result.ApplicationLog) ([]*OnMintEvent, error) { func OnMintEventsFromApplicationLog(log *result.ApplicationLog) ([]*OnMintEvent, error) {
if log == nil { if log == nil {
return nil, errors.New("nil application log") return nil, errors.New("nil application log")
@ -267,7 +267,7 @@ func OnMintEventsFromApplicationLog(log *result.ApplicationLog) ([]*OnMintEvent,
return res, nil return res, nil
} }
// FromStackItem converts provided stackitem.Array to OnMintEvent or // FromStackItem converts provided [stackitem.Array] to OnMintEvent or
// returns an error if it's not possible to do to so. // returns an error if it's not possible to do to so.
func (e *OnMintEvent) FromStackItem(item *stackitem.Array) error { func (e *OnMintEvent) FromStackItem(item *stackitem.Array) error {
if item == nil { if item == nil {

View file

@ -215,8 +215,8 @@ func itemToLedgerBlock(item stackitem.Item, err error) (*LedgerBlock, error) {
return res, err return res, err
} }
// FromStackItem retrieves fields of LedgerBlock from the given stack item // FromStackItem retrieves fields of LedgerBlock from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *LedgerBlock) FromStackItem(item stackitem.Item) error { func (res *LedgerBlock) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -337,8 +337,8 @@ func itemToLedgerBlockSR(item stackitem.Item, err error) (*LedgerBlockSR, error)
return res, err return res, err
} }
// FromStackItem retrieves fields of LedgerBlockSR from the given stack item // FromStackItem retrieves fields of LedgerBlockSR from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *LedgerBlockSR) FromStackItem(item stackitem.Item) error { func (res *LedgerBlockSR) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -475,8 +475,8 @@ func itemToLedgerTransaction(item stackitem.Item, err error) (*LedgerTransaction
return res, err return res, err
} }
// FromStackItem retrieves fields of LedgerTransaction from the given stack item // FromStackItem retrieves fields of LedgerTransaction from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *LedgerTransaction) FromStackItem(item stackitem.Item) error { func (res *LedgerTransaction) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -571,8 +571,8 @@ func itemToLedgerTransactionSigner(item stackitem.Item, err error) (*LedgerTrans
return res, err return res, err
} }
// FromStackItem retrieves fields of LedgerTransactionSigner from the given stack item // FromStackItem retrieves fields of LedgerTransactionSigner from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *LedgerTransactionSigner) FromStackItem(item stackitem.Item) error { func (res *LedgerTransactionSigner) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -698,8 +698,8 @@ func itemToLedgerWitnessCondition(item stackitem.Item, err error) (*LedgerWitnes
return res, err return res, err
} }
// FromStackItem retrieves fields of LedgerWitnessCondition from the given stack item // FromStackItem retrieves fields of LedgerWitnessCondition from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *LedgerWitnessCondition) FromStackItem(item stackitem.Item) error { func (res *LedgerWitnessCondition) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -738,8 +738,8 @@ func itemToLedgerWitnessRule(item stackitem.Item, err error) (*LedgerWitnessRule
return res, err return res, err
} }
// FromStackItem retrieves fields of LedgerWitnessRule from the given stack item // FromStackItem retrieves fields of LedgerWitnessRule from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *LedgerWitnessRule) FromStackItem(item stackitem.Item) error { func (res *LedgerWitnessRule) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -769,7 +769,7 @@ func (res *LedgerWitnessRule) FromStackItem(item stackitem.Item) error {
} }
// ComplicatedNameEventsFromApplicationLog retrieves a set of all emitted events // ComplicatedNameEventsFromApplicationLog retrieves a set of all emitted events
// with "! complicated name %$#" name from the provided ApplicationLog. // with "! complicated name %$#" name from the provided [result.ApplicationLog].
func ComplicatedNameEventsFromApplicationLog(log *result.ApplicationLog) ([]*ComplicatedNameEvent, error) { func ComplicatedNameEventsFromApplicationLog(log *result.ApplicationLog) ([]*ComplicatedNameEvent, error) {
if log == nil { if log == nil {
return nil, errors.New("nil application log") return nil, errors.New("nil application log")
@ -793,7 +793,7 @@ func ComplicatedNameEventsFromApplicationLog(log *result.ApplicationLog) ([]*Com
return res, nil return res, nil
} }
// FromStackItem converts provided stackitem.Array to ComplicatedNameEvent or // FromStackItem converts provided [stackitem.Array] to ComplicatedNameEvent or
// returns an error if it's not possible to do to so. // returns an error if it's not possible to do to so.
func (e *ComplicatedNameEvent) FromStackItem(item *stackitem.Array) error { func (e *ComplicatedNameEvent) FromStackItem(item *stackitem.Array) error {
if item == nil { if item == nil {
@ -830,7 +830,7 @@ func (e *ComplicatedNameEvent) FromStackItem(item *stackitem.Array) error {
} }
// SomeMapEventsFromApplicationLog retrieves a set of all emitted events // SomeMapEventsFromApplicationLog retrieves a set of all emitted events
// with "SomeMap" name from the provided ApplicationLog. // with "SomeMap" name from the provided [result.ApplicationLog].
func SomeMapEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeMapEvent, error) { func SomeMapEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeMapEvent, error) {
if log == nil { if log == nil {
return nil, errors.New("nil application log") return nil, errors.New("nil application log")
@ -854,7 +854,7 @@ func SomeMapEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeMapEven
return res, nil return res, nil
} }
// FromStackItem converts provided stackitem.Array to SomeMapEvent or // FromStackItem converts provided [stackitem.Array] to SomeMapEvent or
// returns an error if it's not possible to do to so. // returns an error if it's not possible to do to so.
func (e *SomeMapEvent) FromStackItem(item *stackitem.Array) error { func (e *SomeMapEvent) FromStackItem(item *stackitem.Array) error {
if item == nil { if item == nil {
@ -900,7 +900,7 @@ func (e *SomeMapEvent) FromStackItem(item *stackitem.Array) error {
} }
// SomeStructEventsFromApplicationLog retrieves a set of all emitted events // SomeStructEventsFromApplicationLog retrieves a set of all emitted events
// with "SomeStruct" name from the provided ApplicationLog. // with "SomeStruct" name from the provided [result.ApplicationLog].
func SomeStructEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeStructEvent, error) { func SomeStructEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeStructEvent, error) {
if log == nil { if log == nil {
return nil, errors.New("nil application log") return nil, errors.New("nil application log")
@ -924,7 +924,7 @@ func SomeStructEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeStru
return res, nil return res, nil
} }
// FromStackItem converts provided stackitem.Array to SomeStructEvent or // FromStackItem converts provided [stackitem.Array] to SomeStructEvent or
// returns an error if it's not possible to do to so. // returns an error if it's not possible to do to so.
func (e *SomeStructEvent) FromStackItem(item *stackitem.Array) error { func (e *SomeStructEvent) FromStackItem(item *stackitem.Array) error {
if item == nil { if item == nil {
@ -965,7 +965,7 @@ func (e *SomeStructEvent) FromStackItem(item *stackitem.Array) error {
} }
// SomeArrayEventsFromApplicationLog retrieves a set of all emitted events // SomeArrayEventsFromApplicationLog retrieves a set of all emitted events
// with "SomeArray" name from the provided ApplicationLog. // with "SomeArray" name from the provided [result.ApplicationLog].
func SomeArrayEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeArrayEvent, error) { func SomeArrayEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeArrayEvent, error) {
if log == nil { if log == nil {
return nil, errors.New("nil application log") return nil, errors.New("nil application log")
@ -989,7 +989,7 @@ func SomeArrayEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeArray
return res, nil return res, nil
} }
// FromStackItem converts provided stackitem.Array to SomeArrayEvent or // FromStackItem converts provided [stackitem.Array] to SomeArrayEvent or
// returns an error if it's not possible to do to so. // returns an error if it's not possible to do to so.
func (e *SomeArrayEvent) FromStackItem(item *stackitem.Array) error { func (e *SomeArrayEvent) FromStackItem(item *stackitem.Array) error {
if item == nil { if item == nil {

View file

@ -221,8 +221,8 @@ func itemToCrazyStruct(item stackitem.Item, err error) (*CrazyStruct, error) {
return res, err return res, err
} }
// FromStackItem retrieves fields of CrazyStruct from the given stack item // FromStackItem retrieves fields of CrazyStruct from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *CrazyStruct) FromStackItem(item stackitem.Item) error { func (res *CrazyStruct) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -261,8 +261,8 @@ func itemToLedgerBlock(item stackitem.Item, err error) (*LedgerBlock, error) {
return res, err return res, err
} }
// FromStackItem retrieves fields of LedgerBlock from the given stack item // FromStackItem retrieves fields of LedgerBlock from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *LedgerBlock) FromStackItem(item stackitem.Item) error { func (res *LedgerBlock) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -383,8 +383,8 @@ func itemToLedgerBlockSR(item stackitem.Item, err error) (*LedgerBlockSR, error)
return res, err return res, err
} }
// FromStackItem retrieves fields of LedgerBlockSR from the given stack item // FromStackItem retrieves fields of LedgerBlockSR from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *LedgerBlockSR) FromStackItem(item stackitem.Item) error { func (res *LedgerBlockSR) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -521,8 +521,8 @@ func itemToLedgerTransaction(item stackitem.Item, err error) (*LedgerTransaction
return res, err return res, err
} }
// FromStackItem retrieves fields of LedgerTransaction from the given stack item // FromStackItem retrieves fields of LedgerTransaction from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *LedgerTransaction) FromStackItem(item stackitem.Item) error { func (res *LedgerTransaction) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -617,8 +617,8 @@ func itemToLedgerTransactionSigner(item stackitem.Item, err error) (*LedgerTrans
return res, err return res, err
} }
// FromStackItem retrieves fields of LedgerTransactionSigner from the given stack item // FromStackItem retrieves fields of LedgerTransactionSigner from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *LedgerTransactionSigner) FromStackItem(item stackitem.Item) error { func (res *LedgerTransactionSigner) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -744,8 +744,8 @@ func itemToLedgerWitnessCondition(item stackitem.Item, err error) (*LedgerWitnes
return res, err return res, err
} }
// FromStackItem retrieves fields of LedgerWitnessCondition from the given stack item // FromStackItem retrieves fields of LedgerWitnessCondition from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *LedgerWitnessCondition) FromStackItem(item stackitem.Item) error { func (res *LedgerWitnessCondition) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -784,8 +784,8 @@ func itemToLedgerWitnessRule(item stackitem.Item, err error) (*LedgerWitnessRule
return res, err return res, err
} }
// FromStackItem retrieves fields of LedgerWitnessRule from the given stack item // FromStackItem retrieves fields of LedgerWitnessRule from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *LedgerWitnessRule) FromStackItem(item stackitem.Item) error { func (res *LedgerWitnessRule) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -815,7 +815,7 @@ func (res *LedgerWitnessRule) FromStackItem(item stackitem.Item) error {
} }
// ComplicatedNameEventsFromApplicationLog retrieves a set of all emitted events // ComplicatedNameEventsFromApplicationLog retrieves a set of all emitted events
// with "! complicated name %$#" name from the provided ApplicationLog. // with "! complicated name %$#" name from the provided [result.ApplicationLog].
func ComplicatedNameEventsFromApplicationLog(log *result.ApplicationLog) ([]*ComplicatedNameEvent, error) { func ComplicatedNameEventsFromApplicationLog(log *result.ApplicationLog) ([]*ComplicatedNameEvent, error) {
if log == nil { if log == nil {
return nil, errors.New("nil application log") return nil, errors.New("nil application log")
@ -839,7 +839,7 @@ func ComplicatedNameEventsFromApplicationLog(log *result.ApplicationLog) ([]*Com
return res, nil return res, nil
} }
// FromStackItem converts provided stackitem.Array to ComplicatedNameEvent or // FromStackItem converts provided [stackitem.Array] to ComplicatedNameEvent or
// returns an error if it's not possible to do to so. // returns an error if it's not possible to do to so.
func (e *ComplicatedNameEvent) FromStackItem(item *stackitem.Array) error { func (e *ComplicatedNameEvent) FromStackItem(item *stackitem.Array) error {
if item == nil { if item == nil {
@ -876,7 +876,7 @@ func (e *ComplicatedNameEvent) FromStackItem(item *stackitem.Array) error {
} }
// SomeMapEventsFromApplicationLog retrieves a set of all emitted events // SomeMapEventsFromApplicationLog retrieves a set of all emitted events
// with "SomeMap" name from the provided ApplicationLog. // with "SomeMap" name from the provided [result.ApplicationLog].
func SomeMapEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeMapEvent, error) { func SomeMapEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeMapEvent, error) {
if log == nil { if log == nil {
return nil, errors.New("nil application log") return nil, errors.New("nil application log")
@ -900,7 +900,7 @@ func SomeMapEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeMapEven
return res, nil return res, nil
} }
// FromStackItem converts provided stackitem.Array to SomeMapEvent or // FromStackItem converts provided [stackitem.Array] to SomeMapEvent or
// returns an error if it's not possible to do to so. // returns an error if it's not possible to do to so.
func (e *SomeMapEvent) FromStackItem(item *stackitem.Array) error { func (e *SomeMapEvent) FromStackItem(item *stackitem.Array) error {
if item == nil { if item == nil {
@ -996,7 +996,7 @@ func (e *SomeMapEvent) FromStackItem(item *stackitem.Array) error {
} }
// SomeStructEventsFromApplicationLog retrieves a set of all emitted events // SomeStructEventsFromApplicationLog retrieves a set of all emitted events
// with "SomeStruct" name from the provided ApplicationLog. // with "SomeStruct" name from the provided [result.ApplicationLog].
func SomeStructEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeStructEvent, error) { func SomeStructEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeStructEvent, error) {
if log == nil { if log == nil {
return nil, errors.New("nil application log") return nil, errors.New("nil application log")
@ -1020,7 +1020,7 @@ func SomeStructEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeStru
return res, nil return res, nil
} }
// FromStackItem converts provided stackitem.Array to SomeStructEvent or // FromStackItem converts provided [stackitem.Array] to SomeStructEvent or
// returns an error if it's not possible to do to so. // returns an error if it's not possible to do to so.
func (e *SomeStructEvent) FromStackItem(item *stackitem.Array) error { func (e *SomeStructEvent) FromStackItem(item *stackitem.Array) error {
if item == nil { if item == nil {
@ -1048,7 +1048,7 @@ func (e *SomeStructEvent) FromStackItem(item *stackitem.Array) error {
} }
// SomeArrayEventsFromApplicationLog retrieves a set of all emitted events // SomeArrayEventsFromApplicationLog retrieves a set of all emitted events
// with "SomeArray" name from the provided ApplicationLog. // with "SomeArray" name from the provided [result.ApplicationLog].
func SomeArrayEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeArrayEvent, error) { func SomeArrayEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeArrayEvent, error) {
if log == nil { if log == nil {
return nil, errors.New("nil application log") return nil, errors.New("nil application log")
@ -1072,7 +1072,7 @@ func SomeArrayEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeArray
return res, nil return res, nil
} }
// FromStackItem converts provided stackitem.Array to SomeArrayEvent or // FromStackItem converts provided [stackitem.Array] to SomeArrayEvent or
// returns an error if it's not possible to do to so. // returns an error if it's not possible to do to so.
func (e *SomeArrayEvent) FromStackItem(item *stackitem.Array) error { func (e *SomeArrayEvent) FromStackItem(item *stackitem.Array) error {
if item == nil { if item == nil {

View file

@ -221,8 +221,8 @@ func itemToLedgerBlock(item stackitem.Item, err error) (*LedgerBlock, error) {
return res, err return res, err
} }
// FromStackItem retrieves fields of LedgerBlock from the given stack item // FromStackItem retrieves fields of LedgerBlock from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *LedgerBlock) FromStackItem(item stackitem.Item) error { func (res *LedgerBlock) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -343,8 +343,8 @@ func itemToLedgerBlockSR(item stackitem.Item, err error) (*LedgerBlockSR, error)
return res, err return res, err
} }
// FromStackItem retrieves fields of LedgerBlockSR from the given stack item // FromStackItem retrieves fields of LedgerBlockSR from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *LedgerBlockSR) FromStackItem(item stackitem.Item) error { func (res *LedgerBlockSR) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -481,8 +481,8 @@ func itemToLedgerTransaction(item stackitem.Item, err error) (*LedgerTransaction
return res, err return res, err
} }
// FromStackItem retrieves fields of LedgerTransaction from the given stack item // FromStackItem retrieves fields of LedgerTransaction from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *LedgerTransaction) FromStackItem(item stackitem.Item) error { func (res *LedgerTransaction) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -577,8 +577,8 @@ func itemToLedgerTransactionSigner(item stackitem.Item, err error) (*LedgerTrans
return res, err return res, err
} }
// FromStackItem retrieves fields of LedgerTransactionSigner from the given stack item // FromStackItem retrieves fields of LedgerTransactionSigner from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *LedgerTransactionSigner) FromStackItem(item stackitem.Item) error { func (res *LedgerTransactionSigner) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -704,8 +704,8 @@ func itemToLedgerWitnessCondition(item stackitem.Item, err error) (*LedgerWitnes
return res, err return res, err
} }
// FromStackItem retrieves fields of LedgerWitnessCondition from the given stack item // FromStackItem retrieves fields of LedgerWitnessCondition from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *LedgerWitnessCondition) FromStackItem(item stackitem.Item) error { func (res *LedgerWitnessCondition) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -744,8 +744,8 @@ func itemToLedgerWitnessRule(item stackitem.Item, err error) (*LedgerWitnessRule
return res, err return res, err
} }
// FromStackItem retrieves fields of LedgerWitnessRule from the given stack item // FromStackItem retrieves fields of LedgerWitnessRule from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *LedgerWitnessRule) FromStackItem(item stackitem.Item) error { func (res *LedgerWitnessRule) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -784,8 +784,8 @@ func itemToUnnamed(item stackitem.Item, err error) (*Unnamed, error) {
return res, err return res, err
} }
// FromStackItem retrieves fields of Unnamed from the given stack item // FromStackItem retrieves fields of Unnamed from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *Unnamed) FromStackItem(item stackitem.Item) error { func (res *Unnamed) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -815,7 +815,7 @@ func (res *Unnamed) FromStackItem(item stackitem.Item) error {
} }
// ComplicatedNameEventsFromApplicationLog retrieves a set of all emitted events // ComplicatedNameEventsFromApplicationLog retrieves a set of all emitted events
// with "! complicated name %$#" name from the provided ApplicationLog. // with "! complicated name %$#" name from the provided [result.ApplicationLog].
func ComplicatedNameEventsFromApplicationLog(log *result.ApplicationLog) ([]*ComplicatedNameEvent, error) { func ComplicatedNameEventsFromApplicationLog(log *result.ApplicationLog) ([]*ComplicatedNameEvent, error) {
if log == nil { if log == nil {
return nil, errors.New("nil application log") return nil, errors.New("nil application log")
@ -839,7 +839,7 @@ func ComplicatedNameEventsFromApplicationLog(log *result.ApplicationLog) ([]*Com
return res, nil return res, nil
} }
// FromStackItem converts provided stackitem.Array to ComplicatedNameEvent or // FromStackItem converts provided [stackitem.Array] to ComplicatedNameEvent or
// returns an error if it's not possible to do to so. // returns an error if it's not possible to do to so.
func (e *ComplicatedNameEvent) FromStackItem(item *stackitem.Array) error { func (e *ComplicatedNameEvent) FromStackItem(item *stackitem.Array) error {
if item == nil { if item == nil {
@ -876,7 +876,7 @@ func (e *ComplicatedNameEvent) FromStackItem(item *stackitem.Array) error {
} }
// SomeMapEventsFromApplicationLog retrieves a set of all emitted events // SomeMapEventsFromApplicationLog retrieves a set of all emitted events
// with "SomeMap" name from the provided ApplicationLog. // with "SomeMap" name from the provided [result.ApplicationLog].
func SomeMapEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeMapEvent, error) { func SomeMapEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeMapEvent, error) {
if log == nil { if log == nil {
return nil, errors.New("nil application log") return nil, errors.New("nil application log")
@ -900,7 +900,7 @@ func SomeMapEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeMapEven
return res, nil return res, nil
} }
// FromStackItem converts provided stackitem.Array to SomeMapEvent or // FromStackItem converts provided [stackitem.Array] to SomeMapEvent or
// returns an error if it's not possible to do to so. // returns an error if it's not possible to do to so.
func (e *SomeMapEvent) FromStackItem(item *stackitem.Array) error { func (e *SomeMapEvent) FromStackItem(item *stackitem.Array) error {
if item == nil { if item == nil {
@ -1009,7 +1009,7 @@ func (e *SomeMapEvent) FromStackItem(item *stackitem.Array) error {
} }
// SomeStructEventsFromApplicationLog retrieves a set of all emitted events // SomeStructEventsFromApplicationLog retrieves a set of all emitted events
// with "SomeStruct" name from the provided ApplicationLog. // with "SomeStruct" name from the provided [result.ApplicationLog].
func SomeStructEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeStructEvent, error) { func SomeStructEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeStructEvent, error) {
if log == nil { if log == nil {
return nil, errors.New("nil application log") return nil, errors.New("nil application log")
@ -1033,7 +1033,7 @@ func SomeStructEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeStru
return res, nil return res, nil
} }
// FromStackItem converts provided stackitem.Array to SomeStructEvent or // FromStackItem converts provided [stackitem.Array] to SomeStructEvent or
// returns an error if it's not possible to do to so. // returns an error if it's not possible to do to so.
func (e *SomeStructEvent) FromStackItem(item *stackitem.Array) error { func (e *SomeStructEvent) FromStackItem(item *stackitem.Array) error {
if item == nil { if item == nil {
@ -1061,7 +1061,7 @@ func (e *SomeStructEvent) FromStackItem(item *stackitem.Array) error {
} }
// SomeArrayEventsFromApplicationLog retrieves a set of all emitted events // SomeArrayEventsFromApplicationLog retrieves a set of all emitted events
// with "SomeArray" name from the provided ApplicationLog. // with "SomeArray" name from the provided [result.ApplicationLog].
func SomeArrayEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeArrayEvent, error) { func SomeArrayEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeArrayEvent, error) {
if log == nil { if log == nil {
return nil, errors.New("nil application log") return nil, errors.New("nil application log")
@ -1085,7 +1085,7 @@ func SomeArrayEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeArray
return res, nil return res, nil
} }
// FromStackItem converts provided stackitem.Array to SomeArrayEvent or // FromStackItem converts provided [stackitem.Array] to SomeArrayEvent or
// returns an error if it's not possible to do to so. // returns an error if it's not possible to do to so.
func (e *SomeArrayEvent) FromStackItem(item *stackitem.Array) error { func (e *SomeArrayEvent) FromStackItem(item *stackitem.Array) error {
if item == nil { if item == nil {

View file

@ -199,8 +199,8 @@ func itemToLedgerBlock(item stackitem.Item, err error) (*LedgerBlock, error) {
return res, err return res, err
} }
// FromStackItem retrieves fields of LedgerBlock from the given stack item // FromStackItem retrieves fields of LedgerBlock from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *LedgerBlock) FromStackItem(item stackitem.Item) error { func (res *LedgerBlock) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -321,8 +321,8 @@ func itemToLedgerBlockSR(item stackitem.Item, err error) (*LedgerBlockSR, error)
return res, err return res, err
} }
// FromStackItem retrieves fields of LedgerBlockSR from the given stack item // FromStackItem retrieves fields of LedgerBlockSR from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *LedgerBlockSR) FromStackItem(item stackitem.Item) error { func (res *LedgerBlockSR) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -459,8 +459,8 @@ func itemToLedgerTransaction(item stackitem.Item, err error) (*LedgerTransaction
return res, err return res, err
} }
// FromStackItem retrieves fields of LedgerTransaction from the given stack item // FromStackItem retrieves fields of LedgerTransaction from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *LedgerTransaction) FromStackItem(item stackitem.Item) error { func (res *LedgerTransaction) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -555,8 +555,8 @@ func itemToLedgerTransactionSigner(item stackitem.Item, err error) (*LedgerTrans
return res, err return res, err
} }
// FromStackItem retrieves fields of LedgerTransactionSigner from the given stack item // FromStackItem retrieves fields of LedgerTransactionSigner from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *LedgerTransactionSigner) FromStackItem(item stackitem.Item) error { func (res *LedgerTransactionSigner) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -682,8 +682,8 @@ func itemToLedgerWitnessCondition(item stackitem.Item, err error) (*LedgerWitnes
return res, err return res, err
} }
// FromStackItem retrieves fields of LedgerWitnessCondition from the given stack item // FromStackItem retrieves fields of LedgerWitnessCondition from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *LedgerWitnessCondition) FromStackItem(item stackitem.Item) error { func (res *LedgerWitnessCondition) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -722,8 +722,8 @@ func itemToLedgerWitnessRule(item stackitem.Item, err error) (*LedgerWitnessRule
return res, err return res, err
} }
// FromStackItem retrieves fields of LedgerWitnessRule from the given stack item // FromStackItem retrieves fields of LedgerWitnessRule from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *LedgerWitnessRule) FromStackItem(item stackitem.Item) error { func (res *LedgerWitnessRule) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -762,8 +762,8 @@ func itemToManagementABI(item stackitem.Item, err error) (*ManagementABI, error)
return res, err return res, err
} }
// FromStackItem retrieves fields of ManagementABI from the given stack item // FromStackItem retrieves fields of ManagementABI from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *ManagementABI) FromStackItem(item stackitem.Item) error { func (res *ManagementABI) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -828,8 +828,8 @@ func itemToManagementContract(item stackitem.Item, err error) (*ManagementContra
return res, err return res, err
} }
// FromStackItem retrieves fields of ManagementContract from the given stack item // FromStackItem retrieves fields of ManagementContract from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *ManagementContract) FromStackItem(item stackitem.Item) error { func (res *ManagementContract) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -896,8 +896,8 @@ func itemToManagementEvent(item stackitem.Item, err error) (*ManagementEvent, er
return res, err return res, err
} }
// FromStackItem retrieves fields of ManagementEvent from the given stack item // FromStackItem retrieves fields of ManagementEvent from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *ManagementEvent) FromStackItem(item stackitem.Item) error { func (res *ManagementEvent) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -958,8 +958,8 @@ func itemToManagementGroup(item stackitem.Item, err error) (*ManagementGroup, er
return res, err return res, err
} }
// FromStackItem retrieves fields of ManagementGroup from the given stack item // FromStackItem retrieves fields of ManagementGroup from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *ManagementGroup) FromStackItem(item stackitem.Item) error { func (res *ManagementGroup) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -1008,8 +1008,8 @@ func itemToManagementManifest(item stackitem.Item, err error) (*ManagementManife
return res, err return res, err
} }
// FromStackItem retrieves fields of ManagementManifest from the given stack item // FromStackItem retrieves fields of ManagementManifest from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *ManagementManifest) FromStackItem(item stackitem.Item) error { func (res *ManagementManifest) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -1200,8 +1200,8 @@ func itemToManagementMethod(item stackitem.Item, err error) (*ManagementMethod,
return res, err return res, err
} }
// FromStackItem retrieves fields of ManagementMethod from the given stack item // FromStackItem retrieves fields of ManagementMethod from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *ManagementMethod) FromStackItem(item stackitem.Item) error { func (res *ManagementMethod) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -1280,8 +1280,8 @@ func itemToManagementParameter(item stackitem.Item, err error) (*ManagementParam
return res, err return res, err
} }
// FromStackItem retrieves fields of ManagementParameter from the given stack item // FromStackItem retrieves fields of ManagementParameter from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *ManagementParameter) FromStackItem(item stackitem.Item) error { func (res *ManagementParameter) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -1329,8 +1329,8 @@ func itemToManagementPermission(item stackitem.Item, err error) (*ManagementPerm
return res, err return res, err
} }
// FromStackItem retrieves fields of ManagementPermission from the given stack item // FromStackItem retrieves fields of ManagementPermission from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *ManagementPermission) FromStackItem(item stackitem.Item) error { func (res *ManagementPermission) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -1401,8 +1401,8 @@ func itemToStructsInternal(item stackitem.Item, err error) (*StructsInternal, er
return res, err return res, err
} }
// FromStackItem retrieves fields of StructsInternal from the given stack item // FromStackItem retrieves fields of StructsInternal from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *StructsInternal) FromStackItem(item stackitem.Item) error { func (res *StructsInternal) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {

View file

@ -78,7 +78,7 @@ func (c *Contract) VerifyUnsigned() (*transaction.Transaction, error) {
} }
// HelloWorldEventsFromApplicationLog retrieves a set of all emitted events // HelloWorldEventsFromApplicationLog retrieves a set of all emitted events
// with "Hello world!" name from the provided ApplicationLog. // with "Hello world!" name from the provided [result.ApplicationLog].
func HelloWorldEventsFromApplicationLog(log *result.ApplicationLog) ([]*HelloWorldEvent, error) { func HelloWorldEventsFromApplicationLog(log *result.ApplicationLog) ([]*HelloWorldEvent, error) {
if log == nil { if log == nil {
return nil, errors.New("nil application log") return nil, errors.New("nil application log")
@ -102,7 +102,7 @@ func HelloWorldEventsFromApplicationLog(log *result.ApplicationLog) ([]*HelloWor
return res, nil return res, nil
} }
// FromStackItem converts provided stackitem.Array to HelloWorldEvent or // FromStackItem converts provided [stackitem.Array] to HelloWorldEvent or
// returns an error if it's not possible to do to so. // returns an error if it's not possible to do to so.
func (e *HelloWorldEvent) FromStackItem(item *stackitem.Array) error { func (e *HelloWorldEvent) FromStackItem(item *stackitem.Array) error {
if item == nil { if item == nil {

View file

@ -235,8 +235,8 @@ func itemTo{{toTypeName $name}}(item stackitem.Item, err error) (*{{toTypeName $
return res, err return res, err
} }
// FromStackItem retrieves fields of {{toTypeName $name}} from the given stack item // FromStackItem retrieves fields of {{toTypeName $name}} from the given
// or returns an error if it's not possible to do to so. // [stackitem.Item] or returns an error if it's not possible to do to so.
func (res *{{toTypeName $name}}) FromStackItem(item stackitem.Item) error { func (res *{{toTypeName $name}}) FromStackItem(item stackitem.Item) error {
arr, ok := item.Value().([]stackitem.Item) arr, ok := item.Value().([]stackitem.Item)
if !ok { if !ok {
@ -263,7 +263,7 @@ func (res *{{toTypeName $name}}) FromStackItem(item stackitem.Item) error {
{{ end -}} {{ end -}}
{{- range $e := .CustomEvents }} {{- range $e := .CustomEvents }}
// {{$e.Name}}sFromApplicationLog retrieves a set of all emitted events // {{$e.Name}}sFromApplicationLog retrieves a set of all emitted events
// with "{{$e.ManifestName}}" name from the provided ApplicationLog. // with "{{$e.ManifestName}}" name from the provided [result.ApplicationLog].
func {{$e.Name}}sFromApplicationLog(log *result.ApplicationLog) ([]*{{$e.Name}}, error) { func {{$e.Name}}sFromApplicationLog(log *result.ApplicationLog) ([]*{{$e.Name}}, error) {
if log == nil { if log == nil {
return nil, errors.New("nil application log") return nil, errors.New("nil application log")
@ -287,7 +287,7 @@ func {{$e.Name}}sFromApplicationLog(log *result.ApplicationLog) ([]*{{$e.Name}},
return res, nil return res, nil
} }
// FromStackItem converts provided stackitem.Array to {{$e.Name}} or // FromStackItem converts provided [stackitem.Array] to {{$e.Name}} or
// returns an error if it's not possible to do to so. // returns an error if it's not possible to do to so.
func (e *{{$e.Name}}) FromStackItem(item *stackitem.Array) error { func (e *{{$e.Name}}) FromStackItem(item *stackitem.Array) error {
if item == nil { if item == nil {