Browse Source

Deployment

master
Lev 2 years ago
parent
commit
8710100376
  1. 8
      sources/jetton.deploy.ts
  2. 12
      sources/jetton.tact
  3. 1
      sources/output/jetton_SampleJetton.abi
  4. BIN
      sources/output/jetton_SampleJetton.code.boc
  5. 438
      sources/output/jetton_SampleJetton.code.fc
  6. 683
      sources/output/jetton_SampleJetton.code.fif
  7. 860
      sources/output/jetton_SampleJetton.code.rev.fif
  8. BIN
      sources/output/jetton_SampleJetton.init.boc
  9. 39
      sources/output/jetton_SampleJetton.init.fc
  10. 54
      sources/output/jetton_SampleJetton.init.fif
  11. 42
      sources/output/jetton_SampleJetton.init.rev.fif
  12. 72
      sources/output/jetton_SampleJetton.md
  13. 1
      sources/output/jetton_SampleJetton.pkg
  14. 881
      sources/output/jetton_SampleJetton.ts

8
sources/jetton.deploy.ts

@ -1,7 +1,7 @@
import { beginCell, contractAddress, toNano, TonClient, TonClient4, Address, WalletContractV4, internal, fromNano, Cell} from "ton"; import { beginCell, contractAddress, toNano, TonClient, TonClient4, Address, WalletContractV4, internal, fromNano, Cell} from "ton";
import {mnemonicToPrivateKey} from "ton-crypto"; import {mnemonicToPrivateKey} from "ton-crypto";
import {buildOnchainMetadata} from "./utils/jetton-helpers"; import {buildOnchainMetadata} from "./utils/jetton-helpers";
import {SampleJetton} from "./output/jetton_SampleJetton"; import {TONB} from "./output/jetton_TONB";
(async () => { //need changes for jetton (async () => { //need changes for jetton
@ -18,7 +18,7 @@ import {SampleJetton} from "./output/jetton_SampleJetton";
}) })
// Insert your test wallet's 24 words, make sure you have some test Toncoins on its balance. Every deployment spent 0.5 test toncoin. // Insert your test wallet's 24 words, make sure you have some test Toncoins on its balance. Every deployment spent 0.5 test toncoin.
let mnemonics = "multiply voice predict admit ..."; let mnemonics = "basic security merge opera inject core melody polar become force cool glance history order warfare consider company slim twice balcony scare shoot winner rude";
// read more about wallet apps https://ton.org/docs/participate/wallets/apps#tonhub-test-environment // read more about wallet apps https://ton.org/docs/participate/wallets/apps#tonhub-test-environment
let keyPair = await mnemonicToPrivateKey(mnemonics.split(" ")); let keyPair = await mnemonicToPrivateKey(mnemonics.split(" "));
@ -44,14 +44,14 @@ import {SampleJetton} from "./output/jetton_SampleJetton";
}; };
// Owner should usually be the deploying wallet's address. // Owner should usually be the deploying wallet's address.
let owner = Address.parse('kQDND6yHEzKB82ZGRn58aY9Tt_69Ie_u.............'); let owner = Address.parse('EQAuAiFGgkxoQvBWXjXQcLYb8BW4fO6UJkt6_uCONJ2y5VUk');
// Create content Cell // Create content Cell
let content = buildOnchainMetadata(jettonParams); let content = buildOnchainMetadata(jettonParams);
// Compute init data for deployment // Compute init data for deployment
let init = await SampleJetton.init(owner, content); let init = await TONB.init(owner, content);
let destination_address = contractAddress(workchain, init); let destination_address = contractAddress(workchain, init);

12
sources/jetton.tact

