我有一个类似这样的智能合约
contract Foo {
struct Post() {
....
}
mapping (uint256 => Post) private posts;
mapping (uint256 => address) private owners;
}
我有一个用 Python 编写的后端代码:
post_matchings = {}
@hug.post('match/post_id/')
def match_file(file_id, post_id):
1. raise error, if caller of this endpoint is not owner of the post.
2. Do something.
我怎样才能做到这一点?通过使用签名?
谢谢你的帮助。