Skip to content

Commit

Permalink
gas_to_grams method
Browse files Browse the repository at this point in the history
  • Loading branch information
tolya-yanot committed Dec 16, 2021
1 parent f28b34f commit 715ade4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions func/wallet-v4-code.fc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
(slice, int) dict_get?(cell dict, int key_len, slice index) asm(index dict key_len) "DICTGET" "NULLSWAPIFNOT";
(cell, int) dict_add_builder?(cell dict, int key_len, slice index, builder value) asm(value index dict key_len) "DICTADDB";
(cell, int) dict_delete?(cell dict, int key_len, slice index) asm(index dict key_len) "DICTDEL";
int gas_to_grams(int x) asm "GASTOGRAM";

() recv_internal(cell in_msg_cell, slice in_msg) impure {
var cs = in_msg_cell.begin_parse();
Expand Down Expand Up @@ -112,7 +113,7 @@

slice wc_n_address = cs~load_bits(8 + 256);
int query_id = cs~load_uint(64);
int amount = gastograms(10000);
int amount = gas_to_grams(10000);

(plugins, int success?) = plugins.dict_add_builder?(8 + 256, wc_n_address, begin_cell());
throw_unless(39, success?);
Expand All @@ -130,7 +131,7 @@

slice wc_n_address = cs~load_bits(8 + 256);
int query_id = cs~load_uint(64);
int amount = gastograms(10000);
int amount = gas_to_grams(10000);

(plugins, int success?) = plugins.dict_delete?(8 + 256, wc_n_address);
throw_unless(39, success?);
Expand Down

0 comments on commit 715ade4

Please sign in to comment.