mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
tonlib use correct c7: config and address when executing
This commit is contained in:
parent
64615a9766
commit
7dc980562f
7 changed files with 99 additions and 38 deletions
|
@ -26,6 +26,7 @@
|
|||
#include "td/utils/crypto.h"
|
||||
|
||||
#include "block/block.h"
|
||||
#include "block/mc-config.h"
|
||||
|
||||
namespace ton {
|
||||
class SmartContract : public td::CntObject {
|
||||
|
@ -48,6 +49,7 @@ class SmartContract : public td::CntObject {
|
|||
td::Ref<vm::Cell> actions;
|
||||
td::int32 code;
|
||||
td::int64 gas_used;
|
||||
td::ConstBitPtr missing_library{0};
|
||||
static int output_actions_count(td::Ref<vm::Cell> list);
|
||||
};
|
||||
|
||||
|
@ -61,6 +63,10 @@ class SmartContract : public td::CntObject {
|
|||
td::uint64 amount{0};
|
||||
td::uint64 balance{0};
|
||||
|
||||
td::optional<block::StdAddress> address;
|
||||
td::optional<std::shared_ptr<const block::Config>> config;
|
||||
td::optional<vm::Dictionary> libraries;
|
||||
|
||||
Args() {
|
||||
}
|
||||
Args(std::initializer_list<vm::StackEntry> stack)
|
||||
|
@ -106,6 +112,18 @@ class SmartContract : public td::CntObject {
|
|||
this->balance = balance;
|
||||
return std::move(*this);
|
||||
}
|
||||
Args&& set_address(block::StdAddress address) {
|
||||
this->address = address;
|
||||
return std::move(*this);
|
||||
}
|
||||
Args&& set_config(std::shared_ptr<const block::Config>& config) {
|
||||
this->config = config;
|
||||
return std::move(*this);
|
||||
}
|
||||
Args&& set_libraries(vm::Dictionary libraries) {
|
||||
this->libraries = libraries;
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
td::Result<td::int32> get_method_id() const {
|
||||
if (!method_id) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue