mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Merge branch 'testnet' into tvm-v9
This commit is contained in:
commit
77e5a2f4a2
24 changed files with 169 additions and 76 deletions
|
@ -149,16 +149,17 @@ td::Ref<vm::Tuple> prepare_vm_c7(SmartContract::Args args, td::Ref<vm::Cell> cod
|
|||
}
|
||||
|
||||
std::vector<vm::StackEntry> tuple = {
|
||||
td::make_refint(0x076ef1ea), // [ magic:0x076ef1ea
|
||||
td::make_refint(0), // actions:Integer
|
||||
td::make_refint(0), // msgs_sent:Integer
|
||||
td::make_refint(now), // unixtime:Integer
|
||||
td::make_refint(0), //TODO: // block_lt:Integer
|
||||
td::make_refint(0), //TODO: // trans_lt:Integer
|
||||
std::move(rand_seed_int), // rand_seed:Integer
|
||||
block::CurrencyCollection(args.balance).as_vm_tuple(), // balance_remaining:[Integer (Maybe Cell)]
|
||||
vm::load_cell_slice_ref(address), // myself:MsgAddressInt
|
||||
vm::StackEntry::maybe(config) // vm::StackEntry::maybe(td::Ref<vm::Cell>())
|
||||
td::make_refint(0x076ef1ea), // [ magic:0x076ef1ea
|
||||
td::make_refint(0), // actions:Integer
|
||||
td::make_refint(0), // msgs_sent:Integer
|
||||
td::make_refint(now), // unixtime:Integer
|
||||
td::make_refint(0), // block_lt:Integer (TODO)
|
||||
td::make_refint(0), // trans_lt:Integer (TODO)
|
||||
std::move(rand_seed_int), // rand_seed:Integer
|
||||
block::CurrencyCollection(args.balance, args.extra_currencies)
|
||||
.as_vm_tuple(), // balance_remaining:[Integer (Maybe Cell)]
|
||||
vm::load_cell_slice_ref(address), // myself:MsgAddressInt
|
||||
vm::StackEntry::maybe(config) // vm::StackEntry::maybe(td::Ref<vm::Cell>())
|
||||
};
|
||||
if (args.config && args.config.value()->get_global_version() >= 4) {
|
||||
tuple.push_back(vm::StackEntry::maybe(code)); // code:Cell
|
||||
|
|
|
@ -64,6 +64,7 @@ class SmartContract : public td::CntObject {
|
|||
bool ignore_chksig{false};
|
||||
td::uint64 amount{0};
|
||||
td::uint64 balance{0};
|
||||
td::Ref<vm::Cell> extra_currencies;
|
||||
int vm_log_verbosity_level{0};
|
||||
bool debug_enabled{false};
|
||||
|
||||
|
@ -121,6 +122,10 @@ class SmartContract : public td::CntObject {
|
|||
this->balance = balance;
|
||||
return std::move(*this);
|
||||
}
|
||||
Args&& set_extra_currencies(td::Ref<vm::Cell> extra_currencies) {
|
||||
this->extra_currencies = std::move(extra_currencies);
|
||||
return std::move(*this);
|
||||
}
|
||||
Args&& set_address(block::StdAddress address) {
|
||||
this->address = address;
|
||||
return std::move(*this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue