Skip to content

Commit

Permalink
Merge pull request #510 from iotaledger/feat/adapt-to-serix-changes
Browse files Browse the repository at this point in the history
Adapt to serix changes
  • Loading branch information
muXxer authored Nov 8, 2023
2 parents 14ff107 + d677c23 commit 2be0c46
Show file tree
Hide file tree
Showing 17 changed files with 125 additions and 125 deletions.
14 changes: 7 additions & 7 deletions components/debugapi/debug_models.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ type (
}

Validator struct {
AccountID iotago.AccountID `serix:"0,mapKey=accountId"`
SeatIndex uint8 `serix:"1,mapKey=seatIndex"`
PoolStake iotago.BaseToken `serix:"2,mapKey=poolStake"`
ValidatorStake iotago.BaseToken `serix:"3,mapKey=validatorStake"`
FixedCost iotago.Mana `serix:"4,mapKey=fixedCost"`
AccountID iotago.AccountID `serix:""`
SeatIndex uint8 `serix:""`
PoolStake iotago.BaseToken `serix:""`
ValidatorStake iotago.BaseToken `serix:""`
FixedCost iotago.Mana `serix:""`
}

ValidatorsSummaryResponse struct {
ValidatorSeats []*Validator `serix:"0,lengthPrefixType=uint8,mapKey=validatorSeats"`
ActiveSeats []uint32 `serix:"1,lengthPrefixType=uint8,mapKey=activeSeats"`
ValidatorSeats []*Validator `serix:"lenPrefix=uint8"`
ActiveSeats []uint32 `serix:"lenPrefix=uint8"`
}

