【发布时间】:2022-08-18 22:52:36
【问题描述】:
嘿,伙计们,我想知道我可以为一个algorand 智能合约或 dapp 拥有多少个全局变量?
我目前正在使用 pyteal 为我的 dapp 编写智能联系人。
标签: algorand
嘿,伙计们,我想知道我可以为一个algorand 智能合约或 dapp 拥有多少个全局变量?
我目前正在使用 pyteal 为我的 dapp 编写智能联系人。
标签: algorand
你可以检查一下Pyteals official documentation here
基本上你可以有 12 个全局变量,包括:
你可以获取区块链的当前状态在您的 dapp 中使用上述全局变量。
【讨论】:
Algorand 上的智能合约目前可以具有:
页面https://developer.algorand.org/docs/get-details/parameter_tables/#smart-contract-constraints 表示当前参数。
您需要在创建时指定多少个全局变量和局部变量及其类型。
【讨论】: