delete: _deploy
This commit is contained in:
parent
674c1bf358
commit
9968be4cd9
2 changed files with 0 additions and 27 deletions
|
@ -29,16 +29,7 @@ func _deploy(data interface{}, isUpdate bool) {
|
|||
return
|
||||
}
|
||||
|
||||
args := data.(struct {
|
||||
commentHash interop.Hash160
|
||||
})
|
||||
|
||||
if len(args.commentHash) != interop.Hash160Len {
|
||||
panic("invalid hash")
|
||||
}
|
||||
|
||||
ctx := storage.GetContext()
|
||||
storage.Put(ctx, comment_hash, args.commentHash)
|
||||
storage.Put(ctx, "index_comment", "0")
|
||||
}
|
||||
|
||||
|
|
|
@ -21,27 +21,9 @@ const (
|
|||
lastIndex = "user_post_index"
|
||||
id = "current_post_id"
|
||||
comment_prefix = "comment_"
|
||||
post_hash = "post_hash"
|
||||
gas_decimals = 1_0000_0000
|
||||
)
|
||||
|
||||
func _deploy(data interface{}, isUpdate bool) {
|
||||
if isUpdate {
|
||||
return
|
||||
}
|
||||
|
||||
args := data.(struct {
|
||||
postHash interop.Hash160
|
||||
})
|
||||
|
||||
if len(args.postHash) != interop.Hash160Len {
|
||||
panic("invalid hash")
|
||||
}
|
||||
|
||||
ctx := storage.GetContext()
|
||||
storage.Put(ctx, post_hash, args.postHash)
|
||||
}
|
||||
|
||||
func NewPost(login string, text string, postName string) {
|
||||
ctx := storage.GetContext()
|
||||
updatePostId()
|
||||
|
|
Loading…
Reference in a new issue