BlockChangesResponse struct {
Expand Down
2 changes: 1 addition & 1 deletion components/protocol/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ type dependencies struct {
}

type jsonProtocolParameters struct {
ProtocolParameters []iotago.ProtocolParameters `serix:"0,mapKey=protocolParameters"`
ProtocolParameters []iotago.ProtocolParameters `serix:""`
}

func readProtocolParameters() []iotago.ProtocolParameters {
Expand Down
18 changes: 9 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ require (
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/iotaledger/hive.go/ads v0.0.0-20231108070813-497ebfef8258
github.com/iotaledger/hive.go/app v0.0.0-20231108070813-497ebfef8258
github.com/iotaledger/hive.go/constraints v0.0.0-20231108070813-497ebfef8258
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231108070813-497ebfef8258
github.com/iotaledger/hive.go/crypto v0.0.0-20231108070813-497ebfef8258
github.com/iotaledger/hive.go/constraints v0.0.0-20231108162616-bab25251edc4
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231108162616-bab25251edc4
github.com/iotaledger/hive.go/crypto v0.0.0-20231108162616-bab25251edc4
github.com/iotaledger/hive.go/ds v0.0.0-20231108070813-497ebfef8258
github.com/iotaledger/hive.go/ierrors v0.0.0-20231108070813-497ebfef8258
github.com/iotaledger/hive.go/ierrors v0.0.0-20231108162616-bab25251edc4
github.com/iotaledger/hive.go/kvstore v0.0.0-20231108070813-497ebfef8258
github.com/iotaledger/hive.go/lo v0.0.0-20231108070813-497ebfef8258
github.com/iotaledger/hive.go/lo v0.0.0-20231108162616-bab25251edc4
github.com/iotaledger/hive.go/logger v0.0.0-20231108070813-497ebfef8258
github.com/iotaledger/hive.go/runtime v0.0.0-20231108070813-497ebfef8258
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231108070813-497ebfef8258
github.com/iotaledger/hive.go/stringify v0.0.0-20231108070813-497ebfef8258
github.com/iotaledger/hive.go/runtime v0.0.0-20231108162616-bab25251edc4
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231108162616-bab25251edc4
github.com/iotaledger/hive.go/stringify v0.0.0-20231108162616-bab25251edc4
github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231108104504-1445f545de82
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231108104322-f301c3573998
github.com/iotaledger/iota.go/v4 v4.0.0-20231108103955-bf75d703d8aa
github.com/iotaledger/iota.go/v4 v4.0.0-20231108163058-11a75294e3ce
github.com/labstack/echo/v4 v4.11.2
github.com/labstack/gommon v0.4.0
github.com/libp2p/go-libp2p v0.32.0
Expand Down
36 changes: 18 additions & 18 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -279,36 +279,36 @@ github.com/iotaledger/hive.go/ads v0.0.0-20231108070813-497ebfef8258 h1:wPNHVm76
github.com/iotaledger/hive.go/ads v0.0.0-20231108070813-497ebfef8258/go.mod h1:gbUvr01B5ha530GnNm8K2OsHXOd2BtzBYOMxyTX3iDg=
github.com/iotaledger/hive.go/app v0.0.0-20231108070813-497ebfef8258 h1:akc8HhwdRq8DiRAQQXv/UQm0qbA9ZunT/mVmFX7fYZw=
github.com/iotaledger/hive.go/app v0.0.0-20231108070813-497ebfef8258/go.mod h1:+riYmeLApkLlj4+EpuJpEJAsj/KGfD7cqLGy7oTsPOM=
github.com/iotaledger/hive.go/constraints v0.0.0-20231108070813-497ebfef8258 h1:pFOt744BV5Y96Igek0H2CiSkRi6+OfsKv0upAKl5Pyc=
github.com/iotaledger/hive.go/constraints v0.0.0-20231108070813-497ebfef8258/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s=
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231108070813-497ebfef8258 h1:gtLCfc5S7Kv5IYlm729yQ2cwLGv8bjU1u+dp7zJQhfw=
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231108070813-497ebfef8258/go.mod h1:CdixkrB7VdQzEDlVuwsxPtsiJL/WXrQgz3PELIqlLko=
github.com/iotaledger/hive.go/crypto v0.0.0-20231108070813-497ebfef8258 h1:cGNEoS/zrmqhISWwa/Yfro2yqHI2QXeinv7O1qBq2B4=
github.com/iotaledger/hive.go/crypto v0.0.0-20231108070813-497ebfef8258/go.mod h1:OQ9EVTTQT1mkO/16BgwSIyQlAhEg+Cptud/yutevWsI=
github.com/iotaledger/hive.go/constraints v0.0.0-20231108162616-bab25251edc4 h1:v9fYr6bAPzunA1FQwYa0SthpUCc4+b5oFivpLg3quQk=
github.com/iotaledger/hive.go/constraints v0.0.0-20231108162616-bab25251edc4/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s=
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231108162616-bab25251edc4 h1:AaMdcUpeAragQXoiw/JUeqOpoZHF6AwO5SchkDz5/1E=
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231108162616-bab25251edc4/go.mod h1:CdixkrB7VdQzEDlVuwsxPtsiJL/WXrQgz3PELIqlLko=
github.com/iotaledger/hive.go/crypto v0.0.0-20231108162616-bab25251edc4 h1:FfzAlmgc+ugZlcE/JWO2TtL/uEFT/V7+h3lz2WAzSWI=
github.com/iotaledger/hive.go/crypto v0.0.0-20231108162616-bab25251edc4/go.mod h1:OQ9EVTTQT1mkO/16BgwSIyQlAhEg+Cptud/yutevWsI=
github.com/iotaledger/hive.go/ds v0.0.0-20231108070813-497ebfef8258 h1:WASEdf1LmtiUH13xDLDKgDrCjTXbhRSzMaYK7sg5xYY=
github.com/iotaledger/hive.go/ds v0.0.0-20231108070813-497ebfef8258/go.mod h1:JE8cbZSvzbB5TrwXibg6M0B7ck35YxF30ItHBzQRlgc=
github.com/iotaledger/hive.go/ierrors v0.0.0-20231108070813-497ebfef8258 h1:iwYDLiTYzUXQxMhge/F+gqEhQApLjyrH40MmTUrXp5Q=
github.com/iotaledger/hive.go/ierrors v0.0.0-20231108070813-497ebfef8258/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8=
github.com/iotaledger/hive.go/ierrors v0.0.0-20231108162616-bab25251edc4 h1:gcDpRANXwAUhMG7mV9+HZ1v+xOAa1JX9iTC1Li6VFI0=
github.com/iotaledger/hive.go/ierrors v0.0.0-20231108162616-bab25251edc4/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8=
github.com/iotaledger/hive.go/kvstore v0.0.0-20231108070813-497ebfef8258 h1:CmNAIm53EybssTv4zqihNwUbcxm9LQaCK53xPXTsJAk=
github.com/iotaledger/hive.go/kvstore v0.0.0-20231108070813-497ebfef8258/go.mod h1:ytfKoHr/nF8u0y0G4mamfG0yjFtJiJVk0kgjnPOtsSY=
github.com/iotaledger/hive.go/lo v0.0.0-20231108070813-497ebfef8258 h1:C0T7uC+FCqd21J+GUuctmMOWGjRQ+LiKXuaaPqvEEq0=
github.com/iotaledger/hive.go/lo v0.0.0-20231108070813-497ebfef8258/go.mod h1:6Ee7i6b4tuTHuRYnPP8VUb0wr9XFI5qlqtnttBd9jRg=
github.com/iotaledger/hive.go/lo v0.0.0-20231108162616-bab25251edc4 h1:coSKLUOZkhYmdB5ifiYGnYhVnt0oJfLgTWz79kM2hys=
github.com/iotaledger/hive.go/lo v0.0.0-20231108162616-bab25251edc4/go.mod h1:6Ee7i6b4tuTHuRYnPP8VUb0wr9XFI5qlqtnttBd9jRg=
github.com/iotaledger/hive.go/log v0.0.0-20231108070813-497ebfef8258 h1:FMsVixGSddscSU42/jZGn3T/FC3uK9AZ+hyD8NmaIRs=
github.com/iotaledger/hive.go/log v0.0.0-20231108070813-497ebfef8258/go.mod h1:vzO4/wRkEJDEZb/9fD10oKU9k1bj4qLir2Uhl5U1FkM=
github.com/iotaledger/hive.go/logger v0.0.0-20231108070813-497ebfef8258 h1:R95wmni0W5VTYoxFq9nK27Tu68T10J5eZSVtxNqedA4=
github.com/iotaledger/hive.go/logger v0.0.0-20231108070813-497ebfef8258/go.mod h1:w1psHM2MuKsen1WdsPKrpqElYH7ZOQ+YdQIgJZg4HTo=
github.com/iotaledger/hive.go/runtime v0.0.0-20231108070813-497ebfef8258 h1:g8p/vhtNgN1SmC4fJmL7rtfRra/LKYbqiTSLyWc+gT8=
github.com/iotaledger/hive.go/runtime v0.0.0-20231108070813-497ebfef8258/go.mod h1:DrZPvUvLarK8C2qb+3H2vdypp/MuhpQmB3iMJbDCr/Q=
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231108070813-497ebfef8258 h1:VO4uxLxVluS1dxAyvbVK65mVEnvxdLed4T3+KNHUwXE=
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231108070813-497ebfef8258/go.mod h1:FoH3T6yKlZJp8xm8K+zsQiibSynp32v21CpWx8xkek8=
github.com/iotaledger/hive.go/stringify v0.0.0-20231108070813-497ebfef8258 h1:d1aQLfpjjpDr/yUTt8BhZTYjnNj5kyyAvMKDOAQrl8o=
github.com/iotaledger/hive.go/stringify v0.0.0-20231108070813-497ebfef8258/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs=
github.com/iotaledger/hive.go/runtime v0.0.0-20231108162616-bab25251edc4 h1:m5BtU3Qjls+bW3D+3wOwJPqM2AXehbbp3Pc+nkCBvoc=
github.com/iotaledger/hive.go/runtime v0.0.0-20231108162616-bab25251edc4/go.mod h1:DrZPvUvLarK8C2qb+3H2vdypp/MuhpQmB3iMJbDCr/Q=
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231108162616-bab25251edc4 h1:KsLHCoGHUA3Gjs8Qh+4cbAJbsO2Bfgm/Hqwx3gJXFfc=
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231108162616-bab25251edc4/go.mod h1:FoH3T6yKlZJp8xm8K+zsQiibSynp32v21CpWx8xkek8=
github.com/iotaledger/hive.go/stringify v0.0.0-20231108162616-bab25251edc4 h1:xl2Og80WiBt90QjKaZxOflXHPcuikV0HVFy/wSB0l6E=
github.com/iotaledger/hive.go/stringify v0.0.0-20231108162616-bab25251edc4/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs=
github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231108104504-1445f545de82 h1:FdM1lxUKgENO3oOlF5blVqmjER44mLIHGpavyUOY5JI=
github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231108104504-1445f545de82/go.mod h1:HVxkGPraMDTRudfG9AFN7Ga9gijp6skXB9TKNBc4KgI=
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231108104322-f301c3573998 h1:KkC0SaWrjSMg897r2DDosJYALFfLadFST3Fvoaxg7hw=
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231108104322-f301c3573998/go.mod h1:c+lBG3vgt2rgXHeOncK8hMllMwihTAtVbu790NslW2w=
github.com/iotaledger/iota.go/v4 v4.0.0-20231108103955-bf75d703d8aa h1:A2nadmSbmn62f6wtrqvv/TCCF2sDiiwyDnl6brbRo1E=
github.com/iotaledger/iota.go/v4 v4.0.0-20231108103955-bf75d703d8aa/go.mod h1:8iDORW4/e4NztyAGqjW07uSMjbhs7snbxw+81IWOczY=
github.com/iotaledger/iota.go/v4 v4.0.0-20231108163058-11a75294e3ce h1:6CKxw74zE4aKHs3wjbmkLdSUAJgJ5TjMl2111Hl91Zc=
github.com/iotaledger/iota.go/v4 v4.0.0-20231108163058-11a75294e3ce/go.mod h1:Bg7BOs2wO5gw1KQwD0OedG3C2gG6Xls2VGicK9mpLLg=
github.com/ipfs/boxo v0.13.1 h1:nQ5oQzcMZR3oL41REJDcTbrvDvuZh3J9ckc9+ILeRQI=
github.com/ipfs/boxo v0.13.1/go.mod h1:btrtHy0lmO1ODMECbbEY1pxNtrLilvKSYLoGQt1yYCk=
github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s=
Expand Down
8 changes: 4 additions & 4 deletions pkg/model/signaled_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
)

type SignaledBlock struct {
ID iotago.BlockID `serix:"0"`
IssuingTime time.Time `serix:"1"`
HighestSupportedVersion iotago.Version `serix:"2"`
ProtocolParametersHash iotago.Identifier `serix:"3"`
ID iotago.BlockID `serix:""`
IssuingTime time.Time `serix:""`
HighestSupportedVersion iotago.Version `serix:""`
ProtocolParametersHash iotago.Identifier `serix:""`
}

func NewSignaledBlock(blockID iotago.BlockID, block *iotago.Block, validationBlock *iotago.ValidationBlockBody) *SignaledBlock {
Expand Down
4 changes: 2 additions & 2 deletions pkg/model/version_and_hash.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
const VersionAndHashSize = iotago.VersionLength + iotago.IdentifierLength

type VersionAndHash struct {
Version iotago.Version `serix:"0"`
Hash iotago.Identifier `serix:"1"`
Version iotago.Version `serix:""`
Hash iotago.Identifier `serix:""`
}

func (v VersionAndHash) Bytes() ([]byte, error) {
Expand Down
8 changes: 4 additions & 4 deletions pkg/network/protocols/core/warp_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
)

type WarpSyncPayload struct {
BlockIDsBySlotCommitmentID map[iotago.CommitmentID]iotago.BlockIDs `serix:"0,lengthPrefixType=uint32"`
TangleMerkleProof *merklehasher.Proof[iotago.Identifier] `serix:"1"`
TransactionIDs iotago.TransactionIDs `serix:"2"`
MutationsMerkleProof *merklehasher.Proof[iotago.Identifier] `serix:"3"`
BlockIDsBySlotCommitmentID map[iotago.CommitmentID]iotago.BlockIDs `serix:",lenPrefix=uint32"`
TangleMerkleProof *merklehasher.Proof[iotago.Identifier] `serix:""`
TransactionIDs iotago.TransactionIDs `serix:""`
MutationsMerkleProof *merklehasher.Proof[iotago.Identifier] `serix:""`
}

func (p *Protocol) SendWarpSyncRequest(id iotago.CommitmentID, to ...peer.ID) {
Expand Down
6 changes: 3 additions & 3 deletions pkg/protocol/engine/accounts/mana.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (

// Mana is the stored and potential mana value of an account collected on the UTXO layer - used by the Scheduler.
type Mana struct {
value iotago.Mana `serix:"0"`
excessBaseTokens iotago.BaseToken `serix:"1"`
updateTime iotago.SlotIndex `serix:"2"`
value iotago.Mana `serix:""`
excessBaseTokens iotago.BaseToken `serix:""`
updateTime iotago.SlotIndex `serix:""`

mutex syncutils.RWMutex
}
Expand Down
16 changes: 8 additions & 8 deletions pkg/protocol/engine/utxoledger/output_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func TestBasicOutputOnEd25519WithoutSpendConstraintsSerialization(t *testing.T)

iotaOutput := &iotago.BasicOutput{
Amount: amount,
Conditions: iotago.BasicOutputUnlockConditions{
UnlockConditions: iotago.BasicOutputUnlockConditions{
&iotago.AddressUnlockCondition{
Address: address,
},
Expand Down Expand Up @@ -177,7 +177,7 @@ func TestBasicOutputOnEd25519WithSpendConstraintsSerialization(t *testing.T) {

iotaOutput := &iotago.BasicOutput{
Amount: amount,
Conditions: iotago.BasicOutputUnlockConditions{
UnlockConditions: iotago.BasicOutputUnlockConditions{
&iotago.AddressUnlockCondition{
Address: address,
},
Expand Down Expand Up @@ -216,7 +216,7 @@ func TestNFTOutputSerialization(t *testing.T) {
iotaOutput := &iotago.NFTOutput{
Amount: amount,
NFTID: nftID,
Conditions: iotago.NFTOutputUnlockConditions{
UnlockConditions: iotago.NFTOutputUnlockConditions{
&iotago.AddressUnlockCondition{
Address: address,
},
Expand Down Expand Up @@ -254,7 +254,7 @@ func TestNFTOutputWithSpendConstraintsSerialization(t *testing.T) {
iotaOutput := &iotago.NFTOutput{
Amount: amount,
NFTID: nftID,
Conditions: iotago.NFTOutputUnlockConditions{
UnlockConditions: iotago.NFTOutputUnlockConditions{
&iotago.AddressUnlockCondition{
Address: address.ToAddress(),
},
Expand Down Expand Up @@ -299,7 +299,7 @@ func TestAccountOutputSerialization(t *testing.T) {
iotaOutput := &iotago.AccountOutput{
Amount: amount,
AccountID: aliasID,
Conditions: iotago.AccountOutputUnlockConditions{
UnlockConditions: iotago.AccountOutputUnlockConditions{
&iotago.AddressUnlockCondition{
Address: address,
},
Expand Down Expand Up @@ -342,7 +342,7 @@ func TestAnchorOutputSerialization(t *testing.T) {
iotaOutput := &iotago.AnchorOutput{
Amount: amount,
AnchorID: aliasID,
Conditions: iotago.AnchorOutputUnlockConditions{
UnlockConditions: iotago.AnchorOutputUnlockConditions{
&iotago.StateControllerAddressUnlockCondition{
Address: stateController.ToAddress(),
},
Expand Down Expand Up @@ -391,7 +391,7 @@ func TestFoundryOutputSerialization(t *testing.T) {
MeltedTokens: new(big.Int).SetBytes([]byte{0}),
MaximumSupply: supply,
},
Conditions: iotago.FoundryOutputUnlockConditions{
UnlockConditions: iotago.FoundryOutputUnlockConditions{
&iotago.ImmutableAccountUnlockCondition{
Address: aliasID.ToAddress().(*iotago.AccountAddress),
},
Expand Down Expand Up @@ -425,7 +425,7 @@ func TestDelegationOutputSerialization(t *testing.T) {
DelegationID: iotago_tpkg.RandDelegationID(),
ValidatorAddress: utils.RandAddress(iotago.AddressAccount).(*iotago.AccountAddress),
StartEpoch: iotago_tpkg.RandEpoch(),
Conditions: iotago.DelegationOutputUnlockConditions{
UnlockConditions: iotago.DelegationOutputUnlockConditions{
&iotago.AddressUnlockCondition{
Address: address,
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/protocol/engine/utxoledger/slot_diff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestSimpleSlotDiffSerialization(t *testing.T) {
amount := iotago.BaseToken(832493)
iotaOutput := &iotago.BasicOutput{
Amount: amount,
Conditions: iotago.BasicOutputUnlockConditions{
UnlockConditions: iotago.BasicOutputUnlockConditions{
&iotago.AddressUnlockCondition{
Address: address,
},
Expand Down
12 changes: 6 additions & 6 deletions pkg/testsuite/mock/wallet_transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func (w *Wallet) CreateAccountFromInput(transactionName string, inputName string
remainderOutput := &iotago.BasicOutput{
Amount: input.BaseTokenAmount() - accountOutput.Amount,
Mana: input.StoredMana() - accountOutput.Mana,
Conditions: iotago.BasicOutputUnlockConditions{
UnlockConditions: iotago.BasicOutputUnlockConditions{
&iotago.AddressUnlockCondition{Address: recipientWallet.Address()},
},
Features: iotago.BasicOutputFeatures{},
Expand Down Expand Up @@ -78,7 +78,7 @@ func (w *Wallet) CreateDelegationFromInput(transactionName string, inputName str
outputStates = append(outputStates, &iotago.BasicOutput{
Amount: input.BaseTokenAmount() - delegationOutput.Amount,
Mana: input.StoredMana(),
Conditions: iotago.BasicOutputUnlockConditions{
UnlockConditions: iotago.BasicOutputUnlockConditions{
&iotago.AddressUnlockCondition{Address: w.Address()},
},
Features: iotago.BasicOutputFeatures{},
Expand Down Expand Up @@ -176,7 +176,7 @@ func (w *Wallet) DestroyAccount(transactionName string, inputName string, creati
destructionOutputs := iotago.Outputs[iotago.Output]{&iotago.BasicOutput{
Amount: input.BaseTokenAmount(),
Mana: input.StoredMana(),
Conditions: iotago.BasicOutputUnlockConditions{
UnlockConditions: iotago.BasicOutputUnlockConditions{
&iotago.AddressUnlockCondition{Address: w.Address()},
},
Features: iotago.BasicOutputFeatures{},
Expand Down Expand Up @@ -207,7 +207,7 @@ func (w *Wallet) CreateImplicitAccountFromInput(transactionName string, inputNam
implicitAccountOutput := &iotago.BasicOutput{
Amount: MinIssuerAccountAmount,
Mana: AccountConversionManaCost,
Conditions: iotago.BasicOutputUnlockConditions{
UnlockConditions: iotago.BasicOutputUnlockConditions{
&iotago.AddressUnlockCondition{Address: recipientWallet.ImplicitAccountCreationAddress()},
},
Features: iotago.BasicOutputFeatures{},
Expand All @@ -216,7 +216,7 @@ func (w *Wallet) CreateImplicitAccountFromInput(transactionName string, inputNam
remainderBasicOutput := &iotago.BasicOutput{
Amount: input.BaseTokenAmount() - MinIssuerAccountAmount,
Mana: input.StoredMana() - AccountConversionManaCost,
Conditions: iotago.BasicOutputUnlockConditions{
UnlockConditions: iotago.BasicOutputUnlockConditions{
&iotago.AddressUnlockCondition{Address: input.Output().UnlockConditionSet().Address().Address},
},
Features: iotago.BasicOutputFeatures{},
Expand Down Expand Up @@ -305,7 +305,7 @@ func (w *Wallet) CreateBasicOutputsEquallyFromInputs(transactionName string, out
outputStates = append(outputStates, &iotago.BasicOutput{
Amount: tokenAmount,
Mana: manaAmount,
Conditions: iotago.BasicOutputUnlockConditions{
UnlockConditions: iotago.BasicOutputUnlockConditions{
&iotago.AddressUnlockCondition{Address: w.Address()},
},
Features: iotago.BasicOutputFeatures{},
Expand Down
4 changes: 2 additions & 2 deletions pkg/testsuite/snapshotcreator/snapshotcreator.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ func createOutput(address iotago.Address, tokenAmount iotago.BaseToken, mana iot
return &iotago.BasicOutput{
Amount: tokenAmount,
Mana: mana,
Conditions: iotago.BasicOutputUnlockConditions{
UnlockConditions: iotago.BasicOutputUnlockConditions{
&iotago.AddressUnlockCondition{Address: address},
},
}
Expand All @@ -253,7 +253,7 @@ func createAccount(accountID iotago.AccountID, address iotago.Address, tokenAmou
Amount: tokenAmount,
Mana: mana,
AccountID: accountID,
Conditions: iotago.AccountOutputUnlockConditions{
UnlockConditions: iotago.AccountOutputUnlockConditions{
&iotago.AddressUnlockCondition{Address: address},
},
Features: iotago.AccountOutputFeatures{
Expand Down
Loading

0 comments on commit 2be0c46

Please sign in to comment.