2.3 FizzBuzz
This example is not the traditional FizzBuzz; instead it is the smart contract version! A script can call the fizzbuzz
ABI method of this contract with some u64
value and receive back its fizzbuzzability as an enum
.
这个例子不是传统的 FizzBuzz;相反,它是智能合约的版本!脚本可以使用一些 u64
值调用此合约的 fizzbuzz
ABI 方法,并将其 fizzbuzzability
作为 enum
返回。
The format for custom structs and enums such as FizzBuzzResult
will be automatically included in the ABI JSON so that off-chain code can handle the encoded form of the returned data.
FizzBuzzResult
等自定义结构和枚举的格式,将自动包含在 ABI JSON 中,以便链下代码可以处理返回数据的编码形式。
Last updated