This commit is contained in:
Reg1str 2024-01-16 14:54:54 +03:00
parent 0358a1f918
commit d33e0d9058

View file

@ -24,12 +24,15 @@ PORT = 2281
Handler = MyHttpRequestHandler
def compile_and_deploy_contract():
password = 'one'
# User
user_compile_command = "neo-go contract compile -i User/user.go -c User/user.yml -m User/user.json"
subprocess.run(user_compile_command, shell=True, check=True)
user_deploy_command = "neo-go contract deploy -i User/user.nef -w /home/ftmi-krasotka/Desktop/frostfs_test/frostfs-aio/morph/node-wallet.json -r http://localhost:30333 -m User/user.json"
subprocess.run(user_deploy_command, shell=True, check=True)
result_user = subprocess.check_output(password, shell=True, text=True).stdout[-40:]
print(result_user)
# Post
post_compile_command = "neo-go contract compile -i Post/post_contract.go -c Post/post_contract.yml -m Post/post_contract.json"
@ -37,6 +40,8 @@ def compile_and_deploy_contract():
post_deploy_command = "neo-go contract deploy -i Post/post_contract.nef -w /home/ftmi-krasotka/Desktop/frostfs_test/frostfs-aio/morph/node-wallet.json -r http://localhost:30333 -m Post/post_contract.json"
subprocess.run(post_deploy_command, shell=True, check=True)
result_post = subprocess.check_output(password, shell=True, text=True).stdout[-40:]
print(result_post)
# Comment
comment_compile_command = "neo-go contract compile -i Comment/comment.go -c Comment/comment.yml -m Comment/comment.json"
@ -44,6 +49,8 @@ def compile_and_deploy_contract():
comment_deploy_command = "neo-go contract deploy -i Comment/comment.nef -w /home/ftmi-krasotka/Desktop/frostfs_test/frostfs-aio/morph/node-wallet.json -r http://localhost:30333 -m Comment/comment.json"
subprocess.run(comment_deploy_command, shell=True, check=True)
result_comment = subprocess.check_output(password, shell=True, text=True).stdout[-40:]
print(result_comment)
if __name__ == "__main__":
compile_and_deploy_contract()