Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrvivian committed Mar 20, 2024
1 parent 47e48b1 commit 1d37c83
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions builder/transaction_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,17 @@ func TestTransactionBuilder(t *testing.T) {
// ok - Implicit account creation address with basic input
func() *test {
inputUTXO1 := &iotago.UTXOInput{TransactionID: tpkg.Rand36ByteArray(), TransactionOutputIndex: 0}
basicInputID := &iotago.UTXOInput{TransactionID: tpkg.Rand36ByteArray(), TransactionOutputIndex: 1}
basicOutput := &iotago.BasicOutput{
input1 := tpkg.RandOutputOnAddress(iotago.OutputBasic, inputAddrImplicitAccountCreation)

inputUTXO2 := &iotago.UTXOInput{TransactionID: tpkg.Rand36ByteArray(), TransactionOutputIndex: 1}
input2 := &iotago.BasicOutput{
Amount: 1000,
UnlockConditions: iotago.BasicOutputUnlockConditions{&iotago.AddressUnlockCondition{Address: inputAddrEd25519}},
}

input := tpkg.RandOutputOnAddress(iotago.OutputBasic, inputAddrImplicitAccountCreation)
bdl := builder.NewTransactionBuilder(tpkg.ZeroCostTestAPI, signer).
AddInput(&builder.TxInput{UnlockTarget: inputAddrImplicitAccountCreation, InputID: inputUTXO1.OutputID(), Input: input}).
AddInput(&builder.TxInput{UnlockTarget: inputAddrEd25519, InputID: basicInputID.OutputID(), Input: basicOutput}).
AddInput(&builder.TxInput{UnlockTarget: inputAddrImplicitAccountCreation, InputID: inputUTXO1.OutputID(), Input: input1}).
AddInput(&builder.TxInput{UnlockTarget: inputAddrEd25519, InputID: inputUTXO2.OutputID(), Input: input2}).
AddOutput(output)

return &test{
Expand Down Expand Up @@ -213,7 +214,11 @@ func TestTransactionBuilder(t *testing.T) {
}}

bdl := builder.NewTransactionBuilder(tpkg.ZeroCostTestAPI, signer).
AddInput(&builder.TxInput{UnlockTarget: inputAddrImplicitAccountCreation, InputID: inputUTXO1.OutputID(), Input: tpkg.RandOutputOnAddress(iotago.OutputBasic, inputAddrImplicitAccountCreation)}).
AddInput(&builder.TxInput{
UnlockTarget: inputAddrImplicitAccountCreation,
InputID: inputUTXO1.OutputID(),
Input: tpkg.RandOutputOnAddress(iotago.OutputBasic, inputAddrImplicitAccountCreation),
}).
SetCreationSlot(10).
AddOutput(basicOutput).
StoreRemainingManaInOutputAndAllotRemainingAccountBoundMana(inputUTXO1.CreationSlot(), 0)
Expand Down

0 comments on commit 1d37c83

Please sign in to comment.