Skip to content

Commit 714b866

Browse files
committed
Remove unused MultiagentScript constant and clean up transaction building comments in example
1 parent 84f212b commit 714b866

File tree

1 file changed

+1
-15
lines changed
  • examples/simulate_multi_transaction

1 file changed

+1
-15
lines changed

examples/simulate_multi_transaction/main.go

+1-15
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import (
88
"github.com/aptos-labs/aptos-go-sdk/crypto"
99
)
1010

11-
const MultiagentScript = "0xa11ceb0b0700000a0601000403040d04110405151b07302f085f2000000001010203040001000306020100010105010704060c060c03030205050001060c010501090003060c05030109010d6170746f735f6163636f756e74067369676e65720a616464726573735f6f660e7472616e736665725f636f696e73000000000000000000000000000000000000000000000000000000000000000102000000010f0a0011000c040a0111000c050b000b050b0238000b010b040b03380102"
12-
1311
const FundAmount = 100_000_000
1412
const TransferAmount uint64 = 1
1513

@@ -58,29 +56,17 @@ func example(networkConfig aptos.NetworkConfig) {
5856
fmt.Printf("Alice: %d\n", aliceBalance)
5957
fmt.Printf("Bob:%d\n", bobBalance)
6058

61-
// 1. Build transaction
62-
// script, err := util.ParseHex(MultiagentScript)
63-
// if err != nil {
64-
// panic("Failed to deserialize script:" + err.Error())
65-
// }
66-
6759
serializer := &bcs.Serializer{}
6860

6961
bob.Address.MarshalBCS(serializer)
7062
accountBytes := serializer.ToBytes()
7163

72-
if err != nil {
73-
panic("Failed to serialize alice's address:" + err.Error())
74-
}
75-
7664
serializer = &bcs.Serializer{}
7765

7866
serializer.U64(TransferAmount)
7967
amountBytes := serializer.ToBytes()
8068

81-
if err != nil {
82-
panic("Failed to serialize transfer amount:" + err.Error())
83-
}
69+
// 1. Build transaction
8470

8571
rawTxn, err := client.BuildTransactionMultiAgent(alice.AccountAddress(), aptos.TransactionPayload{
8672
Payload: &aptos.EntryFunction{

0 commit comments

Comments
 (0)