@ -9,6 +9,12 @@ message Mint {
} }
const gas_consumption: Int = ton("0.01");
const withdraw_gas_consumption: Int = ton("0.05");
const deposit_gas_consumption: Int = ton("0.05");
contract TONB with Jetton { contract TONB with Jetton {
totalSupply: Int as coins; totalSupply: Int as coins;
@ -28,11 +34,7 @@ contract TONB with Jetton {
receive(msg: Mint) { receive(msg: Mint) {
let ctx: Context = context(); let ctx: Context = context();
require(ctx.value >= deposit_gas_consumption, "not enough money for deposit");
self.mint(ctx.sender, msg.amount, ctx.sender); self.mint(ctx.sender, msg.amount, ctx.sender);
} }
receive("Mint!") {
let ctx: Context = context();
self.mint(ctx.sender, 1000000000, ctx.sender);
}
} }

1
sources/output/jetton_SampleJetton.abi

File diff suppressed because one or more lines are too long

BIN
sources/output/jetton_SampleJetton.code.boc

Binary file not shown.

438
sources/output/jetton_SampleJetton.code.fc

@ -1,438 +0,0 @@
forall X -> X __tact_not_null(X x) { throw_if(128, null?(x)); return x; }
global (int, slice, int, slice) __tact_context;
global cell __tact_context_sys;
(int, slice, int, slice) __tact_context_get() inline { return __tact_context; }
() __tact_verify_address(slice address) inline {
throw_unless(136, address.slice_bits() != 267);
}
builder __tact_store_bool(builder b, int v) inline {
b = b.store_int(v, 1);
return b;
}
(slice, slice) __tact_load_address(slice cs) inline {
slice raw = cs~load_msg_addr();
__tact_verify_address(raw);
return (cs, raw);
}
(slice, slice) __tact_load_address_opt(slice cs) inline {
slice raw = cs~load_msg_addr();
if (raw.preload_uint(2) != 0) {
__tact_verify_address(raw);
return (cs, raw);
} else {
return (cs, null());
}
}
builder __tact_store_address(builder b, slice address) inline {
__tact_verify_address(address);
b = b.store_slice(address);
return b;
}
builder __tact_store_address_opt(builder b, slice address) inline {
if (null?(address)) {
b = b.store_uint(0, 2);
return b;
} else {
return __tact_store_address(b, address);
}
}
slice __tact_create_address(int chain, int hash) inline {
var b = begin_cell();
b = b.store_uint(2, 2);
b = b.store_uint(0, 1);
b = b.store_int(chain, 8);
b = b.store_uint(hash, 256);
return b.end_cell().begin_parse();
}
slice __tact_compute_contract_address(int chain, cell code, cell data) inline {
var b = begin_cell();
b = b.store_uint(0, 2);
b = b.store_uint(3, 2);
b = b.store_uint(0, 1);
b = b.store_ref(code);
b = b.store_ref(data);
var hash = cell_hash(b.end_cell());
return __tact_create_address(chain, hash);
}
int __tact_address_eq(slice a, slice b) inline {
return equal_slice_bits(a, b);
}
cell __tact_dict_set_code(cell dict, int id, cell code) inline {
return udict_set_ref(dict, 16, id, code);
}
cell __tact_dict_get_code(cell dict, int id) inline {
var (data, ok) = udict_get_ref?(dict, 16, id);
throw_unless(135, ok);
return data;
}
builder __gen_write_TokenTransferInternal(builder build_0, (int, int, slice, slice, int, slice) v) inline_ref {
var (v'queryId, v'amount, v'from, v'responseAddress, v'forwardTonAmount, v'forwardPayload) = v;
build_0 = store_uint(build_0, 395134233, 32);
build_0 = build_0.store_uint(v'queryId, 64);
build_0 = build_0.store_coins(v'amount);
build_0 = __tact_store_address(build_0, v'from);
build_0 = __tact_store_address_opt(build_0, v'responseAddress);
build_0 = build_0.store_coins(v'forwardTonAmount);
build_0 = build_0.store_slice(v'forwardPayload);
return build_0;
}
cell __gen_writecell_TokenTransferInternal((int, int, slice, slice, int, slice) v) inline_ref {
return __gen_write_TokenTransferInternal(begin_cell(), v).end_cell();
}
(slice, ((int, int, slice, slice))) __gen_read_TokenBurnNotification(slice sc_0) inline_ref {
throw_unless(129, sc_0~load_uint(32) == 2078119902);
var v'queryId = sc_0~load_uint(64);
var v'amount = sc_0~load_coins();
var v'owner = sc_0~__tact_load_address();
var v'responseAddress = sc_0~__tact_load_address_opt();
return (sc_0, (v'queryId, v'amount, v'owner, v'responseAddress));
}
builder __gen_write_TokenExcesses(builder build_0, (int) v) inline_ref {
var (v'queryId) = v;
build_0 = store_uint(build_0, 3576854235, 32);
build_0 = build_0.store_uint(v'queryId, 64);
return build_0;
}
cell __gen_writecell_TokenExcesses((int) v) inline_ref {
return __gen_write_TokenExcesses(begin_cell(), v).end_cell();
}
(slice, ((cell))) __gen_read_TokenUpdateContent(slice sc_0) inline_ref {
throw_unless(129, sc_0~load_uint(32) == 201882270);
var v'content = sc_0~load_int(1) ? sc_0~load_ref() : null();
return (sc_0, (v'content));
}
(slice, ((int))) __gen_read_Mint(slice sc_0) inline_ref {
throw_unless(129, sc_0~load_uint(32) == 33240155);
var v'amount = sc_0~load_int(257);
return (sc_0, (v'amount));
}
builder __gen_write_JettonDefaultWallet(builder build_0, (int, slice, slice) v) inline_ref {
var (v'balance, v'owner, v'master) = v;
build_0 = build_0.store_int(v'balance, 257);
build_0 = __tact_store_address(build_0, v'owner);
build_0 = __tact_store_address(build_0, v'master);
return build_0;
}
builder __gen_write_SampleJetton(builder build_0, (int, slice, cell, int) v) inline_ref {
var (v'totalSupply, v'owner, v'content, v'mintable) = v;
build_0 = build_0.store_coins(v'totalSupply);
build_0 = __tact_store_address(build_0, v'owner);
build_0 = ~ null?(v'content) ? build_0.store_int(true, 1).store_ref(v'content) : build_0.store_int(false, 1);
build_0 = build_0.store_int(v'mintable, 1);
return build_0;
}
(slice, ((int, slice, cell, int))) __gen_read_SampleJetton(slice sc_0) inline_ref {
var v'totalSupply = sc_0~load_coins();
var v'owner = sc_0~__tact_load_address();
var v'content = sc_0~load_int(1) ? sc_0~load_ref() : null();
var v'mintable = sc_0~load_int(1);
return (sc_0, (v'totalSupply, v'owner, v'content, v'mintable));
}
_ __gen_StateInit_get_code((cell, cell) v) inline {
var (v'code, v'data) = v;
return v'code;
}
_ __gen_Context_get_sender((int, slice, int, slice) v) inline {
var (v'bounced, v'sender, v'value, v'raw) = v;
return v'sender;
}
(int, int, slice, cell, cell) __gen_JettonData_to_external(((int, int, slice, cell, cell)) v) {
var (v'totalSupply, v'mintable, v'owner, v'content, v'walletCode) = v;
return (v'totalSupply, v'mintable, v'owner, v'content, v'walletCode);
}
(int, slice, cell, int) __gen_load_SampleJetton() inline_ref {
slice sc = get_data().begin_parse();
__tact_context_sys = sc~load_ref();
return sc~__gen_read_SampleJetton();
}
() __gen_store_SampleJetton((int, slice, cell, int) v) impure inline_ref {
builder b = begin_cell();
b = b.store_ref(__tact_context_sys);
b = __gen_write_SampleJetton(b, v);
set_data(b.end_cell());
}
cell $emptyCell() impure {
return end_cell(begin_cell());
}
slice $__gen_Cell_asSlice(cell $self) impure {
var ($self) = $self;
return begin_parse($self);
}
slice $emptySlice() impure {
return $__gen_Cell_asSlice($emptyCell());
}
slice $contractAddress((cell, cell) $s) impure {
var (($s'code, $s'data)) = $s;
return __tact_compute_contract_address(0, $s'code, $s'data);
}
() $send((int, slice, int, int, cell, cell, cell) $params) impure {
var (($params'bounce, $params'to, $params'value, $params'mode, $params'body, $params'code, $params'data)) = $params;
builder $b = begin_cell();
$b = store_int($b, 1, 2);
$b = __tact_store_bool($b, $params'bounce);
$b = store_int($b, 0, 3);
$b = __tact_store_address($b, $params'to);
$b = store_coins($b, $params'value);
$b = store_int($b, 0, ((((1 + 4) + 4) + 64) + 32));
if (((~ null?($params'code)) | (~ null?($params'data)))) {
$b = __tact_store_bool($b, true);
builder $bc = begin_cell();
$bc = __tact_store_bool($bc, false);
$bc = __tact_store_bool($bc, false);
if ((~ null?($params'code))) {
$bc = __tact_store_bool($bc, true);
$bc = store_ref($bc, __tact_not_null($params'code));
} else {
$bc = __tact_store_bool($bc, false);
}
if ((~ null?($params'data))) {
$bc = __tact_store_bool($bc, true);
$bc = store_ref($bc, __tact_not_null($params'data));
} else {
$bc = __tact_store_bool($bc, false);
}
$bc = __tact_store_bool($bc, false);
$b = __tact_store_bool($b, true);
$b = store_ref($b, end_cell($bc));
} else {
$b = __tact_store_bool($b, false);
}
cell $body = $params'body;
if ((~ null?($body))) {
$b = __tact_store_bool($b, true);
$b = store_ref($b, __tact_not_null($body));
} else {
$b = __tact_store_bool($b, false);
}
cell $c = end_cell($b);
send_raw_message($c, $params'mode);
}
cell $__gen_JettonDefaultWallet_init(cell sys', slice $master, slice $owner) {
var (($self'balance, $self'owner, $self'master)) = (null(), null(), null());
$self'balance = 0;
$self'owner = $owner;
$self'master = $master;
var b' = begin_cell();
b' = b'.store_ref(sys');
b' = __gen_write_JettonDefaultWallet(b', ($self'balance, $self'owner, $self'master));
return b'.end_cell();
}
(cell, cell) $__gen_JettonDefaultWallet_init_child(cell sys', slice $master, slice $owner) {
slice sc' = sys'.begin_parse();
cell source = sc'~load_dict();
cell contracts = new_dict();
;; Contract Code: JettonDefaultWallet
cell mine = __tact_dict_get_code(source, 55471);
contracts = __tact_dict_set_code(contracts, 55471, mine);
cell sys = begin_cell().store_dict(contracts).end_cell();
return (mine, $__gen_JettonDefaultWallet_init(sys, $master, $owner));
}
((int, slice, cell, int), (cell, cell)) $__gen_SampleJetton_getJettonWalletInit((int, slice, cell, int) $self, slice $address) impure {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable)) = $self;
return (($self'totalSupply, $self'owner, $self'content, $self'mintable), $__gen_JettonDefaultWallet_init_child(__tact_context_sys, my_address(), $address));
}
slice $__gen_SampleJetton_get_wallet_address((int, slice, cell, int) $self, slice $owner) impure {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable)) = $self;
var ($winit'code, $winit'data) = ($self'totalSupply, $self'owner, $self'content, $self'mintable)~$__gen_SampleJetton_getJettonWalletInit($owner);
return $contractAddress(($winit'code, $winit'data));
}
_ $__gen_get_get_wallet_address(slice $$owner) method_id(103289) {
slice $owner = $$owner;
var self = __gen_load_SampleJetton();
var res = $__gen_SampleJetton_get_wallet_address(self, $owner);
return res;
}
(int, int, slice, cell, cell) $__gen_SampleJetton_get_jetton_data((int, slice, cell, int) $self) impure {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable)) = $self;
cell $code = __gen_StateInit_get_code(($self'totalSupply, $self'owner, $self'content, $self'mintable)~$__gen_SampleJetton_getJettonWalletInit(my_address()));
return ($self'totalSupply, $self'mintable, $self'owner, $self'content, $code);
}
_ $__gen_get_get_jetton_data() method_id(106029) {
var self = __gen_load_SampleJetton();
var res = $__gen_SampleJetton_get_jetton_data(self);
return __gen_JettonData_to_external(res);
}
((int, slice, cell, int), ()) $__gen_SampleJetton_mint((int, slice, cell, int) $self, slice $to, int $amount, slice $responseAddress) impure {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable)) = $self;
$self'totalSupply = ($self'totalSupply + $amount);
var ($winit'code, $winit'data) = ($self'totalSupply, $self'owner, $self'content, $self'mintable)~$__gen_SampleJetton_getJettonWalletInit($to);
slice $walletAddress = $contractAddress(($winit'code, $winit'data));
$send((false, $walletAddress, 0, 64, __gen_writecell_TokenTransferInternal((0, $amount, my_address(), $responseAddress, 0, $emptySlice())), $winit'code, $winit'data));
return (($self'totalSupply, $self'owner, $self'content, $self'mintable), ());
}
((int, slice, cell, int), ()) $__gen_SampleJetton_requireWallet((int, slice, cell, int) $self, slice $owner) impure {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable)) = $self;
var ($ctx'bounced, $ctx'sender, $ctx'value, $ctx'raw) = __tact_context_get();
var ($winit'code, $winit'data) = ($self'totalSupply, $self'owner, $self'content, $self'mintable)~$__gen_SampleJetton_getJettonWalletInit($owner);
throw_unless(4429, __tact_address_eq($contractAddress(($winit'code, $winit'data)), $ctx'sender));
return (($self'totalSupply, $self'owner, $self'content, $self'mintable), ());
}
((int, slice, cell, int), ()) $__gen_SampleJetton_requireOwner((int, slice, cell, int) $self) impure {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable)) = $self;
throw_unless(132, __tact_address_eq(__gen_Context_get_sender(__tact_context_get()), $self'owner));
return (($self'totalSupply, $self'owner, $self'content, $self'mintable), ());
}
slice $__gen_SampleJetton_owner((int, slice, cell, int) $self) impure {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable)) = $self;
return $self'owner;
}
_ $__gen_get_owner() method_id(83229) {
var self = __gen_load_SampleJetton();
var res = $__gen_SampleJetton_owner(self);
return res;
}
(((int, slice, cell, int)), ()) $__gen_SampleJetton_receive_Mint((int, slice, cell, int) $self, (int) $msg) impure {
var ($self'totalSupply, $self'owner, $self'content, $self'mintable) = $self;
var ($msg'amount) = $msg;
var ($ctx'bounced, $ctx'sender, $ctx'value, $ctx'raw) = __tact_context_get();
($self'totalSupply, $self'owner, $self'content, $self'mintable)~$__gen_SampleJetton_mint($ctx'sender, $msg'amount, $ctx'sender);
return (($self'totalSupply, $self'owner, $self'content, $self'mintable), ());
}
((int, slice, cell, int), ()) $__gen_SampleJetton_receive_comment_cd0d986cb1a2f468ae7089f4fc3162c116e5f53fbd11a6839f52dbf5040830b2((int, slice, cell, int) $self) impure {
var ($self'totalSupply, $self'owner, $self'content, $self'mintable) = $self;
var ($ctx'bounced, $ctx'sender, $ctx'value, $ctx'raw) = __tact_context_get();
($self'totalSupply, $self'owner, $self'content, $self'mintable)~$__gen_SampleJetton_mint($ctx'sender, 1000000000, $ctx'sender);
return (($self'totalSupply, $self'owner, $self'content, $self'mintable), ());
}
(((int, slice, cell, int)), ()) $__gen_SampleJetton_receive_TokenUpdateContent((int, slice, cell, int) $self, (cell) $msg) impure {
var ($self'totalSupply, $self'owner, $self'content, $self'mintable) = $self;
var ($msg'content) = $msg;
($self'totalSupply, $self'owner, $self'content, $self'mintable)~$__gen_SampleJetton_requireOwner();
$self'content = $msg'content;
return (($self'totalSupply, $self'owner, $self'content, $self'mintable), ());
}
(((int, slice, cell, int)), ()) $__gen_SampleJetton_receive_TokenBurnNotification((int, slice, cell, int) $self, (int, int, slice, slice) $msg) impure {
var ($self'totalSupply, $self'owner, $self'content, $self'mintable) = $self;
var ($msg'queryId, $msg'amount, $msg'owner, $msg'responseAddress) = $msg;
($self'totalSupply, $self'owner, $self'content, $self'mintable)~$__gen_SampleJetton_requireWallet($msg'owner);
$self'totalSupply = ($self'totalSupply - $msg'amount);
if ((~ null?($msg'responseAddress))) {
$send((false, __tact_not_null($msg'responseAddress), 0, (64 + 2), __gen_writecell_TokenExcesses(($msg'queryId)), null(), null()));
}
return (($self'totalSupply, $self'owner, $self'content, $self'mintable), ());
}
() recv_internal(int msg_value, cell in_msg_cell, slice in_msg) impure {
;; Parse incoming message
int op = 0;
if (slice_bits(in_msg) >= 32) {
op = in_msg.preload_uint(32);
}
var cs = in_msg_cell.begin_parse();
var msg_flags = cs~load_uint(4);
var msg_bounced = ((msg_flags & 1) == 1 ? true : false);
slice msg_sender_addr = cs~load_msg_addr();
__tact_context = (msg_bounced, msg_sender_addr, msg_value, cs);
;; Handle bounced messages
if (msg_bounced) {
return ();
}
;; Receive Mint message
if (op == 33240155) {
var self = __gen_load_SampleJetton();
var msg = in_msg~__gen_read_Mint();
self~$__gen_SampleJetton_receive_Mint(msg);
__gen_store_SampleJetton(self);
return ();
}
;; Receive TokenUpdateContent message
if (op == 201882270) {
var self = __gen_load_SampleJetton();
var msg = in_msg~__gen_read_TokenUpdateContent();
self~$__gen_SampleJetton_receive_TokenUpdateContent(msg);
__gen_store_SampleJetton(self);
return ();
}
;; Receive TokenBurnNotification message
if (op == 2078119902) {
var self = __gen_load_SampleJetton();
var msg = in_msg~__gen_read_TokenBurnNotification();
self~$__gen_SampleJetton_receive_TokenBurnNotification(msg);
__gen_store_SampleJetton(self);
return ();
}
;; Text Receivers
if (op == 0) {
var text_op = slice_hash(in_msg);
;; Receive "Mint!" message
if (text_op == 0xcd0d986cb1a2f468ae7089f4fc3162c116e5f53fbd11a6839f52dbf5040830b2) {
var self = __gen_load_SampleJetton();
self~$__gen_SampleJetton_receive_comment_cd0d986cb1a2f468ae7089f4fc3162c116e5f53fbd11a6839f52dbf5040830b2();
__gen_store_SampleJetton(self);
return ();
}
}
throw(130);
}
_ supported_interfaces() method_id {
return (
"org.ton.introspection.v0"H >> 128,
"org.ton.abi.ipfs.v0"H >> 128,
"org.ton.jetton.master"H >> 128,
"org.ton.ownable"H >> 128
);
}
_ get_abi_ipfs() {
return "ipfs://QmPfyoAvkPUqzx93gq8EBcVccAYXFEbjnqCMrHYtyPUHfE";
}

683
sources/output/jetton_SampleJetton.code.fif

@ -1,683 +0,0 @@
PROGRAM{
DECLPROC __tact_not_null
DECLPROC __tact_context_get
DECLPROC __tact_verify_address
DECLPROC __tact_store_bool
DECLPROC __tact_load_address
DECLPROC __tact_load_address_opt
DECLPROC __tact_store_address
DECLPROC __tact_store_address_opt
DECLPROC __tact_create_address
DECLPROC __tact_compute_contract_address
DECLPROC __tact_address_eq
DECLPROC __tact_dict_set_code
DECLPROC __tact_dict_get_code
DECLPROC __gen_write_TokenTransferInternal
DECLPROC __gen_writecell_TokenTransferInternal
DECLPROC __gen_read_TokenBurnNotification
DECLPROC __gen_write_TokenExcesses
DECLPROC __gen_writecell_TokenExcesses
DECLPROC __gen_read_TokenUpdateContent
DECLPROC __gen_read_Mint
DECLPROC __gen_write_JettonDefaultWallet
DECLPROC __gen_write_SampleJetton
DECLPROC __gen_read_SampleJetton
DECLPROC __gen_StateInit_get_code
DECLPROC __gen_Context_get_sender
DECLPROC __gen_JettonData_to_external
DECLPROC __gen_load_SampleJetton
DECLPROC __gen_store_SampleJetton
DECLPROC $emptyCell
DECLPROC $__gen_Cell_asSlice
DECLPROC $emptySlice
DECLPROC $contractAddress
DECLPROC $send
DECLPROC $__gen_JettonDefaultWallet_init
DECLPROC $__gen_JettonDefaultWallet_init_child
DECLPROC $__gen_SampleJetton_getJettonWalletInit
DECLPROC $__gen_SampleJetton_get_wallet_address
103289 DECLMETHOD $__gen_get_get_wallet_address
DECLPROC $__gen_SampleJetton_get_jetton_data
106029 DECLMETHOD $__gen_get_get_jetton_data
DECLPROC $__gen_SampleJetton_mint
DECLPROC $__gen_SampleJetton_requireWallet
DECLPROC $__gen_SampleJetton_requireOwner
DECLPROC $__gen_SampleJetton_owner
83229 DECLMETHOD $__gen_get_owner
DECLPROC $__gen_SampleJetton_receive_Mint
DECLPROC $__gen_SampleJetton_receive_comment_cd0d986cb1a2f468ae7089f4fc3162c116e5f53fbd11a6839f52dbf5040830b2
DECLPROC $__gen_SampleJetton_receive_TokenUpdateContent
DECLPROC $__gen_SampleJetton_receive_TokenBurnNotification
DECLPROC recv_internal
113617 DECLMETHOD supported_interfaces
DECLPROC get_abi_ipfs
DECLGLOBVAR __tact_context
DECLGLOBVAR __tact_context_sys
__tact_not_null PROC:<{
DUP
ISNULL
128 THROWIF
}>
__tact_context_get PROCINLINE:<{
__tact_context GETGLOB
4 UNTUPLE
}>
__tact_verify_address PROCINLINE:<{
SBITS
267 PUSHINT
NEQ
136 THROWIFNOT
}>
__tact_store_bool PROCINLINE:<{
SWAP
1 STI
}>
__tact_load_address PROCINLINE:<{
LDMSGADDR
SWAP
}>
__tact_load_address_opt PROCINLINE:<{
LDMSGADDR
OVER
2 PLDU
0 NEQINT
IF:<{
SWAP
}>ELSE<{
NIP
PUSHNULL
}>
}>
__tact_store_address PROCINLINE:<{
STSLICER
}>
__tact_store_address_opt PROCINLINE:<{
DUP
ISNULL
IF:<{
DROP
0 PUSHINT
SWAP
2 STU
}>ELSE<{
__tact_store_address INLINECALLDICT
}>
}>
__tact_create_address PROCINLINE:<{
NEWC
2 PUSHINT
SWAP
2 STU
0 PUSHINT
SWAP
1 STU
s1 s2 XCHG
8 STI
256 STU
ENDC
CTOS
}>
__tact_compute_contract_address PROCINLINE:<{
NEWC
0 PUSHINT
SWAP
2 STU
3 PUSHINT
SWAP
2 STU
0 PUSHINT
SWAP
1 STU
s1 s2 XCHG
STREF
STREF
ENDC
HASHCU
__tact_create_address INLINECALLDICT
}>
__tact_address_eq PROCINLINE:<{
SDEQ
}>
__tact_dict_set_code PROCINLINE:<{
s0 s2 XCHG
16 PUSHINT
DICTUSETREF
}>
__tact_dict_get_code PROCINLINE:<{
SWAP
16 PUSHINT
DICTUGETREF
NULLSWAPIFNOT
135 THROWIFNOT
}>
__gen_write_TokenTransferInternal PROCREF:<{
395134233 PUSHINT
s0 s7 XCHG2
32 STU
s1 s5 XCHG
64 STU
s0 s3 XCHG2
STGRAMS
SWAP
__tact_store_address INLINECALLDICT
SWAP
__tact_store_address_opt INLINECALLDICT
SWAP
STGRAMS
SWAP
STSLICER
}>
__gen_writecell_TokenTransferInternal PROCREF:<{
NEWC
6 -ROLL
__gen_write_TokenTransferInternal INLINECALLDICT
ENDC
}>
__gen_read_TokenBurnNotification PROCREF:<{
32 LDU
SWAP
2078119902 PUSHINT
EQUAL
129 THROWIFNOT
64 LDU
LDGRAMS
__tact_load_address INLINECALLDICT
SWAP
__tact_load_address_opt INLINECALLDICT
s1 s4 XCHG
s3 s3 s0 XCHG3
}>
__gen_write_TokenExcesses PROCREF:<{
3576854235 PUSHINT
ROT
32 STU
64 STU
}>
__gen_writecell_TokenExcesses PROCREF:<{
NEWC
SWAP
__gen_write_TokenExcesses INLINECALLDICT
ENDC
}>
__gen_read_TokenUpdateContent PROCREF:<{
32 LDU
SWAP
201882270 PUSHINT
EQUAL
129 THROWIFNOT
1 LDI
SWAP
IF:<{
LDREF
}>ELSE<{
PUSHNULL
SWAP
}>
SWAP
}>
__gen_read_Mint PROCREF:<{
32 LDU
SWAP
33240155 PUSHINT
EQUAL
129 THROWIFNOT
257 PUSHINT
LDIX
SWAP
}>
__gen_write_JettonDefaultWallet PROCREF:<{
s2 s3 XCHG2
257 PUSHINT
STIX
SWAP
__tact_store_address INLINECALLDICT
SWAP
__tact_store_address INLINECALLDICT
}>
__gen_write_SampleJetton PROCREF:<{
s4 s3 XCHG2
STGRAMS
SWAP
__tact_store_address INLINECALLDICT
s2 PUSH
ISNULL
NOT
IF:<{
TRUE
SWAP
1 STI
s1 s2 XCHG
STREF
}>ELSE<{
s2 POP
FALSE
ROT
1 STI
}>
1 STI
}>
__gen_read_SampleJetton PROCREF:<{
LDGRAMS
__tact_load_address INLINECALLDICT
SWAP
1 LDI
SWAP
IF:<{
LDREF
}>ELSE<{
PUSHNULL
SWAP
}>
1 LDI
4 -ROLL
}>
__gen_StateInit_get_code PROCINLINE:<{
DROP
}>
__gen_Context_get_sender PROCINLINE:<{
s2 s3 XCHG
3 BLKDROP
}>
__gen_JettonData_to_external PROC:<{
}>
__gen_load_SampleJetton PROCREF:<{
c4 PUSH
CTOS
LDREF
SWAP
__tact_context_sys SETGLOB
__gen_read_SampleJetton INLINECALLDICT
1 4 BLKDROP2
}>
__gen_store_SampleJetton PROCREF:<{
NEWC
__tact_context_sys GETGLOB
SWAP
STREF
4 -ROLL
__gen_write_SampleJetton INLINECALLDICT
ENDC
c4 POP
}>
$emptyCell PROC:<{
NEWC
ENDC
}>
$__gen_Cell_asSlice PROC:<{
CTOS
}>
$emptySlice PROC:<{
$emptyCell CALLDICT
$__gen_Cell_asSlice CALLDICT
}>
$contractAddress PROC:<{
0 PUSHINT
-ROT
__tact_compute_contract_address INLINECALLDICT
}>
$send PROC:<{
NEWC
1 PUSHINT
SWAP
2 STI
s0 s7 XCHG2
__tact_store_bool INLINECALLDICT
0 PUSHINT
SWAP
3 STI
s0 s5 XCHG2
__tact_store_address INLINECALLDICT
s0 s3 XCHG2
STGRAMS
0 PUSHINT
SWAP
105 STI
s3 PUSH
ISNULL
NOT
s5 PUSH
ISNULL
NOT
OR
IF:<{
TRUE
__tact_store_bool INLINECALLDICT
NEWC
FALSE
__tact_store_bool INLINECALLDICT
FALSE
__tact_store_bool INLINECALLDICT
s4 PUSH
ISNULL
NOT
IF:<{
TRUE
__tact_store_bool INLINECALLDICT
s0 s4 XCHG
__tact_not_null CALLDICT
s0 s4 XCHG2
STREF
}>ELSE<{
s4 POP
s0 s3 XCHG
FALSE
__tact_store_bool INLINECALLDICT
}>
s4 PUSH
ISNULL
NOT
IF:<{
TRUE
__tact_store_bool INLINECALLDICT
s0 s4 XCHG
__tact_not_null CALLDICT
s0 s4 XCHG2
STREF
}>ELSE<{
s4 POP
s0 s3 XCHG
FALSE
__tact_store_bool INLINECALLDICT
}>
FALSE
__tact_store_bool INLINECALLDICT
s0 s2 XCHG
TRUE
__tact_store_bool INLINECALLDICT
s0 s2 XCHG
ENDC
ROT
STREF
}>ELSE<{
s3 POP
s3 POP
SWAP
FALSE
__tact_store_bool INLINECALLDICT
}>
OVER
ISNULL
NOT
IF:<{
TRUE
__tact_store_bool INLINECALLDICT
SWAP
__tact_not_null CALLDICT
SWAP
STREF
}>ELSE<{
NIP
FALSE
__tact_store_bool INLINECALLDICT
}>
ENDC
SWAP
SENDRAWMSG
}>
$__gen_JettonDefaultWallet_init PROC:<{
0 PUSHINT
s0 s3 XCHG
NEWC
STREF
s3 s1 s3 XCHG3
__gen_write_JettonDefaultWallet INLINECALLDICT
ENDC
}>
$__gen_JettonDefaultWallet_init_child PROC:<{
s0 s2 XCHG
CTOS
LDDICT
DROP
NEWDICT
SWAP
55471 PUSHINT
__tact_dict_get_code INLINECALLDICT
SWAP
55471 PUSHINT
s2 PUSH
__tact_dict_set_code INLINECALLDICT
NEWC
STDICT
ENDC
s0 s0 s3 XCHG3
$__gen_JettonDefaultWallet_init CALLDICT
}>
$__gen_SampleJetton_getJettonWalletInit PROC:<{
__tact_context_sys GETGLOB
MYADDR
ROT
$__gen_JettonDefaultWallet_init_child CALLDICT
}>
$__gen_SampleJetton_get_wallet_address PROC:<{
$__gen_SampleJetton_getJettonWalletInit CALLDICT
4 2 BLKDROP2
$contractAddress CALLDICT
}>
$__gen_get_get_wallet_address PROC:<{
__gen_load_SampleJetton INLINECALLDICT
4 ROLL
$__gen_SampleJetton_get_wallet_address CALLDICT
}>
$__gen_SampleJetton_get_jetton_data PROC:<{
MYADDR
$__gen_SampleJetton_getJettonWalletInit CALLDICT
__gen_StateInit_get_code INLINECALLDICT
s3 s3 s0 XCHG3
}>
$__gen_get_get_jetton_data PROC:<{
__gen_load_SampleJetton INLINECALLDICT
$__gen_SampleJetton_get_jetton_data CALLDICT
__gen_JettonData_to_external CALLDICT
}>
$__gen_SampleJetton_mint PROC:<{
s6 s1 XCPU
ADD
4 2 BLKSWAP
$__gen_SampleJetton_getJettonWalletInit CALLDICT
2DUP
$contractAddress CALLDICT
FALSE
0 PUSHINT
64 PUSHINT
OVER
MYADDR
OVER
$emptySlice CALLDICT
s3 s5 XCHG
s4 s14 XCHG
s2 s3 XCHG
s2 s15 XCHG
__gen_writecell_TokenTransferInternal INLINECALLDICT
s5 s6 s0 XCHG3
s4 s10 XCHG
s3 s9 XCHG
s0 s10 s9 XCHG3
$send CALLDICT
2SWAP
}>
$__gen_SampleJetton_requireWallet PROC:<{
__tact_context_get INLINECALLDICT
s2 s3 XCHG
3 BLKDROP
5 -ROLL
$__gen_SampleJetton_getJettonWalletInit CALLDICT
SWAP
4429 PUSHINT
s0 s2 XCHG
$contractAddress CALLDICT
s0 s6 XCHG2
__tact_address_eq INLINECALLDICT
s1 s5 XCHG
THROWANYIFNOT
3 ROLL
}>
$__gen_SampleJetton_requireOwner PROC:<{
__tact_context_get INLINECALLDICT
__gen_Context_get_sender INLINECALLDICT
s3 PUSH
__tact_address_eq INLINECALLDICT
132 THROWIFNOT
}>
$__gen_SampleJetton_owner PROC:<{
s2 s3 XCHG
3 BLKDROP
}>
$__gen_get_owner PROC:<{
__gen_load_SampleJetton INLINECALLDICT
$__gen_SampleJetton_owner CALLDICT
}>
$__gen_SampleJetton_receive_Mint PROC:<{
__tact_context_get INLINECALLDICT
s2 s3 XCHG
3 BLKDROP
TUCK
$__gen_SampleJetton_mint CALLDICT
}>
$__gen_SampleJetton_receive_comment_cd0d986cb1a2f468ae7089f4fc3162c116e5f53fbd11a6839f52dbf5040830b2 PROC:<{
__tact_context_get INLINECALLDICT
s2 s3 XCHG
3 BLKDROP
1000000000 PUSHINT
OVER
$__gen_SampleJetton_mint CALLDICT
}>
$__gen_SampleJetton_receive_TokenUpdateContent PROC:<{
4 -ROLL
$__gen_SampleJetton_requireOwner CALLDICT
NIP
s1 s3 s0 XCHG3
}>
$__gen_SampleJetton_receive_TokenBurnNotification PROC:<{
s4 s7 XCHG
s3 s6 XCHG
s5 s7 s7 XCHG3
$__gen_SampleJetton_requireWallet CALLDICT
s3 s4 XCHG2
SUB
s5 PUSH
ISNULL
NOT
IF:<{
FALSE
s0 s6 XCHG
__tact_not_null CALLDICT
0 PUSHINT
66 PUSHINT
s0 s7 XCHG
__gen_writecell_TokenExcesses INLINECALLDICT
s4 s8 XCHG
s1 s3 s0 XCHG3
s1 s7 XCHG
PUSHNULL
PUSHNULL
$send CALLDICT
}>ELSE<{
s4 POP
s4 POP
}>
s3 s0 s0 XCHG3
}>
recv_internal PROC:<{
c2 SAVE
SAMEALTSAVE
0 PUSHINT
OVER
SBITS
31 GTINT
IF:<{
DROP
DUP
32 PLDU
}>
s0 s2 XCHG
CTOS
4 LDU
SWAP
1 PUSHINT
AND
1 EQINT
IF:<{
TRUE
}>ELSE<{
FALSE
}>
SWAP
LDMSGADDR
s2 PUSH
s6 s6 XCHG2
4 TUPLE
__tact_context SETGLOB
s0 s2 XCHG
IFJMP:<{
2DROP
}>
DUP
33240155 PUSHINT
EQUAL
IFJMP:<{
DROP
__gen_load_SampleJetton INLINECALLDICT
s0 s4 XCHG
__gen_read_Mint INLINECALLDICT
NIP
s3 s4 XCHG
s1 s3 s0 XCHG3
$__gen_SampleJetton_receive_Mint CALLDICT
__gen_store_SampleJetton INLINECALLDICT
}>
DUP
201882270 PUSHINT
EQUAL
IFJMP:<{
DROP
__gen_load_SampleJetton INLINECALLDICT
s0 s4 XCHG
__gen_read_TokenUpdateContent INLINECALLDICT
NIP
s3 s4 XCHG
s1 s3 s0 XCHG3
$__gen_SampleJetton_receive_TokenUpdateContent CALLDICT
__gen_store_SampleJetton INLINECALLDICT
}>
DUP
2078119902 PUSHINT
EQUAL
IFJMP:<{
DROP
__gen_load_SampleJetton INLINECALLDICT
s0 s4 XCHG
__gen_read_TokenBurnNotification INLINECALLDICT
s4 POP
s6 s7 XCHG
s5 s6 XCHG
s4 s5 XCHG
3 ROLL
$__gen_SampleJetton_receive_TokenBurnNotification CALLDICT
__gen_store_SampleJetton INLINECALLDICT
}>
0 EQINT
IF:<{
HASHSU
92748154967237992140665580847895802782213764542359950109876145449566260965554 PUSHINT
EQUAL
IFJMP:<{
__gen_load_SampleJetton INLINECALLDICT
$__gen_SampleJetton_receive_comment_cd0d986cb1a2f468ae7089f4fc3162c116e5f53fbd11a6839f52dbf5040830b2 CALLDICT
__gen_store_SampleJetton INLINECALLDICT
RETALT
}>
}>ELSE<{
DROP
}>
130 THROW
}>
supported_interfaces PROC:<{
123515602279859691144772641439386770278 PUSHINT
209801025412363888721030803524359905849 PUSHINT
258390863389042349688353801369539695109 PUSHINT
86142586315491086060343270784266291122 PUSHINT
}>
get_abi_ipfs PROC:<{
x{697066733a2f2f516d5066796f41766b5055717a7839336771384542635663634159584645626a6e71434d72485974795055486645} PUSHSLICE
}>
}END>c

860
sources/output/jetton_SampleJetton.code.rev.fif

@ -1,860 +0,0 @@
SETCP0
(:methods
recv_internal:
c2 SAVE
SAMEALTSAVE
0 PUSHINT
s1 PUSH
SBITS
31 GTINT
<{
s0 POP
s0 PUSH
32 PLDU
}> PUSHCONT
IF
s0 s2 XCHG
CTOS
4 LDU
s0 s1 XCHG
1 PUSHINT
AND
1 EQINT
<{
-1 PUSHINT
}> PUSHCONT
<{
0 PUSHINT
}> PUSHCONT
IFELSE
s0 s1 XCHG
LDMSGADDR
s2 PUSH
s6 s6 XCHG2
4 TUPLE
1 SETGLOBVAR
s0 s2 XCHG
<{
2DROP
}> PUSHCONT
IFJMP
s0 PUSH
33240155 PUSHINT
EQUAL
<{
s0 POP
<{
c4 PUSH
CTOS
LDREF
s0 s1 XCHG
2 SETGLOBVAR
<{
LDGRAMS
LDMSGADDR
s0 s1 XCHG
s0 s1 XCHG
1 LDI
s0 s1 XCHG
<{
LDREF
}> PUSHCONT
<{
PUSHNULL
s0 s1 XCHG
}> PUSHCONT
IFELSE
1 LDI
4 1 BLKSWAP
}> CALLREF
1 4 BLKDROP2
}> CALLREF
s0 s4 XCHG
<{
32 LDU
s0 s1 XCHG
33240155 PUSHINT
EQUAL
129 THROWIFNOT
257 PUSHINT
LDI
s0 s1 XCHG
}> CALLREF
s1 POP
s3 s4 XCHG
s1 s3 s0 XCHG3
43 CALLDICT
<{
NEWC
2 GETGLOBVAR
s0 s1 XCHG
STREF
4 1 BLKSWAP
<{
s4 s3 XCHG2
STGRAMS
s0 s1 XCHG
STSLICER
s2 PUSH
ISNULL
NOT
<{
-1 PUSHINT
s0 s1 XCHG
1 STI
s1 s2 XCHG
STREF
}> PUSHCONT
<{
s2 POP
0 PUSHINT
ROT
1 STI
}> PUSHCONT
IFELSE
1 STI
}> CALLREF
ENDC
c4 POP
}> CALLREF
}> PUSHCONT
IFJMP
s0 PUSH
201882270 PUSHINT
EQUAL
<{
s0 POP
<{
c4 PUSH
CTOS
LDREF
s0 s1 XCHG
2 SETGLOBVAR
<{
LDGRAMS
LDMSGADDR
s0 s1 XCHG
s0 s1 XCHG
1 LDI
s0 s1 XCHG
<{
LDREF
}> PUSHCONT
<{
PUSHNULL
s0 s1 XCHG
}> PUSHCONT
IFELSE
1 LDI
4 1 BLKSWAP
}> CALLREF
1 4 BLKDROP2
}> CALLREF
s0 s4 XCHG
<{
32 LDU
s0 s1 XCHG
201882270 PUSHINT
EQUAL
129 THROWIFNOT
1 LDI
s0 s1 XCHG
<{
LDREF
}> PUSHCONT
<{
PUSHNULL
s0 s1 XCHG
}> PUSHCONT
IFELSE
s0 s1 XCHG
}> CALLREF
s1 POP
s3 s4 XCHG
s1 s3 s0 XCHG3
45 CALLDICT
<{
NEWC
2 GETGLOBVAR
s0 s1 XCHG
STREF
4 1 BLKSWAP
<{
s4 s3 XCHG2
STGRAMS
s0 s1 XCHG
STSLICER
s2 PUSH
ISNULL
NOT
<{
-1 PUSHINT
s0 s1 XCHG
1 STI
s1 s2 XCHG
STREF
}> PUSHCONT
<{
s2 POP
0 PUSHINT
ROT
1 STI
}> PUSHCONT
IFELSE
1 STI
}> CALLREF
ENDC
c4 POP
}> CALLREF
}> PUSHCONT
IFJMP
s0 PUSH
2078119902 PUSHINT
EQUAL
<{
s0 POP
<{
c4 PUSH
CTOS
LDREF
s0 s1 XCHG
2 SETGLOBVAR
<{
LDGRAMS
LDMSGADDR
s0 s1 XCHG
s0 s1 XCHG
1 LDI
s0 s1 XCHG
<{
LDREF
}> PUSHCONT
<{
PUSHNULL
s0 s1 XCHG
}> PUSHCONT
IFELSE
1 LDI
4 1 BLKSWAP
}> CALLREF
1 4 BLKDROP2
}> CALLREF
s0 s4 XCHG
<{
32 LDU
s0 s1 XCHG
2078119902 PUSHINT
EQUAL
129 THROWIFNOT
64 LDU
LDGRAMS
LDMSGADDR
s0 s1 XCHG
s0 s1 XCHG
LDMSGADDR
s1 PUSH
2 PLDU
0 NEQINT
<{
s0 s1 XCHG
}> PUSHCONT
<{
s1 POP
PUSHNULL
}> PUSHCONT
IFELSE
s1 s4 XCHG
s3 s3 s0 XCHG3
}> CALLREF
s4 POP
s6 s7 XCHG
s5 s6 XCHG
s4 s5 XCHG
1 3 BLKSWAP
46 CALLDICT
<{
NEWC
2 GETGLOBVAR
s0 s1 XCHG
STREF
4 1 BLKSWAP
<{
s4 s3 XCHG2
STGRAMS
s0 s1 XCHG
STSLICER
s2 PUSH
ISNULL
NOT
<{
-1 PUSHINT
s0 s1 XCHG
1 STI
s1 s2 XCHG
STREF
}> PUSHCONT
<{
s2 POP
0 PUSHINT
ROT
1 STI
}> PUSHCONT
IFELSE
1 STI
}> CALLREF
ENDC
c4 POP
}> CALLREF
}> PUSHCONT
IFJMP
0 EQINT
<{
HASHSU
92748154967237992140665580847895802782213764542359950109876145449566260965554 PUSHINT
EQUAL
<{
<{
c4 PUSH
CTOS
LDREF
s0 s1 XCHG
2 SETGLOBVAR
<{
LDGRAMS
LDMSGADDR
s0 s1 XCHG
s0 s1 XCHG
1 LDI
s0 s1 XCHG
<{
LDREF
}> PUSHCONT
<{
PUSHNULL
s0 s1 XCHG
}> PUSHCONT
IFELSE
1 LDI
4 1 BLKSWAP
}> CALLREF
1 4 BLKDROP2
}> CALLREF
44 CALLDICT
<{
NEWC
2 GETGLOBVAR
s0 s1 XCHG
STREF
4 1 BLKSWAP
<{
s4 s3 XCHG2
STGRAMS
s0 s1 XCHG
STSLICER
s2 PUSH
ISNULL
NOT
<{
-1 PUSHINT
s0 s1 XCHG
1 STI
s1 s2 XCHG
STREF
}> PUSHCONT
<{
s2 POP
0 PUSHINT
ROT
1 STI
}> PUSHCONT
IFELSE
1 STI
}> CALLREF
ENDC
c4 POP
}> CALLREF
RETALT
}> PUSHCONT
IFJMP
}> PUSHCONT
<{
s0 POP
}> PUSHCONT
IFELSE
130 THROW
1:
s0 PUSH
ISNULL
128 THROWIF
26:
29:
NEWC
ENDC
30:
CTOS
31:
29 CALLDICT
30 CALLDICT
32:
0 PUSHINT
ROTREV
NEWC
0 PUSHINT
s0 s1 XCHG
2 STU
3 PUSHINT
s0 s1 XCHG
2 STU
0 PUSHINT
s0 s1 XCHG
1 STU
s1 s2 XCHG
STREF
STREF
ENDC
HASHCU
NEWC
2 PUSHINT
s0 s1 XCHG
2 STU
0 PUSHINT
s0 s1 XCHG
1 STU
s1 s2 XCHG
8 STI
256 STU
ENDC
CTOS
33:
NEWC
1 PUSHINT
s0 s1 XCHG
2 STI
s0 s7 XCHG2
s0 s1 XCHG
1 STI
0 PUSHINT
s0 s1 XCHG
3 STI
s0 s5 XCHG2
STSLICER
s0 s3 XCHG2
STGRAMS
0 PUSHINT
s0 s1 XCHG
105 STI
s3 PUSH
ISNULL
NOT
s5 PUSH
ISNULL
NOT
OR
<{
-1 PUSHINT
s0 s1 XCHG
1 STI
NEWC
0 PUSHINT
s0 s1 XCHG
1 STI
0 PUSHINT
s0 s1 XCHG
1 STI
s4 PUSH
ISNULL
NOT
<{
-1 PUSHINT
s0 s1 XCHG
1 STI
s0 s4 XCHG
1 CALLDICT
s0 s4 XCHG2
STREF
}> PUSHCONT
<{
s4 POP
s0 s3 XCHG
0 PUSHINT
s0 s1 XCHG
1 STI
}> PUSHCONT
IFELSE
s4 PUSH
ISNULL
NOT
<{
-1 PUSHINT
s0 s1 XCHG
1 STI
s0 s4 XCHG
1 CALLDICT
s0 s4 XCHG2
STREF
}> PUSHCONT
<{
s4 POP
s0 s3 XCHG
0 PUSHINT
s0 s1 XCHG
1 STI
}> PUSHCONT
IFELSE
0 PUSHINT
s0 s1 XCHG
1 STI
s0 s2 XCHG
-1 PUSHINT
s0 s1 XCHG
1 STI
s0 s2 XCHG
ENDC
ROT
STREF
}> PUSHCONT
<{
s3 POP
s3 POP
s0 s1 XCHG
0 PUSHINT
s0 s1 XCHG
1 STI
}> PUSHCONT
IFELSE
s1 PUSH
ISNULL
NOT
<{
-1 PUSHINT
s0 s1 XCHG
1 STI
s0 s1 XCHG
1 CALLDICT
s0 s1 XCHG
STREF
}> IFREFELSEREF
ENDC
s0 s1 XCHG
SENDRAWMSG
s1 POP
0 PUSHINT
s0 s1 XCHG
1 STI
34:
0 PUSHINT
s0 s3 XCHG
NEWC
STREF
s3 s1 s3 XCHG3
<{
s2 s3 XCHG2
257 PUSHINT
STIX
s0 s1 XCHG
STSLICER
s0 s1 XCHG
STSLICER
}> CALLREF
ENDC
35:
s0 s2 XCHG
CTOS
LDDICT
s0 POP
PUSHNULL
s0 s1 XCHG
55471 PUSHINT
s0 s1 XCHG
16 PUSHINT
DICTUGETREF
NULLSWAPIFNOT
135 THROWIFNOT
s0 s1 XCHG
55471 PUSHINT
s2 PUSH
s0 s2 XCHG
16 PUSHINT
DICTUSETREF
NEWC
STDICT
ENDC
s0 s0 s3 XCHG3
34 CALLDICT
36:
2 GETGLOBVAR
MYADDR
ROT
35 CALLDICT
37:
36 CALLDICT
4 2 BLKDROP2
32 CALLDICT
38:
MYADDR
36 CALLDICT
s0 POP
s3 s3 s0 XCHG3
39:
s6 s1 XCPU
ADD
4 2 BLKSWAP
36 CALLDICT
2DUP
32 CALLDICT
0 PUSHINT
0 PUSHINT
64 PUSHINT
s1 PUSH
MYADDR
s1 PUSH
31 CALLDICT
s3 s5 XCHG
s4 s14 XCHG
s2 s3 XCHG
s2 s15 XCHG
<{
NEWC
6 1 BLKSWAP
<{
395134233 PUSHINT
s0 s7 XCHG2
32 STU
s1 s5 XCHG
64 STU
s0 s3 XCHG2
STGRAMS
s0 s1 XCHG
STSLICER
s0 s1 XCHG
s0 PUSH
ISNULL
<{
s0 POP
0 PUSHINT
s0 s1 XCHG
2 STU
}> PUSHCONT
<{
STSLICER
}> PUSHCONT
IFELSE
s0 s1 XCHG
STGRAMS
s0 s1 XCHG
STSLICER
}> CALLREF
ENDC
}> CALLREF
s5 s6 s0 XCHG3
s4 s10 XCHG
s3 s9 XCHG
s0 s10 s9 XCHG3
33 CALLDICT
2SWAP
40:
1 GETGLOBVAR
4 UNTUPLE
s2 s3 XCHG
3 BLKDROP
5 1 BLKSWAP
36 CALLDICT
s0 s1 XCHG
4429 PUSHINT
s0 s2 XCHG
32 CALLDICT
s0 s6 XCHG2
SDEQ
s1 s5 XCHG
THROWANYIFNOT
1 3 BLKSWAP
41:
1 GETGLOBVAR
4 UNTUPLE
s2 s3 XCHG
3 BLKDROP
s3 PUSH
SDEQ
132 THROWIFNOT
42:
s2 s3 XCHG
3 BLKDROP
43:
1 GETGLOBVAR
4 UNTUPLE
s2 s3 XCHG
3 BLKDROP
TUCK
39 CALLDICT
44:
1 GETGLOBVAR
4 UNTUPLE
s2 s3 XCHG
3 BLKDROP
1000000000 PUSHINT
s1 PUSH
39 CALLDICT
45:
4 1 BLKSWAP
41 CALLDICT
s1 POP
s1 s3 s0 XCHG3
46:
s4 s7 XCHG
s3 s6 XCHG
s5 s7 s7 XCHG3
40 CALLDICT
s3 s4 XCHG2
SUB
s5 PUSH
ISNULL
NOT
<{
0 PUSHINT
s0 s6 XCHG
1 CALLDICT
0 PUSHINT
66 PUSHINT
s0 s7 XCHG
<{
NEWC
s0 s1 XCHG
<{
3576854235 PUSHINT
ROT
32 STU
64 STU
}> CALLREF
ENDC
}> CALLREF
s4 s8 XCHG
s1 s3 s0 XCHG3
s1 s7 XCHG
PUSHNULL
PUSHNULL
33 CALLDICT
}> PUSHCONT
<{
s4 POP
s4 POP
}> PUSHCONT
IFELSE
s3 s0 s0 XCHG3
owner:
<{
c4 PUSH
CTOS
LDREF
s0 s1 XCHG
2 SETGLOBVAR
<{
LDGRAMS
LDMSGADDR
s0 s1 XCHG
s0 s1 XCHG
1 LDI
s0 s1 XCHG
<{
LDREF
}> PUSHCONT
<{
PUSHNULL
s0 s1 XCHG
}> PUSHCONT
IFELSE
1 LDI
4 1 BLKSWAP
}> CALLREF
1 4 BLKDROP2
}> CALLREF
42 CALLDICT
get_wallet_address:
<{
c4 PUSH
CTOS
LDREF
s0 s1 XCHG
2 SETGLOBVAR
<{
LDGRAMS
LDMSGADDR
s0 s1 XCHG
s0 s1 XCHG
1 LDI
s0 s1 XCHG
<{
LDREF
}> PUSHCONT
<{
PUSHNULL
s0 s1 XCHG
}> PUSHCONT
IFELSE
1 LDI
4 1 BLKSWAP
}> CALLREF
1 4 BLKDROP2
}> CALLREF
1 4 BLKSWAP
37 CALLDICT
get_jetton_data:
<{
c4 PUSH
CTOS
LDREF
s0 s1 XCHG
2 SETGLOBVAR
<{
LDGRAMS
LDMSGADDR
s0 s1 XCHG
s0 s1 XCHG
1 LDI
s0 s1 XCHG
<{
LDREF
}> PUSHCONT
<{
PUSHNULL
s0 s1 XCHG
}> PUSHCONT
IFELSE
1 LDI
4 1 BLKSWAP
}> CALLREF
1 4 BLKDROP2
}> CALLREF
38 CALLDICT
26 CALLDICT
113617:
123515602279859691144772641439386770278 PUSHINT
209801025412363888721030803524359905849 PUSHINT
258390863389042349688353801369539695109 PUSHINT
86142586315491086060343270784266291122 PUSHINT
) 19 DICTPUSHCONST
DICTIGETJMPZ
11 THROWARG

BIN
sources/output/jetton_SampleJetton.init.boc

Binary file not shown.

39
sources/output/jetton_SampleJetton.init.fc

@ -1,39 +0,0 @@
() __tact_verify_address(slice address) inline {
throw_unless(136, address.slice_bits() != 267);
}
builder __tact_store_address(builder b, slice address) inline {
__tact_verify_address(address);
b = b.store_slice(address);
return b;
}
builder __gen_write_SampleJetton(builder build_0, (int, slice, cell, int) v) inline_ref {
var (v'totalSupply, v'owner, v'content, v'mintable) = v;
build_0 = build_0.store_coins(v'totalSupply);
build_0 = __tact_store_address(build_0, v'owner);
build_0 = ~ null?(v'content) ? build_0.store_int(true, 1).store_ref(v'content) : build_0.store_int(false, 1);
build_0 = build_0.store_int(v'mintable, 1);
return build_0;
}
cell $__gen_SampleJetton_init(cell sys', slice $owner, cell $content) {
var (($self'totalSupply, $self'owner, $self'content, $self'mintable)) = (null(), null(), null(), null());
$self'totalSupply = 0;
$self'owner = $owner;
$self'mintable = true;
$self'content = $content;
var b' = begin_cell();
b' = b'.store_ref(sys');
b' = __gen_write_SampleJetton(b', ($self'totalSupply, $self'owner, $self'content, $self'mintable));
return b'.end_cell();
}
cell init(cell sys', slice $$owner, cell $$content) method_id {
slice $owner = $$owner;
cell $content = $$content;
return $__gen_SampleJetton_init(sys', $owner, $content);
}
() main() {
}

54
sources/output/jetton_SampleJetton.init.fif

@ -1,54 +0,0 @@
PROGRAM{
DECLPROC __tact_verify_address
DECLPROC __tact_store_address
DECLPROC __gen_write_SampleJetton
DECLPROC $__gen_SampleJetton_init
107886 DECLMETHOD init
DECLPROC main
__tact_verify_address PROCINLINE:<{
SBITS
267 PUSHINT
NEQ
136 THROWIFNOT
}>
__tact_store_address PROCINLINE:<{
STSLICER
}>
__gen_write_SampleJetton PROCREF:<{
s4 s3 XCHG2
STGRAMS
SWAP
__tact_store_address INLINECALLDICT
s2 PUSH
ISNULL
NOT
IF:<{
TRUE
SWAP
1 STI
s1 s2 XCHG
STREF
}>ELSE<{
s2 POP
FALSE
ROT
1 STI
}>
1 STI
}>
$__gen_SampleJetton_init PROC:<{
0 PUSHINT
TRUE
s0 s4 XCHG
NEWC
STREF
s3 s3 s4 XCHG3
__gen_write_SampleJetton INLINECALLDICT
ENDC
}>
init PROC:<{
$__gen_SampleJetton_init CALLDICT
}>
main PROC:<{
}>
}END>c

42
sources/output/jetton_SampleJetton.init.rev.fif

@ -1,42 +0,0 @@
SETCP0
(:methods
recv_internal:
4:
0 PUSHINT
-1 PUSHINT
s0 s4 XCHG
NEWC
STREF
s3 s3 s4 XCHG3
<{
s4 s3 XCHG2
STGRAMS
s0 s1 XCHG
STSLICER
s2 PUSH
ISNULL
NOT
<{
-1 PUSHINT
s0 s1 XCHG
1 STI
s1 s2 XCHG
STREF
}> PUSHCONT
<{
s2 POP
0 PUSHINT
ROT
1 STI
}> PUSHCONT
IFELSE
1 STI
}> CALLREF
ENDC
107886:
4 CALLDICT
) 19 DICTPUSHCONST
DICTIGETJMPZ
11 THROWARG

72
sources/output/jetton_SampleJetton.md

@ -1,72 +0,0 @@
# TACT Compilation Report
Contract: SampleJetton
BOC Size: 1199 bytes
# Types
Total Types: 14
## StateInit
TLB: `_ code:^cell data:^cell = StateInit`
Signature: `StateInit{code:^cell,data:^cell}`
## Context
TLB: `_ bounced:bool sender:address value:int257 raw:^slice = Context`
Signature: `Context{bounced:bool,sender:address,value:int257,raw:^slice}`
## SendParameters
TLB: `_ bounce:bool to:address value:int257 mode:int257 body:Maybe ^cell code:Maybe ^cell data:Maybe ^cell = SendParameters`
Signature: `SendParameters{bounce:bool,to:address,value:int257,mode:int257,body:Maybe ^cell,code:Maybe ^cell,data:Maybe ^cell}`
## ChangeOwner
TLB: `change_owner#0f474d03 newOwner:address = ChangeOwner`
Signature: `ChangeOwner{newOwner:address}`
## TokenTransfer
TLB: `token_transfer#0f8a7ea5 queryId:uint64 amount:coins destination:address responseDestination:Maybe address customPayload:Maybe ^cell forwardTonAmount:coins forwardPayload:remainder<slice> = TokenTransfer`
Signature: `TokenTransfer{queryId:uint64,amount:coins,destination:address,responseDestination:Maybe address,customPayload:Maybe ^cell,forwardTonAmount:coins,forwardPayload:remainder<slice>}`
## TokenTransferInternal
TLB: `token_transfer_internal#178d4519 queryId:uint64 amount:coins from:address responseAddress:Maybe address forwardTonAmount:coins forwardPayload:remainder<slice> = TokenTransferInternal`
Signature: `TokenTransferInternal{queryId:uint64,amount:coins,from:address,responseAddress:Maybe address,forwardTonAmount:coins,forwardPayload:remainder<slice>}`
## TokenNotification
TLB: `token_notification#7362d09c queryId:uint64 amount:coins from:address forwardPayload:remainder<slice> = TokenNotification`
Signature: `TokenNotification{queryId:uint64,amount:coins,from:address,forwardPayload:remainder<slice>}`
## TokenBurn
TLB: `token_burn#595f07bc queryId:uint64 amount:coins owner:address responseAddress:Maybe address = TokenBurn`
Signature: `TokenBurn{queryId:uint64,amount:coins,owner:address,responseAddress:Maybe address}`
## TokenBurnNotification
TLB: `token_burn_notification#7bdd97de queryId:uint64 amount:coins owner:address responseAddress:Maybe address = TokenBurnNotification`
Signature: `TokenBurnNotification{queryId:uint64,amount:coins,owner:address,responseAddress:Maybe address}`
## TokenExcesses
TLB: `token_excesses#d53276db queryId:uint64 = TokenExcesses`
Signature: `TokenExcesses{queryId:uint64}`
## TokenUpdateContent
TLB: `token_update_content#0c087a9e content:Maybe ^cell = TokenUpdateContent`
Signature: `TokenUpdateContent{content:Maybe ^cell}`
## JettonData
TLB: `_ totalSupply:int257 mintable:bool owner:address content:Maybe ^cell walletCode:^cell = JettonData`
Signature: `JettonData{totalSupply:int257,mintable:bool,owner:address,content:Maybe ^cell,walletCode:^cell}`
## JettonWalletData
TLB: `_ balance:int257 owner:address master:address walletCode:^cell = JettonWalletData`
Signature: `JettonWalletData{balance:int257,owner:address,master:address,walletCode:^cell}`
## Mint
TLB: `mint#01fb345b amount:int257 = Mint`
Signature: `Mint{amount:int257}`
# Get Methods
Total Get Methods: 3
## get_wallet_address
Argument: owner
## get_jetton_data
## owner

1
sources/output/jetton_SampleJetton.pkg

File diff suppressed because one or more lines are too long

881
sources/output/jetton_SampleJetton.ts

@ -1,881 +0,0 @@
import { Cell, Slice, Address, Builder, beginCell, ComputeError, TupleReader, contractAddress, ContractProvider, Sender, Contract, ContractABI, TupleBuilder, DictionaryValue } from 'ton-core';
import { ContractSystem, ContractExecutor } from 'ton-emulator';
export type StateInit = {
$$type: 'StateInit';
code: Cell;
data: Cell;
}
export function storeStateInit(src: StateInit) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeRef(src.code);
b_0.storeRef(src.data);
};
}
export function loadStateInit(slice: Slice) {
let sc_0 = slice;
let _code = sc_0.loadRef();
let _data = sc_0.loadRef();
return { $$type: 'StateInit' as const, code: _code, data: _data };
}
function loadTupleStateInit(source: TupleReader) {
let _code = source.readCell();
let _data = source.readCell();
return { $$type: 'StateInit' as const, code: _code, data: _data };
}
function storeTupleStateInit(source: StateInit) {
let builder = new TupleBuilder();
builder.writeCell(source.code);
builder.writeCell(source.data);
return builder.build();
}
function dictValueParserStateInit(): DictionaryValue<StateInit> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeStateInit(src)).endCell());
},
parse: (src) => {
return loadStateInit(src.loadRef().beginParse());
}
}
}
export type Context = {
$$type: 'Context';
bounced: boolean;
sender: Address;
value: bigint;
raw: Cell;
}
export function storeContext(src: Context) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeBit(src.bounced);
b_0.storeAddress(src.sender);
b_0.storeInt(src.value, 257);
b_0.storeRef(src.raw);
};
}
export function loadContext(slice: Slice) {
let sc_0 = slice;
let _bounced = sc_0.loadBit();
let _sender = sc_0.loadAddress();
let _value = sc_0.loadIntBig(257);
let _raw = sc_0.loadRef();
return { $$type: 'Context' as const, bounced: _bounced, sender: _sender, value: _value, raw: _raw };
}
function loadTupleContext(source: TupleReader) {
let _bounced = source.readBoolean();
let _sender = source.readAddress();
let _value = source.readBigNumber();
let _raw = source.readCell();
return { $$type: 'Context' as const, bounced: _bounced, sender: _sender, value: _value, raw: _raw };
}
function storeTupleContext(source: Context) {
let builder = new TupleBuilder();
builder.writeBoolean(source.bounced);
builder.writeAddress(source.sender);
builder.writeNumber(source.value);
builder.writeSlice(source.raw);
return builder.build();
}
function dictValueParserContext(): DictionaryValue<Context> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeContext(src)).endCell());
},
parse: (src) => {
return loadContext(src.loadRef().beginParse());
}
}
}
export type SendParameters = {
$$type: 'SendParameters';
bounce: boolean;
to: Address;
value: bigint;
mode: bigint;
body: Cell | null;
code: Cell | null;
data: Cell | null;
}
export function storeSendParameters(src: SendParameters) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeBit(src.bounce);
b_0.storeAddress(src.to);
b_0.storeInt(src.value, 257);
b_0.storeInt(src.mode, 257);
if (src.body !== null && src.body !== undefined) { b_0.storeBit(true).storeRef(src.body); } else { b_0.storeBit(false); }
if (src.code !== null && src.code !== undefined) { b_0.storeBit(true).storeRef(src.code); } else { b_0.storeBit(false); }
if (src.data !== null && src.data !== undefined) { b_0.storeBit(true).storeRef(src.data); } else { b_0.storeBit(false); }
};
}
export function loadSendParameters(slice: Slice) {
let sc_0 = slice;
let _bounce = sc_0.loadBit();
let _to = sc_0.loadAddress();
let _value = sc_0.loadIntBig(257);
let _mode = sc_0.loadIntBig(257);
let _body = sc_0.loadBit() ? sc_0.loadRef() : null;
let _code = sc_0.loadBit() ? sc_0.loadRef() : null;
let _data = sc_0.loadBit() ? sc_0.loadRef() : null;
return { $$type: 'SendParameters' as const, bounce: _bounce, to: _to, value: _value, mode: _mode, body: _body, code: _code, data: _data };
}
function loadTupleSendParameters(source: TupleReader) {
let _bounce = source.readBoolean();
let _to = source.readAddress();
let _value = source.readBigNumber();
let _mode = source.readBigNumber();
let _body = source.readCellOpt();
let _code = source.readCellOpt();
let _data = source.readCellOpt();
return { $$type: 'SendParameters' as const, bounce: _bounce, to: _to, value: _value, mode: _mode, body: _body, code: _code, data: _data };
}
function storeTupleSendParameters(source: SendParameters) {
let builder = new TupleBuilder();
builder.writeBoolean(source.bounce);
builder.writeAddress(source.to);
builder.writeNumber(source.value);
builder.writeNumber(source.mode);
builder.writeCell(source.body);
builder.writeCell(source.code);
builder.writeCell(source.data);
return builder.build();
}
function dictValueParserSendParameters(): DictionaryValue<SendParameters> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeSendParameters(src)).endCell());
},
parse: (src) => {
return loadSendParameters(src.loadRef().beginParse());
}
}
}
export type ChangeOwner = {
$$type: 'ChangeOwner';
newOwner: Address;
}
export function storeChangeOwner(src: ChangeOwner) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(256331011, 32);
b_0.storeAddress(src.newOwner);
};
}
export function loadChangeOwner(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 256331011) { throw Error('Invalid prefix'); }
let _newOwner = sc_0.loadAddress();
return { $$type: 'ChangeOwner' as const, newOwner: _newOwner };
}
function loadTupleChangeOwner(source: TupleReader) {
let _newOwner = source.readAddress();
return { $$type: 'ChangeOwner' as const, newOwner: _newOwner };
}
function storeTupleChangeOwner(source: ChangeOwner) {
let builder = new TupleBuilder();
builder.writeAddress(source.newOwner);
return builder.build();
}
function dictValueParserChangeOwner(): DictionaryValue<ChangeOwner> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeChangeOwner(src)).endCell());
},
parse: (src) => {
return loadChangeOwner(src.loadRef().beginParse());
}
}
}
export type TokenTransfer = {
$$type: 'TokenTransfer';
queryId: bigint;
amount: bigint;
destination: Address;
responseDestination: Address | null;
customPayload: Cell | null;
forwardTonAmount: bigint;
forwardPayload: Cell;
}
export function storeTokenTransfer(src: TokenTransfer) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(260734629, 32);
b_0.storeUint(src.queryId, 64);
b_0.storeCoins(src.amount);
b_0.storeAddress(src.destination);
if (src.responseDestination !== null && src.responseDestination !== undefined) { b_0.storeBit(true).storeAddress(src.responseDestination); } else { b_0.storeBit(false); }
if (src.customPayload !== null && src.customPayload !== undefined) { b_0.storeBit(true).storeRef(src.customPayload); } else { b_0.storeBit(false); }
b_0.storeCoins(src.forwardTonAmount);
b_0.storeBuilder(src.forwardPayload.asBuilder());
};
}
export function loadTokenTransfer(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 260734629) { throw Error('Invalid prefix'); }
let _queryId = sc_0.loadUintBig(64);
let _amount = sc_0.loadCoins();
let _destination = sc_0.loadAddress();
let _responseDestination = sc_0.loadBit() ? sc_0.loadAddress() : null;
let _customPayload = sc_0.loadBit() ? sc_0.loadRef() : null;
let _forwardTonAmount = sc_0.loadCoins();
let _forwardPayload = sc_0.asCell();
return { $$type: 'TokenTransfer' as const, queryId: _queryId, amount: _amount, destination: _destination, responseDestination: _responseDestination, customPayload: _customPayload, forwardTonAmount: _forwardTonAmount, forwardPayload: _forwardPayload };
}
function loadTupleTokenTransfer(source: TupleReader) {
let _queryId = source.readBigNumber();
let _amount = source.readBigNumber();
let _destination = source.readAddress();
let _responseDestination = source.readAddressOpt();
let _customPayload = source.readCellOpt();
let _forwardTonAmount = source.readBigNumber();
let _forwardPayload = source.readCell();
return { $$type: 'TokenTransfer' as const, queryId: _queryId, amount: _amount, destination: _destination, responseDestination: _responseDestination, customPayload: _customPayload, forwardTonAmount: _forwardTonAmount, forwardPayload: _forwardPayload };
}
function storeTupleTokenTransfer(source: TokenTransfer) {
let builder = new TupleBuilder();
builder.writeNumber(source.queryId);
builder.writeNumber(source.amount);
builder.writeAddress(source.destination);
builder.writeAddress(source.responseDestination);
builder.writeCell(source.customPayload);
builder.writeNumber(source.forwardTonAmount);
builder.writeSlice(source.forwardPayload);
return builder.build();
}
function dictValueParserTokenTransfer(): DictionaryValue<TokenTransfer> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeTokenTransfer(src)).endCell());
},
parse: (src) => {
return loadTokenTransfer(src.loadRef().beginParse());
}
}
}
export type TokenTransferInternal = {
$$type: 'TokenTransferInternal';
queryId: bigint;
amount: bigint;
from: Address;
responseAddress: Address | null;
forwardTonAmount: bigint;
forwardPayload: Cell;
}
export function storeTokenTransferInternal(src: TokenTransferInternal) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(395134233, 32);
b_0.storeUint(src.queryId, 64);
b_0.storeCoins(src.amount);
b_0.storeAddress(src.from);
if (src.responseAddress !== null && src.responseAddress !== undefined) { b_0.storeBit(true).storeAddress(src.responseAddress); } else { b_0.storeBit(false); }
b_0.storeCoins(src.forwardTonAmount);
b_0.storeBuilder(src.forwardPayload.asBuilder());
};
}
export function loadTokenTransferInternal(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 395134233) { throw Error('Invalid prefix'); }
let _queryId = sc_0.loadUintBig(64);
let _amount = sc_0.loadCoins();
let _from = sc_0.loadAddress();
let _responseAddress = sc_0.loadBit() ? sc_0.loadAddress() : null;
let _forwardTonAmount = sc_0.loadCoins();
let _forwardPayload = sc_0.asCell();
return { $$type: 'TokenTransferInternal' as const, queryId: _queryId, amount: _amount, from: _from, responseAddress: _responseAddress, forwardTonAmount: _forwardTonAmount, forwardPayload: _forwardPayload };
}
function loadTupleTokenTransferInternal(source: TupleReader) {
let _queryId = source.readBigNumber();
let _amount = source.readBigNumber();
let _from = source.readAddress();
let _responseAddress = source.readAddressOpt();
let _forwardTonAmount = source.readBigNumber();
let _forwardPayload = source.readCell();
return { $$type: 'TokenTransferInternal' as const, queryId: _queryId, amount: _amount, from: _from, responseAddress: _responseAddress, forwardTonAmount: _forwardTonAmount, forwardPayload: _forwardPayload };
}
function storeTupleTokenTransferInternal(source: TokenTransferInternal) {
let builder = new TupleBuilder();
builder.writeNumber(source.queryId);
builder.writeNumber(source.amount);
builder.writeAddress(source.from);
builder.writeAddress(source.responseAddress);
builder.writeNumber(source.forwardTonAmount);
builder.writeSlice(source.forwardPayload);
return builder.build();
}
function dictValueParserTokenTransferInternal(): DictionaryValue<TokenTransferInternal> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeTokenTransferInternal(src)).endCell());
},
parse: (src) => {
return loadTokenTransferInternal(src.loadRef().beginParse());
}
}
}
export type TokenNotification = {
$$type: 'TokenNotification';
queryId: bigint;
amount: bigint;
from: Address;
forwardPayload: Cell;
}
export function storeTokenNotification(src: TokenNotification) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(1935855772, 32);
b_0.storeUint(src.queryId, 64);
b_0.storeCoins(src.amount);
b_0.storeAddress(src.from);
b_0.storeBuilder(src.forwardPayload.asBuilder());
};
}
export function loadTokenNotification(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 1935855772) { throw Error('Invalid prefix'); }
let _queryId = sc_0.loadUintBig(64);
let _amount = sc_0.loadCoins();
let _from = sc_0.loadAddress();
let _forwardPayload = sc_0.asCell();
return { $$type: 'TokenNotification' as const, queryId: _queryId, amount: _amount, from: _from, forwardPayload: _forwardPayload };
}
function loadTupleTokenNotification(source: TupleReader) {
let _queryId = source.readBigNumber();
let _amount = source.readBigNumber();
let _from = source.readAddress();
let _forwardPayload = source.readCell();
return { $$type: 'TokenNotification' as const, queryId: _queryId, amount: _amount, from: _from, forwardPayload: _forwardPayload };
}
function storeTupleTokenNotification(source: TokenNotification) {
let builder = new TupleBuilder();
builder.writeNumber(source.queryId);
builder.writeNumber(source.amount);
builder.writeAddress(source.from);
builder.writeSlice(source.forwardPayload);
return builder.build();
}
function dictValueParserTokenNotification(): DictionaryValue<TokenNotification> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeTokenNotification(src)).endCell());
},
parse: (src) => {
return loadTokenNotification(src.loadRef().beginParse());
}
}
}
export type TokenBurn = {
$$type: 'TokenBurn';
queryId: bigint;
amount: bigint;
owner: Address;
responseAddress: Address | null;
}
export function storeTokenBurn(src: TokenBurn) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(1499400124, 32);
b_0.storeUint(src.queryId, 64);
b_0.storeCoins(src.amount);
b_0.storeAddress(src.owner);
if (src.responseAddress !== null && src.responseAddress !== undefined) { b_0.storeBit(true).storeAddress(src.responseAddress); } else { b_0.storeBit(false); }
};
}
export function loadTokenBurn(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 1499400124) { throw Error('Invalid prefix'); }
let _queryId = sc_0.loadUintBig(64);
let _amount = sc_0.loadCoins();
let _owner = sc_0.loadAddress();
let _responseAddress = sc_0.loadBit() ? sc_0.loadAddress() : null;
return { $$type: 'TokenBurn' as const, queryId: _queryId, amount: _amount, owner: _owner, responseAddress: _responseAddress };
}
function loadTupleTokenBurn(source: TupleReader) {
let _queryId = source.readBigNumber();
let _amount = source.readBigNumber();
let _owner = source.readAddress();
let _responseAddress = source.readAddressOpt();
return { $$type: 'TokenBurn' as const, queryId: _queryId, amount: _amount, owner: _owner, responseAddress: _responseAddress };
}
function storeTupleTokenBurn(source: TokenBurn) {
let builder = new TupleBuilder();
builder.writeNumber(source.queryId);
builder.writeNumber(source.amount);
builder.writeAddress(source.owner);
builder.writeAddress(source.responseAddress);
return builder.build();
}
function dictValueParserTokenBurn(): DictionaryValue<TokenBurn> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeTokenBurn(src)).endCell());
},
parse: (src) => {
return loadTokenBurn(src.loadRef().beginParse());
}
}
}
export type TokenBurnNotification = {
$$type: 'TokenBurnNotification';
queryId: bigint;
amount: bigint;
owner: Address;
responseAddress: Address | null;
}
export function storeTokenBurnNotification(src: TokenBurnNotification) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(2078119902, 32);
b_0.storeUint(src.queryId, 64);
b_0.storeCoins(src.amount);
b_0.storeAddress(src.owner);
if (src.responseAddress !== null && src.responseAddress !== undefined) { b_0.storeBit(true).storeAddress(src.responseAddress); } else { b_0.storeBit(false); }
};
}
export function loadTokenBurnNotification(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 2078119902) { throw Error('Invalid prefix'); }
let _queryId = sc_0.loadUintBig(64);
let _amount = sc_0.loadCoins();
let _owner = sc_0.loadAddress();
let _responseAddress = sc_0.loadBit() ? sc_0.loadAddress() : null;
return { $$type: 'TokenBurnNotification' as const, queryId: _queryId, amount: _amount, owner: _owner, responseAddress: _responseAddress };
}
function loadTupleTokenBurnNotification(source: TupleReader) {
let _queryId = source.readBigNumber();
let _amount = source.readBigNumber();
let _owner = source.readAddress();
let _responseAddress = source.readAddressOpt();
return { $$type: 'TokenBurnNotification' as const, queryId: _queryId, amount: _amount, owner: _owner, responseAddress: _responseAddress };
}
function storeTupleTokenBurnNotification(source: TokenBurnNotification) {
let builder = new TupleBuilder();
builder.writeNumber(source.queryId);
builder.writeNumber(source.amount);
builder.writeAddress(source.owner);
builder.writeAddress(source.responseAddress);
return builder.build();
}
function dictValueParserTokenBurnNotification(): DictionaryValue<TokenBurnNotification> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeTokenBurnNotification(src)).endCell());
},
parse: (src) => {
return loadTokenBurnNotification(src.loadRef().beginParse());
}
}
}
export type TokenExcesses = {
$$type: 'TokenExcesses';
queryId: bigint;
}
export function storeTokenExcesses(src: TokenExcesses) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(3576854235, 32);
b_0.storeUint(src.queryId, 64);
};
}
export function loadTokenExcesses(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 3576854235) { throw Error('Invalid prefix'); }
let _queryId = sc_0.loadUintBig(64);
return { $$type: 'TokenExcesses' as const, queryId: _queryId };
}
function loadTupleTokenExcesses(source: TupleReader) {
let _queryId = source.readBigNumber();
return { $$type: 'TokenExcesses' as const, queryId: _queryId };
}
function storeTupleTokenExcesses(source: TokenExcesses) {
let builder = new TupleBuilder();
builder.writeNumber(source.queryId);
return builder.build();
}
function dictValueParserTokenExcesses(): DictionaryValue<TokenExcesses> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeTokenExcesses(src)).endCell());
},
parse: (src) => {
return loadTokenExcesses(src.loadRef().beginParse());
}
}
}
export type TokenUpdateContent = {
$$type: 'TokenUpdateContent';
content: Cell | null;
}
export function storeTokenUpdateContent(src: TokenUpdateContent) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(201882270, 32);
if (src.content !== null && src.content !== undefined) { b_0.storeBit(true).storeRef(src.content); } else { b_0.storeBit(false); }
};
}
export function loadTokenUpdateContent(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 201882270) { throw Error('Invalid prefix'); }
let _content = sc_0.loadBit() ? sc_0.loadRef() : null;
return { $$type: 'TokenUpdateContent' as const, content: _content };
}
function loadTupleTokenUpdateContent(source: TupleReader) {
let _content = source.readCellOpt();
return { $$type: 'TokenUpdateContent' as const, content: _content };
}
function storeTupleTokenUpdateContent(source: TokenUpdateContent) {
let builder = new TupleBuilder();
builder.writeCell(source.content);
return builder.build();
}
function dictValueParserTokenUpdateContent(): DictionaryValue<TokenUpdateContent> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeTokenUpdateContent(src)).endCell());
},
parse: (src) => {
return loadTokenUpdateContent(src.loadRef().beginParse());
}
}
}
export type JettonData = {
$$type: 'JettonData';
totalSupply: bigint;
mintable: boolean;
owner: Address;
content: Cell | null;
walletCode: Cell;
}
export function storeJettonData(src: JettonData) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeInt(src.totalSupply, 257);
b_0.storeBit(src.mintable);
b_0.storeAddress(src.owner);
if (src.content !== null && src.content !== undefined) { b_0.storeBit(true).storeRef(src.content); } else { b_0.storeBit(false); }
b_0.storeRef(src.walletCode);
};
}
export function loadJettonData(slice: Slice) {
let sc_0 = slice;
let _totalSupply = sc_0.loadIntBig(257);
let _mintable = sc_0.loadBit();
let _owner = sc_0.loadAddress();
let _content = sc_0.loadBit() ? sc_0.loadRef() : null;
let _walletCode = sc_0.loadRef();
return { $$type: 'JettonData' as const, totalSupply: _totalSupply, mintable: _mintable, owner: _owner, content: _content, walletCode: _walletCode };
}
function loadTupleJettonData(source: TupleReader) {
let _totalSupply = source.readBigNumber();
let _mintable = source.readBoolean();
let _owner = source.readAddress();
let _content = source.readCellOpt();
let _walletCode = source.readCell();
return { $$type: 'JettonData' as const, totalSupply: _totalSupply, mintable: _mintable, owner: _owner, content: _content, walletCode: _walletCode };
}
function storeTupleJettonData(source: JettonData) {
let builder = new TupleBuilder();
builder.writeNumber(source.totalSupply);
builder.writeBoolean(source.mintable);
builder.writeAddress(source.owner);
builder.writeCell(source.content);
builder.writeCell(source.walletCode);
return builder.build();
}
function dictValueParserJettonData(): DictionaryValue<JettonData> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeJettonData(src)).endCell());
},
parse: (src) => {
return loadJettonData(src.loadRef().beginParse());
}
}
}
export type JettonWalletData = {
$$type: 'JettonWalletData';
balance: bigint;
owner: Address;
master: Address;
walletCode: Cell;
}
export function storeJettonWalletData(src: JettonWalletData) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeInt(src.balance, 257);
b_0.storeAddress(src.owner);
b_0.storeAddress(src.master);
b_0.storeRef(src.walletCode);
};
}
export function loadJettonWalletData(slice: Slice) {
let sc_0 = slice;
let _balance = sc_0.loadIntBig(257);
let _owner = sc_0.loadAddress();
let _master = sc_0.loadAddress();
let _walletCode = sc_0.loadRef();
return { $$type: 'JettonWalletData' as const, balance: _balance, owner: _owner, master: _master, walletCode: _walletCode };
}
function loadTupleJettonWalletData(source: TupleReader) {
let _balance = source.readBigNumber();
let _owner = source.readAddress();
let _master = source.readAddress();
let _walletCode = source.readCell();
return { $$type: 'JettonWalletData' as const, balance: _balance, owner: _owner, master: _master, walletCode: _walletCode };
}
function storeTupleJettonWalletData(source: JettonWalletData) {
let builder = new TupleBuilder();
builder.writeNumber(source.balance);
builder.writeAddress(source.owner);
builder.writeAddress(source.master);
builder.writeCell(source.walletCode);
return builder.build();
}
function dictValueParserJettonWalletData(): DictionaryValue<JettonWalletData> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeJettonWalletData(src)).endCell());
},
parse: (src) => {
return loadJettonWalletData(src.loadRef().beginParse());
}
}
}
export type Mint = {
$$type: 'Mint';
amount: bigint;
}
export function storeMint(src: Mint) {
return (builder: Builder) => {
let b_0 = builder;
b_0.storeUint(33240155, 32);
b_0.storeInt(src.amount, 257);
};
}
export function loadMint(slice: Slice) {
let sc_0 = slice;
if (sc_0.loadUint(32) !== 33240155) { throw Error('Invalid prefix'); }
let _amount = sc_0.loadIntBig(257);
return { $$type: 'Mint' as const, amount: _amount };
}
function loadTupleMint(source: TupleReader) {
let _amount = source.readBigNumber();
return { $$type: 'Mint' as const, amount: _amount };
}
function storeTupleMint(source: Mint) {
let builder = new TupleBuilder();
builder.writeNumber(source.amount);
return builder.build();
}
function dictValueParserMint(): DictionaryValue<Mint> {
return {
serialize: (src, buidler) => {
buidler.storeRef(beginCell().store(storeMint(src)).endCell());
},
parse: (src) => {
return loadMint(src.loadRef().beginParse());
}
}
}
async function SampleJetton_init(owner: Address, content: Cell | null) {
const __init = 'te6ccgEBBwEASwABFP8A9KQT9LzyyAsBAgFiAgMCAs0EBQAJoUrd4AkAAdQBFdOD+CZGYhmm2eZMBgA0UEP6AgHPFiJus5Z/AcoAEsyVMnBYygDiygA=';
const __code = 'te6ccgECQwEABKMAART/APSkE/S88sgLAQIBYgIDAgLKBAUCASAGBwIBIAwNAgFIICEBDb4o7tnngVQWAgFICAkCAVgKCwCVt3owTgudh6ullc9j0J2HOslQo2zQThO6xqWlbI+WZFp15b++LEcwThhMiKTJr7fJFy9sM7TqukCwTggZzq084r86ShYDrC3EyPZQARGtvO2eKoH4EsAWARGvFu2eeBN4DUAWAgHODg8CAVgaGwSdO2i7ftwIddJwh+VMCDXCx/eAtDTAwFxsMABkX+RcOIB+kAiUGZvBPhhApFb4CCCCfs0W7qPjzDbPATbPDEQNEEw8CvbPOAgghAMCHqeuoBYQFxEACwgbvLQgIAAk0x8Bggn7NFu68uCBgQEB1wABBDSPjzDbPATbPDEQNEEw8C3bPOAgghB73ZfeuhYSFxMALtMfAYIQDAh6nrry4IHSAAGR1JJtAeIBBDCPkzDbPATbPDQQZxBWEEVVAvAu2zzgwAAWFBcVAEzTHwGCEHvdl9668uCB0z/6APpAAQH6QCHXCwHDAJEBkjFt4hRDMAJwjzD5AYLwzQ2YbLGi9GiucIn0/DFiwRbl9T+9EaaDn1Lb9QQIMLK6jwjbPPAs2zzbMeCRMOLywIIWFwEW7UTQ1AH4Yts8bBQYARjI+EIBzFUw2zzJ7VQZACb6APpAAQHSAAGR1JJtAeLSAFUwADRQQ/oCAc8WIm6zln8BygASzJUycFjKAOLKAAABagIBIBwdAAVcjJgCASAeHwADNCAACTwHfAegAgEgIiMCASA1NgIBICQlAgEgLS4CASAmJwIBICorAEscFnIcAHLAXMBywFwAcsAEszMyfkAyHIBywFwAcsAEsoHy//J0IAL3MhxAcoBUAcBygBwAcoCUAXPFlAD+gJwAcpoI26zJW6zsY5GfwHKAMhwAcoAcAHKACRus5p/AcoABPABUATMljQDcAHKAOIkbrOafwHKAATwAVAEzJY0A3ABygDicAHKAAJ/AcoAAslYzJczMwFwAcoA4iFus+MPyQH7AICgpABJ/AcoAAfABAcwACjFwAcoAARMcAPIzEMT2zzJgLABRALQ9AQwbQGCANivAYAQ9A9vofLghwGCANivIgKAEPQXyPQAyUAD8CKAAGlAjgQEBzwABzxYBzxYCASAvMAIBIDEyAA8+EL4KFjwI4AANPAkbELwIIAAPPgo8CQwQzCABUxRYaBVMfAkXPAgcHCAQCH4KCHwHxA1EE4QIxAv2zxFYBBKEDlAqfAhWoDMBDMhVUNs8yTQAToIQF41FGVAHyx8Vyz9QA/oCAc8WASBulTBwAcsBks8W4gH6AgHPFgIBIDc4AgEgPT4CASA5OgIBIDs8ADk+EFvJBAjXwNVQPAkAYERTQLwIFAGxwUV8vRVAoAAdPhBbyQQI18DI8cF8uCEgAAkECNfA4AAXPhBbyQQI18DZvAngAgEgP0ABU0EEcQNkV38ChQNKElbrOOk3AG8AFwgEIH2zwQSEEwF21t8CGSNDTiQwCEEAIz4QW8kECNfA4IQO5rKACHwJ4AAPFUw8CkxQTCABCsgB2zzJQgAWghDVMnbbWMsfyz8=';
const __system = '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';
let systemCell = Cell.fromBase64(__system);
let builder = new TupleBuilder();
builder.writeCell(systemCell);
builder.writeAddress(owner);
builder.writeCell(content);
let __stack = builder.build();
let codeCell = Cell.fromBoc(Buffer.from(__code, 'base64'))[0];
let initCell = Cell.fromBoc(Buffer.from(__init, 'base64'))[0];
let system = await ContractSystem.create();
let executor = await ContractExecutor.create({ code: initCell, data: new Cell() }, system);
let res = await executor.get('init', __stack);
if (!res.success) { throw Error(res.error); }
if (res.exitCode !== 0 && res.exitCode !== 1) {
if (SampleJetton_errors[res.exitCode]) {
throw new ComputeError(SampleJetton_errors[res.exitCode].message, res.exitCode, { logs: res.vmLogs });
} else {
throw new ComputeError('Exit code: ' + res.exitCode, res.exitCode, { logs: res.vmLogs });
}
}
let data = res.stack.readCell();
return { code: codeCell, data };
}
const SampleJetton_errors: { [key: number]: { message: string } } = {
2: { message: `Stack undeflow` },
3: { message: `Stack overflow` },
4: { message: `Integer overflow` },
5: { message: `Integer out of expected range` },
6: { message: `Invalid opcode` },
7: { message: `Type check error` },
8: { message: `Cell overflow` },
9: { message: `Cell underflow` },
10: { message: `Dictionary error` },
13: { message: `Out of gas error` },
32: { message: `Method ID not found` },
34: { message: `Action is invalid or not supported` },
37: { message: `Not enough TON` },
38: { message: `Not enough extra-currencies` },
128: { message: `Null reference exception` },
129: { message: `Invalid serialization prefix` },
130: { message: `Invalid incoming message` },
131: { message: `Constraints error` },
132: { message: `Access denied` },
133: { message: `Contract stopped` },
134: { message: `Invalid argument` },
135: { message: `Code of a contract was not found` },
136: { message: `Invalid address` },
4429: { message: `Invalid sender` },
13650: { message: `Invalid bounced message` },
16059: { message: `Invalid value` },
62972: { message: `Invalid balance` },
}
export class SampleJetton implements Contract {
static async init(owner: Address, content: Cell | null) {
return await SampleJetton_init(owner,content);
}
static async fromInit(owner: Address, content: Cell | null) {
const init = await SampleJetton_init(owner,content);
const address = contractAddress(0, init);
return new SampleJetton(address, init);
}
static fromAddress(address: Address) {
return new SampleJetton(address);
}
readonly address: Address;
readonly init?: { code: Cell, data: Cell };
readonly abi: ContractABI = {
errors: SampleJetton_errors
};
private constructor(address: Address, init?: { code: Cell, data: Cell }) {
this.address = address;
this.init = init;
}
async send(provider: ContractProvider, via: Sender, args: { value: bigint, bounce?: boolean| null | undefined }, message: Mint | 'Mint!' | TokenUpdateContent | TokenBurnNotification) {
let body: Cell | null = null;
if (message && typeof message === 'object' && !(message instanceof Slice) && message.$$type === 'Mint') {
body = beginCell().store(storeMint(message)).endCell();
}
if (message === 'Mint!') {
body = beginCell().storeUint(0, 32).storeStringTail(message).endCell();
}
if (message && typeof message === 'object' && !(message instanceof Slice) && message.$$type === 'TokenUpdateContent') {
body = beginCell().store(storeTokenUpdateContent(message)).endCell();
}
if (message && typeof message === 'object' && !(message instanceof Slice) && message.$$type === 'TokenBurnNotification') {
body = beginCell().store(storeTokenBurnNotification(message)).endCell();
}
if (body === null) { throw new Error('Invalid message type'); }
await provider.internal(via, { ...args, body: body });
}
async getGetWalletAddress(provider: ContractProvider, owner: Address) {
let builder = new TupleBuilder();
builder.writeAddress(owner);
let source = (await provider.get('get_wallet_address', builder.build())).stack;
let result = source.readAddress();
return result;
}
async getGetJettonData(provider: ContractProvider) {
let builder = new TupleBuilder();
let source = (await provider.get('get_jetton_data', builder.build())).stack;
const result = loadTupleJettonData(source);
return result;
}
async getOwner(provider: ContractProvider) {
let builder = new TupleBuilder();
let source = (await provider.get('owner', builder.build())).stack;
let result = source.readAddress();
return result;
}
}
Loading…
Cancel
Save