|
|
|
() __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 __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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
builder __gen_write_TONBWallet(builder build_0, (int, slice, slice, slice) v) inline_ref {
|
|
|
|
var (v'balance, v'owner, v'master, v'linker) = 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);
|
|
|
|
var build_1 = begin_cell();
|
|
|
|
build_1 = __tact_store_address_opt(build_1, v'linker);
|
|
|
|
build_0 = store_ref(build_0, build_1.end_cell());
|
|
|
|
return build_0;
|
|
|
|
}
|
|
|
|
|
|
|
|
cell $__gen_TONBWallet_init(cell sys', slice $master, slice $owner) {
|
|
|
|
var (($self'balance, $self'owner, $self'master, $self'linker)) = (null(), null(), null(), null());
|
|
|
|
$self'balance = 0;
|
|
|
|
$self'owner = $owner;
|
|
|
|
$self'master = $master;
|
|
|
|
var b' = begin_cell();
|
|
|
|
b' = b'.store_ref(sys');
|
|
|
|
b' = __gen_write_TONBWallet(b', ($self'balance, $self'owner, $self'master, $self'linker));
|
|
|
|
return b'.end_cell();
|
|
|
|
}
|
|
|
|
|
|
|
|
cell init(cell sys', slice $$master, slice $$owner) method_id {
|
|
|
|
slice $master = $$master;
|
|
|
|
slice $owner = $$owner;
|
|
|
|
return $__gen_TONBWallet_init(sys', $master, $owner);
|
|
|
|
}
|
|
|
|
|
|
|
|
() main() {
|
|
|
|
}
|