Execute AA getter
Execute AA getter function

Example

1
const iusd_amount = 100;
2
const params = {
3
address: 'VLKI3XMMX5YULOBA6ZXBXDPI6TXF6V3D',
4
getter: 'get_exchange_result',
5
args: [0, iusd_amount]
6
};
7
8
client.api.executeGetter(params, function(err, result) {
9
if (err) return console.error(err);
10
console.log(result);
11
});
Copied!

Returns

1
{
2
reserve_needed: 362169,
3
reserve_delta: 362346,
4
fee: 0,
5
regular_fee: false,
6
reward: 177,
7
initial_p2: 0.036234510530851,
8
p2: 0.0362345130263091,
9
target_p2: 0.0367399935327185,
10
new_distance: 0.0139502497533879,
11
turnover: 362346,
12
fee_percent: 0,
13
slow_capacity_share: 0.5
14
}
Copied!

Learn more

Last modified 2mo ago
Copy link