| 635 | } |
| 636 | |
| 637 | void ProxyRunner::deploy_proxy_sc(std::string sc_address, td::Promise<td::Unit> promise) { |
| 638 | if (!sc_ || sc_->address().rserialize(true) != sc_address) { |
| 639 | return promise.set_error(td::Status::Error(ton::ErrorCode::cancelled, "sc was deleted")); |
| 640 | } |
| 641 | CHECK(sc_); |
| 642 | LOG(INFO) << "deploying proxy SC on address " << sc_->address().rserialize(true); |
| 643 | sc_->deploy([self_id = actor_id(this), sc_address, promise = std::move(promise)](td::Result<td::Unit> R) mutable { |
| 644 | if (R.is_error()) { |
| 645 | promise.set_error(R.move_as_error()); |
| 646 | return; |
| 647 | } |
| 648 | td::actor::send_closure(self_id, &ProxyRunner::wait_sync_proxy_sc, sc_address, std::move(promise)); |
| 649 | }); |
| 650 | } |
| 651 | |
| 652 | void ProxyRunner::wait_sync_proxy_sc(std::string sc_address, td::Promise<td::Unit> promise) { |
| 653 | if (!sc_ || sc_->address().rserialize(true) != sc_address) { |