Skip to content

Commit

Permalink
wip-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Zerg1996 committed Apr 9, 2024
1 parent eddb185 commit c2f2143
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions llvm/projects/ton-compiler/cpp-sdk/tvm/contract.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,13 +287,8 @@ static inline void tvm_transfer(schema::lazy<schema::MsgAddressInt> dest, unsign
builder b = build(out_msg.info);
b = build(b, out_msg.init);
slice payload_sl = payload.ctos();
if (b.brembits() > payload_sl.sbits()) {
out_msg.body = anyval{payload_sl};
b = build(b, out_msg.body);
} else {
out_msg.body = ref<anyval>{payload_sl};
b = build(b, out_msg.body);
}
out_msg.body = std::optional<ref<anyval>>{payload_sl};
b = build(b, out_msg.body);
tvm_sendmsg(b.endc(), flags);
}
static inline void tvm_transfer(slice dest, unsigned nanograms, unsigned bounce, unsigned flags, cell payload) {
Expand All @@ -317,13 +312,8 @@ static inline void tvm_transfer(slice dest, unsigned nanograms, unsigned bounce,
builder b = build(out_msg.info);
b = build(b, out_msg.init);
slice payload_sl = payload.ctos();
if (b.brembits() > payload_sl.sbits()) {
out_msg.body = anyval{payload_sl};
b = build(b, out_msg.body);
} else {
out_msg.body = ref<anyval>{payload_sl};
b = build(b, out_msg.body);
}
out_msg.body = std::optional<ref<anyval>>{payload_sl};
b = build(b, out_msg.body);
tvm_sendmsg(b.endc(), flags);
}
static inline void tvm_transfer(schema::lazy<schema::MsgAddressInt> dest, unsigned nanograms, bool bounce,
Expand Down

0 comments on commit c2f2143

Please sign in to comment.