PR
Comments
New!
藻緯羅さん
New!
USM1さん
GKenさんCategory
Keyword Search
Freepage List
Shopping List
Name
Each smart contract within a chaincode is uniquely identified by its contract name. A smart contract can explicitly assign this name when the class is constructed, or let the
Contract
class implicitly assign a default name.
チェインコード内の各スマート契約はユニークにその契約名によって特定されます。そのクラスが構築されるとき、スマート契約は明示的にこの名前を割り当てるか、あるいは その契約クラス に暗黙のうちに省略時名を割り当てさせることができます。
Examine the
papercontract.js
chaincode
file
:
手形契約 .js
チェインコードファイルを調べてください:
class CommercialPaperContract extends Contract {
クラス 商業手形契約 が契約を拡張{
constructor () {
生成関数 () {
// Unique name when multiple contracts per chaincode file
/ / チェインコードファイル毎に複数の契約のユニークな名前
super ( 'org.papernet.commercialpaper' );
最高の(「 org.papernet. 商業手形 r 」);
}
}
See how the
CommercialPaperContract
constructor specifies the contract name as
org.papernet.commercialpaper
. The result is that within the
papercontract
chaincode, this smart contract is now associated with the contract name
org.papernet.commercialpaper
.
商業手形契約構築者 が org.papernet.
商業手形としてどのように契約名を指定するか見てください。 結果は手形契約チェインコード内で、このスマート契約が今契約 名前 org.papernet.
商業手形 と結び付けられるということです。
If an explicit contract name is not specified, then a default name is assigned – the name of the class. In our example, the default contract name would be
CommercialPaperContract
.
もし明示的な契約名が指定されないなら、省略時名-クラスの名前が割り当てられます。 我々の例で、省略時値契約名は商業手形契約となるでしょう。
Choose your names carefully. It’s not just that each smart contract must have a unique name; a well-chosen name is illuminating. Specifically, using an explicit DNS-style naming convention is recommended to help organize clear and meaningful names;
org.papernet.commercialpaper
conveys that the PaperNet network has defined a standard commercial paper smart contract.
慎重にあなたの名前を選択してください。 ただそれぞれのスマート契約がユニークな名前を持っていなくてはならないだけでありません;精選された名前が解明的です。 特に、明示的な DNS
様式のネーミング規定を使うことが明確な、そして意味を持つ名前を組織する助けとなるために勧められます; org.papernet.
商業手形 PaperNet
ネットワークが標準的な商業手形のスマート契約を定義してきています。
Contract names are also helpful to disambiguate different smart contract transaction functions with the same name in a given chaincode. This happens when smart contracts are closely related; their transaction names will tend to be the same. We can see that a transaction is uniquely defined within a channel by the combination of its chaincode and smart contract name.
契約名は同じく所定のチェインコード で同名で異なったスマート契約トランザクション機能のあいまいさを排除するために助けになります。 スマート契約が密接に関連しているとき、このことが起きます;それらのトランザクション名は同じである傾向があるでしょう。 我々はトランザクションがユニークにその チェインコードとスマート契約名の組合せによってチャンネル内で定義されるのを見ることができます。
Contract names must be unique within a chaincode file. Some code editors will detect multiple definitions of the same class name before deployment. Regardless the chaincode will return an error if multiple classes with the same contract name are explicitly or implicitly specified.
契約名声は チェインコード ファイル内でユニークでなければなりません。 若干の符号エデイターは配置の前に同じクラス名の複数の定義を発見するでしょう。 いずれにしても、もし同じ契約名を持っている複数のクラスが明示的に、あるいは暗黙のうちに指定されるなら、チェインコード は誤りを返すでしょう。
=========================
インターネット・コンピュータランキング 【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時点)
ブロックチェーンインフラから利益を得る1… 2026.11.20
レイヤー1とレイヤー2のブロックチェーン… 2026.10.30
(2)レイヤー1とレイヤー2のブロックチェ… 2026.10.29