diff --git a/Comments/comment_contract.go b/Comment/comment_contract.go similarity index 100% rename from Comments/comment_contract.go rename to Comment/comment_contract.go diff --git a/Forums/forum_contract.go b/Forum/forum_contract.go similarity index 100% rename from Forums/forum_contract.go rename to Forum/forum_contract.go diff --git a/Post/go.mod b/Post/go.mod new file mode 100644 index 0000000..54d9ecd --- /dev/null +++ b/Post/go.mod @@ -0,0 +1,8 @@ +module Post + +go 1.21.5 + +require ( + github.com/google/uuid v1.5.0 + github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231127165613-b35f351f0ba0 +) diff --git a/Post/go.sum b/Post/go.sum new file mode 100644 index 0000000..f307cf7 --- /dev/null +++ b/Post/go.sum @@ -0,0 +1,4 @@ +github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= +github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231127165613-b35f351f0ba0 h1:N+dMIBmteXjJpkH6UZ7HmNftuFxkqszfGLbhsEctnv0= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231127165613-b35f351f0ba0/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= diff --git a/Post/neo-go.yml b/Post/neo-go.yml new file mode 100644 index 0000000..3d6eb32 --- /dev/null +++ b/Post/neo-go.yml @@ -0,0 +1,11 @@ +name: Post +sourceurl: http://example.com/ +safemethods: [] +supportedstandards: [] +events: + - name: Hello world! + parameters: + - name: args + type: Array +permissions: + - methods: '*' diff --git a/Posts/post_contract.go b/Post/post_contract.go similarity index 95% rename from Posts/post_contract.go rename to Post/post_contract.go index e0f2c9c..4491172 100644 --- a/Posts/post_contract.go +++ b/Post/post_contract.go @@ -4,6 +4,7 @@ import ( guuid "github.com/google/uuid" "github.com/nspcc-dev/neo-go/pkg/interop/native/std" "github.com/nspcc-dev/neo-go/pkg/interop/storage" + //"github.com/nspcc-dev/neo-go/pkg/interop/runtime" ) type Post struct { @@ -37,7 +38,7 @@ func NewPost(authorId string, text string, hashTags []string, threadId string) { hashTags: hashTags, authorId: authorId, dislikes: 0, - Likes: 0, + likes: 0, category: "none", threadId: threadId, id: guuid.New(), diff --git a/Posts/posts_storage.json b/Posts/posts_storage.json deleted file mode 100644 index e69de29..0000000 diff --git a/Users/user_contract.go b/User/user_contract.go similarity index 100% rename from Users/user_contract.go rename to User/user_contract.go