You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

133 lines
4.1 KiB

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);
}
(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);
}
}
int __tact_address_eq(slice a, slice b) inline {
return equal_slice_bits(a, b);
}
(slice, ((slice))) __gen_read_SetLinkerNeighbor(slice sc_0) inline_ref {
throw_unless(129, sc_0~load_uint(32) == 3019699393);
var v'neighbor = sc_0~__tact_load_address_opt();
return (sc_0, (v'neighbor));
}
builder __gen_write_Linker(builder build_0, (int, slice, slice, slice) v) inline_ref {
var (v'index, v'master, v'owner, v'neighbor) = v;
build_0 = build_0.store_int(v'index, 257);
build_0 = __tact_store_address(build_0, v'master);
build_0 = __tact_store_address_opt(build_0, v'owner);
var build_1 = begin_cell();
build_1 = __tact_store_address_opt(build_1, v'neighbor);
build_0 = store_ref(build_0, build_1.end_cell());
return build_0;
}
(slice, ((int, slice, slice, slice))) __gen_read_Linker(slice sc_0) inline_ref {
var v'index = sc_0~load_int(257);
var v'master = sc_0~__tact_load_address();
var v'owner = sc_0~__tact_load_address_opt();
slice sc_1 = sc_0~load_ref().begin_parse();
var v'neighbor = sc_1~__tact_load_address_opt();
return (sc_0, (v'index, v'master, v'owner, v'neighbor));
}
(int, slice, slice, slice) __gen_load_Linker() inline_ref {
slice sc = get_data().begin_parse();
__tact_context_sys = sc~load_ref();
return sc~__gen_read_Linker();
}
() __gen_store_Linker((int, slice, slice, slice) v) impure inline_ref {
builder b = begin_cell();
b = b.store_ref(__tact_context_sys);
b = __gen_write_Linker(b, v);
set_data(b.end_cell());
}
(((int, slice, slice, slice)), ()) $__gen_Linker_receive_SetLinkerNeighbor((int, slice, slice, slice) $self, (slice) $msg) impure {
var ($self'index, $self'master, $self'owner, $self'neighbor) = $self;
var ($msg'neighbor) = $msg;
var ($ctx'bounced, $ctx'sender, $ctx'value, $ctx'raw) = __tact_context_get();
throw_unless(4429, __tact_address_eq($ctx'sender, $self'master));
$self'neighbor = $msg'neighbor;
return (($self'index, $self'master, $self'owner, $self'neighbor), ());
}
() 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 SetLinkerNeighbor message
if (op == 3019699393) {
var self = __gen_load_Linker();
var msg = in_msg~__gen_read_SetLinkerNeighbor();
self~$__gen_Linker_receive_SetLinkerNeighbor(msg);
__gen_store_Linker(self);
return ();
}
throw(130);
}
_ supported_interfaces() method_id {
return (
"org.ton.introspection.v0"H >> 128,
"org.ton.abi.ipfs.v0"H >> 128
);
}
_ get_abi_ipfs() {
return "ipfs://QmT79j24zg2Re4mVCSdgbcXVAfBwfhsZveFUwQHpdgYjCU";
}