在游戏示例中的 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
功能对完整客户端有何用处。(其实我没有,轻量级的客户端应该还是可以从其他需求中询问信息)