Kadena Chainweaver部署约定失败:TX失败:密钥集失败(KEYS-ANY) [英] Kadena Chainweaver Deploy Contract Failure: Tx Failed: Keyset failure (keys-any)
本文介绍了Kadena Chainweaver部署约定失败:TX失败:密钥集失败(KEYS-ANY)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我尝试部署的契约(这是创建chainweaver帐户时存在的默认Hello World):
;;
;; "Hello, world!" smart contract/module
;;
;; To try it out, click "Load into REPL" and type into the repl:
;; (free.hello-world.set-message "universe")
;; (free.hello-world.greet)
;;
;; Check lines 21 and 34 to play with Formal Verification
;;
(namespace "free")
;; Define the module.
(module hello-world MODULE_ADMIN
"A smart contract to greet the world."
; no-op module admin for example purposes.
; in a real contract this could enforce a keyset, or
; tally votes, etc.
(defcap MODULE_ADMIN () true)
(defschema message-schema
@doc "Message schema"
@model [(invariant (!= msg ""))]
msg:string)
(deftable
message:{message-schema})
(defun set-message
(
m:string
)
"Set the message that will be used next"
; uncomment the following to make the model happy!
;(enforce (!= m "") "set-message: must not be empty")
(write message "0" {"msg": m})
)
(defun greet ()
"Do the hello-world dance"
(with-default-read message "0" { "msg": "" } { "msg":= msg }
(format "Hello {}!" [msg])))
)
(create-table message)
(set-message "world")
(greet)
Failure: Tx Failed: Keyset failure (keys-any)
推荐答案
当我将模块名称从Hello-World更改为其他名称时,问题已解决。
更改:
;; Define the module.
(module hello-world MODULE_ADMIN
"A smart contract to greet the world."
至此:
;; Define the module.
(module hello-world-YOUR-UNIQUE-NAME MODULE_ADMIN
"A smart contract to greet the world."
这篇关于Kadena Chainweaver部署约定失败:TX失败:密钥集失败(KEYS-ANY)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文