【发布时间】:2019-09-07 14:18:05
【问题描述】:
在游戏示例中的 plutus playground 中有一个功能
-- | The "startGame" contract endpoint, telling the wallet to start watching
-- the address of the game script. See note [Contract endpoints]
startGame :: MonadWallet m => m ()
startGame =
-- 'startWatching' is a function of the wallet API. It instructs the wallet
-- to keep track of all outputs at the address. Player 2 needs to call
-- 'startGame' before Player 1 uses the 'lock' endpoint, to ensure that
-- Player 2's wallet is aware of the game address.
startWatching gameAddress
我不喜欢
Player 2 needs to call
'startGame' before Player 1 uses the 'lock' endpoint, to ensure that
Player 2's wallet is aware of the game address.
真的没有办法连接到游戏之后游戏启动(lock函数被调用)?
我们需要这个功能吗?我们可以只使用guess 和lock 函数吗?
我可以理解 startWatching 对轻钱包/客户端(使用 merkle 证明来验证交易)有何意义,但不理解 startGame 函数对完整客户端有何用处。 (其实我不会,轻量级的客户端应该还是可以从其他需求中询问信息的)
【问题讨论】:
标签: haskell smartcontracts cardano plutus