1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Update op-code for provider/contract interaction (#602)

* Update provider->contract deploy_contract op-code

* Switch to B{} representation of child contracts
This commit is contained in:
EmelyanenkoK 2023-02-02 12:28:41 +03:00 committed by GitHub
parent 681b494410
commit 7a78ea33b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 31 additions and 22 deletions

View file

@ -258,9 +258,13 @@ void StorageProvider::process_transaction(tl_object_ptr<tonlib_api::raw_transact
}
td::Ref<vm::Cell> body = r_body.move_as_ok();
vm::CellSlice cs = vm::load_cell_slice(body);
// const op::offer_storage_contract = 0x107c49ef;
if (cs.size() >= 32 && cs.prefetch_long(32) == 0x107c49ef) {
new_contract_address = message->destination_->account_address_;
if (cs.size() >= 32) {
long long op_code = cs.prefetch_long(32);
// const op::offer_storage_contract = 0x107c49ef; -- old versions
// const op::deploy_storage_contract = 0xe4748df1; -- new versions
if((op_code == 0x107c49ef) || (op_code == 0xe4748df1)) {
new_contract_address = message->destination_->account_address_;
}
}
}
if (!new_contract_address.empty()) {