Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 6619890

Browse files
committed
renames NativeTokenSet() on Output to NativeTokenList()
1 parent a991249 commit 6619890

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

output.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,9 @@ func (outputs Outputs) NativeTokenSum() (NativeTokenSum, int, error) {
368368
sum := make(map[NativeTokenID]*big.Int)
369369
var ntCount int
370370
for _, output := range outputs {
371-
set := output.NativeTokenSet()
372-
ntCount += len(set)
373-
for _, nativeToken := range set {
371+
nativeTokens := output.NativeTokenList()
372+
ntCount += len(nativeTokens)
373+
for _, nativeToken := range nativeTokens {
374374
if sign := nativeToken.Amount.Sign(); sign == -1 || sign == 0 {
375375
return nil, 0, ErrNativeTokenAmountLessThanEqualZero
376376
}
@@ -585,8 +585,8 @@ type Output interface {
585585
// Deposit returns the amount this Output deposits.
586586
Deposit() uint64
587587

588-
// NativeTokenSet returns the NativeToken this output defines.
589-
NativeTokenSet() NativeTokens
588+
// NativeTokenList returns the NativeToken this output defines.
589+
NativeTokenList() NativeTokens
590590

591591
// UnlockConditionSet returns the UnlockConditionSet this output defines.
592592
UnlockConditionSet() UnlockConditionSet
@@ -752,13 +752,13 @@ func OutputsSyntacticalDepositAmount(protoParas *ProtocolParameters) OutputsSynt
752752
func OutputsSyntacticalNativeTokens() OutputsSyntacticalValidationFunc {
753753
var nativeTokensCount int
754754
return func(index int, output Output) error {
755-
set := output.NativeTokenSet()
756-
nativeTokensCount += len(set)
755+
nativeTokens := output.NativeTokenList()
756+
nativeTokensCount += len(nativeTokens)
757757
if nativeTokensCount > MaxNativeTokensCount {
758758
return ErrMaxNativeTokensCountExceeded
759759
}
760760

761-
for i, nt := range set {
761+
for i, nt := range nativeTokens {
762762
if nt.Amount.Cmp(common.Big0) == 0 {
763763
return fmt.Errorf("%w: output %d, native token index %d", ErrNativeTokenAmountLessThanEqualZero, index, i)
764764
}

output_alias.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ func (a *AliasOutput) AliasEmpty() bool {
431431
return a.AliasID == emptyAliasID
432432
}
433433

434-
func (a *AliasOutput) NativeTokenSet() NativeTokens {
434+
func (a *AliasOutput) NativeTokenList() NativeTokens {
435435
return a.NativeTokens
436436
}
437437

output_basic.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ func (e *BasicOutput) VBytes(rentStruct *RentStructure, _ VBytesFunc) uint64 {
122122
e.Features.VBytes(rentStruct, nil)
123123
}
124124

125-
func (e *BasicOutput) NativeTokenSet() NativeTokens {
125+
func (e *BasicOutput) NativeTokenList() NativeTokens {
126126
return e.NativeTokens
127127
}
128128

output_foundry.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ func (f *FoundryOutput) NativeTokenID() (NativeTokenID, error) {
376376
return f.ID()
377377
}
378378

379-
func (f *FoundryOutput) NativeTokenSet() NativeTokens {
379+
func (f *FoundryOutput) NativeTokenList() NativeTokens {
380380
return f.NativeTokens
381381
}
382382

output_nft.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ func (n *NFTOutput) Chain() ChainID {
260260
return n.NFTID
261261
}
262262

263-
func (n *NFTOutput) NativeTokenSet() NativeTokens {
263+
func (n *NFTOutput) NativeTokenList() NativeTokens {
264264
return n.NativeTokens
265265
}
266266

output_treasury.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type TreasuryOutput struct {
1414
Amount uint64
1515
}
1616

17-
func (t *TreasuryOutput) NativeTokenSet() NativeTokens {
17+
func (t *TreasuryOutput) NativeTokenList() NativeTokens {
1818
return nil
1919
}
2020

0 commit comments

Comments
 (0)