diff --git a/cli/smartcontract/testdata/nameservice/nns.go b/cli/smartcontract/testdata/nameservice/nns.go index 82cc8374d..3636fd333 100644 --- a/cli/smartcontract/testdata/nameservice/nns.go +++ b/cli/smartcontract/testdata/nameservice/nns.go @@ -339,7 +339,7 @@ func (c *Contract) DeleteRecordUnsigned(name string, typev *big.Int) (*transacti } // 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) { if log == nil { return nil, errors.New("nil application log") @@ -363,7 +363,7 @@ func SetAdminEventsFromApplicationLog(log *result.ApplicationLog) ([]*SetAdminEv 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. func (e *SetAdminEvent) FromStackItem(item *stackitem.Array) error { if item == nil { @@ -432,7 +432,7 @@ func (e *SetAdminEvent) FromStackItem(item *stackitem.Array) error { } // 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) { if log == nil { return nil, errors.New("nil application log") @@ -456,7 +456,7 @@ func RenewEventsFromApplicationLog(log *result.ApplicationLog) ([]*RenewEvent, e 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. func (e *RenewEvent) FromStackItem(item *stackitem.Array) error { if item == nil { diff --git a/cli/smartcontract/testdata/nex/nex.go b/cli/smartcontract/testdata/nex/nex.go index 0d716adde..32e7526c8 100644 --- a/cli/smartcontract/testdata/nex/nex.go +++ b/cli/smartcontract/testdata/nex/nex.go @@ -243,7 +243,7 @@ func (c *Contract) UpdateCapUnsigned(newCap *big.Int) (*transaction.Transaction, } // 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) { if log == nil { return nil, errors.New("nil application log") @@ -267,7 +267,7 @@ func OnMintEventsFromApplicationLog(log *result.ApplicationLog) ([]*OnMintEvent, 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. func (e *OnMintEvent) FromStackItem(item *stackitem.Array) error { if item == nil { diff --git a/cli/smartcontract/testdata/notifications/rpcbindings.out b/cli/smartcontract/testdata/notifications/rpcbindings.out index 1e873d611..a95cc1ea0 100644 --- a/cli/smartcontract/testdata/notifications/rpcbindings.out +++ b/cli/smartcontract/testdata/notifications/rpcbindings.out @@ -215,8 +215,8 @@ func itemToLedgerBlock(item stackitem.Item, err error) (*LedgerBlock, error) { return res, err } -// FromStackItem retrieves fields of LedgerBlock from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of LedgerBlock from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *LedgerBlock) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -337,8 +337,8 @@ func itemToLedgerBlockSR(item stackitem.Item, err error) (*LedgerBlockSR, error) return res, err } -// FromStackItem retrieves fields of LedgerBlockSR from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of LedgerBlockSR from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *LedgerBlockSR) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -475,8 +475,8 @@ func itemToLedgerTransaction(item stackitem.Item, err error) (*LedgerTransaction return res, err } -// FromStackItem retrieves fields of LedgerTransaction from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of LedgerTransaction from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *LedgerTransaction) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -571,8 +571,8 @@ func itemToLedgerTransactionSigner(item stackitem.Item, err error) (*LedgerTrans return res, err } -// FromStackItem retrieves fields of LedgerTransactionSigner from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of LedgerTransactionSigner from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *LedgerTransactionSigner) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -698,8 +698,8 @@ func itemToLedgerWitnessCondition(item stackitem.Item, err error) (*LedgerWitnes return res, err } -// FromStackItem retrieves fields of LedgerWitnessCondition from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of LedgerWitnessCondition from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *LedgerWitnessCondition) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -738,8 +738,8 @@ func itemToLedgerWitnessRule(item stackitem.Item, err error) (*LedgerWitnessRule return res, err } -// FromStackItem retrieves fields of LedgerWitnessRule from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of LedgerWitnessRule from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *LedgerWitnessRule) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -769,7 +769,7 @@ func (res *LedgerWitnessRule) FromStackItem(item stackitem.Item) error { } // 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) { if log == nil { return nil, errors.New("nil application log") @@ -793,7 +793,7 @@ func ComplicatedNameEventsFromApplicationLog(log *result.ApplicationLog) ([]*Com 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. func (e *ComplicatedNameEvent) FromStackItem(item *stackitem.Array) error { if item == nil { @@ -830,7 +830,7 @@ func (e *ComplicatedNameEvent) FromStackItem(item *stackitem.Array) error { } // 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) { if log == nil { return nil, errors.New("nil application log") @@ -854,7 +854,7 @@ func SomeMapEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeMapEven 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. func (e *SomeMapEvent) FromStackItem(item *stackitem.Array) error { if item == nil { @@ -900,7 +900,7 @@ func (e *SomeMapEvent) FromStackItem(item *stackitem.Array) error { } // 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) { if log == nil { return nil, errors.New("nil application log") @@ -924,7 +924,7 @@ func SomeStructEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeStru 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. func (e *SomeStructEvent) FromStackItem(item *stackitem.Array) error { if item == nil { @@ -965,7 +965,7 @@ func (e *SomeStructEvent) FromStackItem(item *stackitem.Array) error { } // 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) { if log == nil { return nil, errors.New("nil application log") @@ -989,7 +989,7 @@ func SomeArrayEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeArray 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. func (e *SomeArrayEvent) FromStackItem(item *stackitem.Array) error { if item == nil { diff --git a/cli/smartcontract/testdata/notifications/rpcbindings_extended.out b/cli/smartcontract/testdata/notifications/rpcbindings_extended.out index 3b2ab5c07..818c91993 100755 --- a/cli/smartcontract/testdata/notifications/rpcbindings_extended.out +++ b/cli/smartcontract/testdata/notifications/rpcbindings_extended.out @@ -221,8 +221,8 @@ func itemToCrazyStruct(item stackitem.Item, err error) (*CrazyStruct, error) { return res, err } -// FromStackItem retrieves fields of CrazyStruct from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of CrazyStruct from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *CrazyStruct) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -261,8 +261,8 @@ func itemToLedgerBlock(item stackitem.Item, err error) (*LedgerBlock, error) { return res, err } -// FromStackItem retrieves fields of LedgerBlock from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of LedgerBlock from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *LedgerBlock) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -383,8 +383,8 @@ func itemToLedgerBlockSR(item stackitem.Item, err error) (*LedgerBlockSR, error) return res, err } -// FromStackItem retrieves fields of LedgerBlockSR from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of LedgerBlockSR from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *LedgerBlockSR) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -521,8 +521,8 @@ func itemToLedgerTransaction(item stackitem.Item, err error) (*LedgerTransaction return res, err } -// FromStackItem retrieves fields of LedgerTransaction from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of LedgerTransaction from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *LedgerTransaction) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -617,8 +617,8 @@ func itemToLedgerTransactionSigner(item stackitem.Item, err error) (*LedgerTrans return res, err } -// FromStackItem retrieves fields of LedgerTransactionSigner from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of LedgerTransactionSigner from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *LedgerTransactionSigner) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -744,8 +744,8 @@ func itemToLedgerWitnessCondition(item stackitem.Item, err error) (*LedgerWitnes return res, err } -// FromStackItem retrieves fields of LedgerWitnessCondition from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of LedgerWitnessCondition from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *LedgerWitnessCondition) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -784,8 +784,8 @@ func itemToLedgerWitnessRule(item stackitem.Item, err error) (*LedgerWitnessRule return res, err } -// FromStackItem retrieves fields of LedgerWitnessRule from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of LedgerWitnessRule from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *LedgerWitnessRule) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -815,7 +815,7 @@ func (res *LedgerWitnessRule) FromStackItem(item stackitem.Item) error { } // 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) { if log == nil { return nil, errors.New("nil application log") @@ -839,7 +839,7 @@ func ComplicatedNameEventsFromApplicationLog(log *result.ApplicationLog) ([]*Com 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. func (e *ComplicatedNameEvent) FromStackItem(item *stackitem.Array) error { if item == nil { @@ -876,7 +876,7 @@ func (e *ComplicatedNameEvent) FromStackItem(item *stackitem.Array) error { } // 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) { if log == nil { return nil, errors.New("nil application log") @@ -900,7 +900,7 @@ func SomeMapEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeMapEven 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. func (e *SomeMapEvent) FromStackItem(item *stackitem.Array) error { if item == nil { @@ -996,7 +996,7 @@ func (e *SomeMapEvent) FromStackItem(item *stackitem.Array) error { } // 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) { if log == nil { return nil, errors.New("nil application log") @@ -1020,7 +1020,7 @@ func SomeStructEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeStru 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. func (e *SomeStructEvent) FromStackItem(item *stackitem.Array) error { if item == nil { @@ -1048,7 +1048,7 @@ func (e *SomeStructEvent) FromStackItem(item *stackitem.Array) error { } // 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) { if log == nil { return nil, errors.New("nil application log") @@ -1072,7 +1072,7 @@ func SomeArrayEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeArray 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. func (e *SomeArrayEvent) FromStackItem(item *stackitem.Array) error { if item == nil { diff --git a/cli/smartcontract/testdata/notifications/rpcbindings_guessed.out b/cli/smartcontract/testdata/notifications/rpcbindings_guessed.out index 5b4d429c1..883283d09 100755 --- a/cli/smartcontract/testdata/notifications/rpcbindings_guessed.out +++ b/cli/smartcontract/testdata/notifications/rpcbindings_guessed.out @@ -221,8 +221,8 @@ func itemToLedgerBlock(item stackitem.Item, err error) (*LedgerBlock, error) { return res, err } -// FromStackItem retrieves fields of LedgerBlock from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of LedgerBlock from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *LedgerBlock) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -343,8 +343,8 @@ func itemToLedgerBlockSR(item stackitem.Item, err error) (*LedgerBlockSR, error) return res, err } -// FromStackItem retrieves fields of LedgerBlockSR from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of LedgerBlockSR from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *LedgerBlockSR) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -481,8 +481,8 @@ func itemToLedgerTransaction(item stackitem.Item, err error) (*LedgerTransaction return res, err } -// FromStackItem retrieves fields of LedgerTransaction from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of LedgerTransaction from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *LedgerTransaction) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -577,8 +577,8 @@ func itemToLedgerTransactionSigner(item stackitem.Item, err error) (*LedgerTrans return res, err } -// FromStackItem retrieves fields of LedgerTransactionSigner from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of LedgerTransactionSigner from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *LedgerTransactionSigner) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -704,8 +704,8 @@ func itemToLedgerWitnessCondition(item stackitem.Item, err error) (*LedgerWitnes return res, err } -// FromStackItem retrieves fields of LedgerWitnessCondition from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of LedgerWitnessCondition from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *LedgerWitnessCondition) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -744,8 +744,8 @@ func itemToLedgerWitnessRule(item stackitem.Item, err error) (*LedgerWitnessRule return res, err } -// FromStackItem retrieves fields of LedgerWitnessRule from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of LedgerWitnessRule from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *LedgerWitnessRule) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -784,8 +784,8 @@ func itemToUnnamed(item stackitem.Item, err error) (*Unnamed, error) { return res, err } -// FromStackItem retrieves fields of Unnamed from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of Unnamed from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *Unnamed) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -815,7 +815,7 @@ func (res *Unnamed) FromStackItem(item stackitem.Item) error { } // 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) { if log == nil { return nil, errors.New("nil application log") @@ -839,7 +839,7 @@ func ComplicatedNameEventsFromApplicationLog(log *result.ApplicationLog) ([]*Com 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. func (e *ComplicatedNameEvent) FromStackItem(item *stackitem.Array) error { if item == nil { @@ -876,7 +876,7 @@ func (e *ComplicatedNameEvent) FromStackItem(item *stackitem.Array) error { } // 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) { if log == nil { return nil, errors.New("nil application log") @@ -900,7 +900,7 @@ func SomeMapEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeMapEven 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. func (e *SomeMapEvent) FromStackItem(item *stackitem.Array) error { if item == nil { @@ -1009,7 +1009,7 @@ func (e *SomeMapEvent) FromStackItem(item *stackitem.Array) error { } // 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) { if log == nil { return nil, errors.New("nil application log") @@ -1033,7 +1033,7 @@ func SomeStructEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeStru 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. func (e *SomeStructEvent) FromStackItem(item *stackitem.Array) error { if item == nil { @@ -1061,7 +1061,7 @@ func (e *SomeStructEvent) FromStackItem(item *stackitem.Array) error { } // 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) { if log == nil { return nil, errors.New("nil application log") @@ -1085,7 +1085,7 @@ func SomeArrayEventsFromApplicationLog(log *result.ApplicationLog) ([]*SomeArray 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. func (e *SomeArrayEvent) FromStackItem(item *stackitem.Array) error { if item == nil { diff --git a/cli/smartcontract/testdata/structs/rpcbindings.out b/cli/smartcontract/testdata/structs/rpcbindings.out index 5ac5bdcd1..ba503be59 100644 --- a/cli/smartcontract/testdata/structs/rpcbindings.out +++ b/cli/smartcontract/testdata/structs/rpcbindings.out @@ -199,8 +199,8 @@ func itemToLedgerBlock(item stackitem.Item, err error) (*LedgerBlock, error) { return res, err } -// FromStackItem retrieves fields of LedgerBlock from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of LedgerBlock from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *LedgerBlock) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -321,8 +321,8 @@ func itemToLedgerBlockSR(item stackitem.Item, err error) (*LedgerBlockSR, error) return res, err } -// FromStackItem retrieves fields of LedgerBlockSR from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of LedgerBlockSR from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *LedgerBlockSR) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -459,8 +459,8 @@ func itemToLedgerTransaction(item stackitem.Item, err error) (*LedgerTransaction return res, err } -// FromStackItem retrieves fields of LedgerTransaction from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of LedgerTransaction from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *LedgerTransaction) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -555,8 +555,8 @@ func itemToLedgerTransactionSigner(item stackitem.Item, err error) (*LedgerTrans return res, err } -// FromStackItem retrieves fields of LedgerTransactionSigner from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of LedgerTransactionSigner from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *LedgerTransactionSigner) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -682,8 +682,8 @@ func itemToLedgerWitnessCondition(item stackitem.Item, err error) (*LedgerWitnes return res, err } -// FromStackItem retrieves fields of LedgerWitnessCondition from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of LedgerWitnessCondition from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *LedgerWitnessCondition) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -722,8 +722,8 @@ func itemToLedgerWitnessRule(item stackitem.Item, err error) (*LedgerWitnessRule return res, err } -// FromStackItem retrieves fields of LedgerWitnessRule from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of LedgerWitnessRule from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *LedgerWitnessRule) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -762,8 +762,8 @@ func itemToManagementABI(item stackitem.Item, err error) (*ManagementABI, error) return res, err } -// FromStackItem retrieves fields of ManagementABI from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of ManagementABI from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *ManagementABI) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -828,8 +828,8 @@ func itemToManagementContract(item stackitem.Item, err error) (*ManagementContra return res, err } -// FromStackItem retrieves fields of ManagementContract from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of ManagementContract from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *ManagementContract) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -896,8 +896,8 @@ func itemToManagementEvent(item stackitem.Item, err error) (*ManagementEvent, er return res, err } -// FromStackItem retrieves fields of ManagementEvent from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of ManagementEvent from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *ManagementEvent) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -958,8 +958,8 @@ func itemToManagementGroup(item stackitem.Item, err error) (*ManagementGroup, er return res, err } -// FromStackItem retrieves fields of ManagementGroup from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of ManagementGroup from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *ManagementGroup) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -1008,8 +1008,8 @@ func itemToManagementManifest(item stackitem.Item, err error) (*ManagementManife return res, err } -// FromStackItem retrieves fields of ManagementManifest from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of ManagementManifest from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *ManagementManifest) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -1200,8 +1200,8 @@ func itemToManagementMethod(item stackitem.Item, err error) (*ManagementMethod, return res, err } -// FromStackItem retrieves fields of ManagementMethod from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of ManagementMethod from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *ManagementMethod) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -1280,8 +1280,8 @@ func itemToManagementParameter(item stackitem.Item, err error) (*ManagementParam return res, err } -// FromStackItem retrieves fields of ManagementParameter from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of ManagementParameter from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *ManagementParameter) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -1329,8 +1329,8 @@ func itemToManagementPermission(item stackitem.Item, err error) (*ManagementPerm return res, err } -// FromStackItem retrieves fields of ManagementPermission from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of ManagementPermission from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *ManagementPermission) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -1401,8 +1401,8 @@ func itemToStructsInternal(item stackitem.Item, err error) (*StructsInternal, er return res, err } -// FromStackItem retrieves fields of StructsInternal from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of StructsInternal from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *StructsInternal) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { diff --git a/cli/smartcontract/testdata/verifyrpc/verify.go b/cli/smartcontract/testdata/verifyrpc/verify.go index be1f5c671..3a01b990c 100644 --- a/cli/smartcontract/testdata/verifyrpc/verify.go +++ b/cli/smartcontract/testdata/verifyrpc/verify.go @@ -78,7 +78,7 @@ func (c *Contract) VerifyUnsigned() (*transaction.Transaction, error) { } // 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) { if log == nil { return nil, errors.New("nil application log") @@ -102,7 +102,7 @@ func HelloWorldEventsFromApplicationLog(log *result.ApplicationLog) ([]*HelloWor 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. func (e *HelloWorldEvent) FromStackItem(item *stackitem.Array) error { if item == nil { diff --git a/pkg/smartcontract/rpcbinding/binding.go b/pkg/smartcontract/rpcbinding/binding.go index 5f1495af3..caf6f4397 100644 --- a/pkg/smartcontract/rpcbinding/binding.go +++ b/pkg/smartcontract/rpcbinding/binding.go @@ -235,8 +235,8 @@ func itemTo{{toTypeName $name}}(item stackitem.Item, err error) (*{{toTypeName $ return res, err } -// FromStackItem retrieves fields of {{toTypeName $name}} from the given stack item -// or returns an error if it's not possible to do to so. +// FromStackItem retrieves fields of {{toTypeName $name}} from the given +// [stackitem.Item] or returns an error if it's not possible to do to so. func (res *{{toTypeName $name}}) FromStackItem(item stackitem.Item) error { arr, ok := item.Value().([]stackitem.Item) if !ok { @@ -263,7 +263,7 @@ func (res *{{toTypeName $name}}) FromStackItem(item stackitem.Item) error { {{ end -}} {{- range $e := .CustomEvents }} // {{$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) { if log == nil { return nil, errors.New("nil application log") @@ -287,7 +287,7 @@ func {{$e.Name}}sFromApplicationLog(log *result.ApplicationLog) ([]*{{$e.Name}}, 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. func (e *{{$e.Name}}) FromStackItem(item *stackitem.Array) error { if item == nil {