PR
Comments
New!
GKenさん
New!
藻緯羅さん
New!
USM1さんCategory
Keyword Search
Freepage List
Shopping List
Recall from
papercontract.js
how the
issue
transaction returns a commercial paper response:
手形契約 .js
から、どのように発行トランザクション が商業手形応答を返すか思い出してください:
return
paper
.
toBuffer
();
手形 .
バッファーへ ()
を返す;
You’ll notice a slight quirk – the new
paper
needs to be converted to a buffer before it is returned to the application. Notice how
issue.js
uses the class method
CommercialPaper.fromBuffer()
to rehydrate the response buffer as a commercial paper:
あなたは、それがアプリケーションに戻される前に、新しい手形がバファーに変換される必要があるという、わずかな偶然に気付くでしょう。 発行 .js
が、どのようにクラス メソッド商用手形 .
バッファーから ()
商業手形として応答バッファーを元に戻すために使うか注意してください:
let paper = CommercialPaper . fromBuffer ( issueResponse );
手形 = 商用手形 . バッファーから (発行応答)とする;
This allows
paper
to be used in a natural way in a descriptive completion message:
これは、記述的な終了メッセージで自然の方法で手形が使われることを可能にいます:
console . log ( ` ${ paper . issuer } commercial paper : ${ paper . paperNumber } successfully issued for value ${ paper . faceValue } ` );
コンソール . ログ(「 ${ 手形 . 発行者 } 商業手形: ${ 手形 . 手形番号 } が価格 ${ 手形 . 額面価格 } のために成功裏に発行される」);
See how the same
paper
class has been used in both the application and smart contract – if you structure your code like this, it’ll really help readability and reuse.
同じ手形クラスがどのようにアプリケーションとスマート契約両方で使われてきているか見てください - もしあなたがこのようなあなたの符号を構造化するなら、それは本当に可読率と再使用を助けるでしょう。
As with the transaction proposal, it might appear that the application receives control soon after the smart contract completes, but that’s not the case. Under the covers, the SDK manages the entire consensus process, and notifies the application when it is complete according to the
strategy
connectionOption. If you’re interested in what the SDK does under the covers, read the detailed transaction flow
.
トランザクション提案と同じように、スマート契約が完了するとすぐに、アプリケーションがコントロールを受け取るように見えるかもしれませんが、しかしそれはその場合ではありません。 カバーの下で、 SDK
は全部の合意プロセスを管理して、それが、 戦略接続オプションに従い、完全であるとき、そのアプリケーションに通知します。 もしあなたが SDK
がカバーの下ですることに興味を持っているなら、詳細 トランザクションフロー
を読んでください。
That’s it! In this topic you’ve understood how to call a smart contract from a sample application by examining how MagnetoCorp’s application issues a new commercial paper in PaperNet. Now examine the key ledger and smart contract data structures are designed by in the architecture topic
behind them.
そうです! このトピックであなたは、 MagnetoCorp
のアプリケーションがどのように PaperNet
で新しい商業手形を発行するか吟味することによって、サンプルアプリケーションからどのようにスマート契約を呼ぶべきか理解しました。 今重要な元帳を調べてください、そうすればスマート契約データ構造がそれら背後にアーキテクチャトピックによって設計されます。
=========================
インターネット・コンピュータランキング 【5/3〜5】買えば買うほど★最大10%OFFクーポン コールマン アウトドアワゴン グレー アルペン限定カラー 2000034670 OUTDOORWAGON (テント タープ テーブル チェア 運搬に) Coleman
価格:11000円(税込、送料別) (2022/5/2時点)
Apple Gift Card
価格:50000円(税込、送料無料) (2022/5/2時点)
パナソニック ベビーモニター KX-HC705(ホワイト)【送料無料】
価格:15197円(税込、送料無料) (2022/5/2時点)
Nintendo Switch Joy-Con(L) ネオンブルー/(R) ネオンレッド
価格:32978円(税込、送料無料) (2022/5/2時点)
先端技術情報20260830 2026.08.30
(2)オーシャンプロトコル:2025年第4… 2026.08.18
(1)オーシャンプロトコル:2025年第4… 2026.08.17