File tree 1 file changed +1
-15
lines changed
examples/simulate_multi_transaction
1 file changed +1
-15
lines changed Original file line number Diff line number Diff line change 8
8
"github.com/aptos-labs/aptos-go-sdk/crypto"
9
9
)
10
10
11
- const MultiagentScript = "0xa11ceb0b0700000a0601000403040d04110405151b07302f085f2000000001010203040001000306020100010105010704060c060c03030205050001060c010501090003060c05030109010d6170746f735f6163636f756e74067369676e65720a616464726573735f6f660e7472616e736665725f636f696e73000000000000000000000000000000000000000000000000000000000000000102000000010f0a0011000c040a0111000c050b000b050b0238000b010b040b03380102"
12
-
13
11
const FundAmount = 100_000_000
14
12
const TransferAmount uint64 = 1
15
13
@@ -58,29 +56,17 @@ func example(networkConfig aptos.NetworkConfig) {
58
56
fmt .Printf ("Alice: %d\n " , aliceBalance )
59
57
fmt .Printf ("Bob:%d\n " , bobBalance )
60
58
61
- // 1. Build transaction
62
- // script, err := util.ParseHex(MultiagentScript)
63
- // if err != nil {
64
- // panic("Failed to deserialize script:" + err.Error())
65
- // }
66
-
67
59
serializer := & bcs.Serializer {}
68
60
69
61
bob .Address .MarshalBCS (serializer )
70
62
accountBytes := serializer .ToBytes ()
71
63
72
- if err != nil {
73
- panic ("Failed to serialize alice's address:" + err .Error ())
74
- }
75
-
76
64
serializer = & bcs.Serializer {}
77
65
78
66
serializer .U64 (TransferAmount )
79
67
amountBytes := serializer .ToBytes ()
80
68
81
- if err != nil {
82
- panic ("Failed to serialize transfer amount:" + err .Error ())
83
- }
69
+ // 1. Build transaction
84
70
85
71
rawTxn , err := client .BuildTransactionMultiAgent (alice .AccountAddress (), aptos.TransactionPayload {
86
72
Payload : & aptos.EntryFunction {
You can’t perform that action at this time.
0 commit comments