File tree 3 files changed +9
-9
lines changed
3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 11
11
const networkOptionsFile = await fetch (' ./networks.json' );
12
12
const networkOptions: NetworkOption [] = await networkOptionsFile .json ();
13
13
networks .set (networkOptions );
14
- selectedNetwork .set (networkOptions [0 ]);
14
+ selectedNetwork .set (networkOptions [1 ]);
15
15
});
16
16
</script >
17
17
Original file line number Diff line number Diff line change 52
52
evmAddress ,
53
53
$selectedNetwork .chainAddress ,
54
54
balance ,
55
- BigInt (500000 ),
55
+ BigInt (5000000 ),
56
56
);
57
57
toast .pop (toastId );
58
58
Original file line number Diff line number Diff line change @@ -52,15 +52,15 @@ export class SendFundsTransaction {
52
52
Converter . hexToBytes ( evmAddress . toLowerCase ( ) ) ,
53
53
) ; // EVM address
54
54
55
- /* Write contract arguments */
56
- metadata . writeUInt32LE ( 2 ) ;
55
+ /* Write length of contract arguments (1) */
56
+ metadata . writeUInt32LE ( 1 ) ;
57
57
58
58
// Write evm address (arg1)
59
- metadata . writeUInt16LE ( 1 ) ;
60
- metadata . writeInt8 ( 'a' . charCodeAt ( 0 ) ) ;
61
- metadata . writeUInt32LE ( evmAddressBuffer . buffer . length ) ;
62
- metadata . writeBytes ( evmAddressBuffer . buffer ) ;
63
-
59
+ metadata . writeUInt16LE ( 1 ) ; // Length of key (len(a) == 1)
60
+ metadata . writeInt8 ( 'a' . charCodeAt ( 0 ) ) ; // Write key (a == 'agentID')
61
+ metadata . writeUInt32LE ( evmAddressBuffer . buffer . length ) ; // Length of value (len(agentID) == 21 for evm address)
62
+ metadata . writeBytes ( evmAddressBuffer . buffer ) ; // Write value (bytes(agentID))
63
+ console . log ( evmAddressBuffer . buffer . length )
64
64
/* Write allowance */
65
65
metadata . writeUInt8 ( 0 ) ; // Has allowance (255 if no allowance is set)
66
66
metadata . writeUInt64LE ( amount - gas ) ; // IOTA amount to send
You can’t perform that action at this time.
0 commit comments