MCPcopy Create free account
hub / github.com/TelegramMessenger/cocoon / deploy_proxy_sc

Method deploy_proxy_sc

runners/proxy/ProxyRunner.cpp:637–650  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

635}
636
637void 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
652void ProxyRunner::wait_sync_proxy_sc(std::string sc_address, td::Promise<td::Unit> promise) {
653 if (!sc_ || sc_->address().rserialize(true) != sc_address) {

Callers

nothing calls this directly

Calls 2

set_errorMethod · 0.80
deployMethod · 0.80

Tested by

no test coverage detected