@@ -51,16 +51,14 @@ type Builder interface {
51
51
options ... common.Option ,
52
52
) (map [ids.ID ]uint64 , error )
53
53
54
- // NewBaseTx creates a new simple value transfer. Because the P-chain
55
- // doesn't intend for balance transfers to occur, this method is expensive
56
- // and abuses the creation of subnets.
54
+ // NewBaseTx creates a new simple value transfer.
57
55
//
58
56
// - [outputs] specifies all the recipients and amounts that should be sent
59
57
// from this transaction.
60
58
NewBaseTx (
61
59
outputs []* avax.TransferableOutput ,
62
60
options ... common.Option ,
63
- ) (* txs.CreateSubnetTx , error )
61
+ ) (* txs.BaseTx , error )
64
62
65
63
// NewAddValidatorTx creates a new validator of the primary network.
66
64
//
@@ -300,9 +298,9 @@ func (b *builder) GetImportableBalance(
300
298
func (b * builder ) NewBaseTx (
301
299
outputs []* avax.TransferableOutput ,
302
300
options ... common.Option ,
303
- ) (* txs.CreateSubnetTx , error ) {
301
+ ) (* txs.BaseTx , error ) {
304
302
toBurn := map [ids.ID ]uint64 {
305
- b .backend .AVAXAssetID (): b .backend .CreateSubnetTxFee (),
303
+ b .backend .AVAXAssetID (): b .backend .BaseTxFee (),
306
304
}
307
305
for _ , out := range outputs {
308
306
assetID := out .AssetID ()
@@ -322,16 +320,13 @@ func (b *builder) NewBaseTx(
322
320
outputs = append (outputs , changeOutputs ... )
323
321
avax .SortTransferableOutputs (outputs , txs .Codec ) // sort the outputs
324
322
325
- tx := & txs.CreateSubnetTx {
326
- BaseTx : txs.BaseTx {BaseTx : avax.BaseTx {
327
- NetworkID : b .backend .NetworkID (),
328
- BlockchainID : constants .PlatformChainID ,
329
- Ins : inputs ,
330
- Outs : outputs ,
331
- Memo : ops .Memo (),
332
- }},
333
- Owner : & secp256k1fx.OutputOwners {},
334
- }
323
+ tx := & txs.BaseTx {BaseTx : avax.BaseTx {
324
+ NetworkID : b .backend .NetworkID (),
325
+ BlockchainID : constants .PlatformChainID ,
326
+ Ins : inputs ,
327
+ Outs : outputs ,
328
+ Memo : ops .Memo (),
329
+ }}
335
330
return tx , b .initCtx (tx )
336
331
}
337
332
0 commit comments