-
Notifications
You must be signed in to change notification settings - Fork 5
/
store_code.go
58 lines (57 loc) · 1.55 KB
/
store_code.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package wasm
//
//import (
// . "github.com/kaifei-bianjie/msg-parser/modules"
//)
//
//type DocMsgStoreCode struct {
// // Sender is the that actor that signed the messages
// Sender string `bson:"sender"`
// // WASMByteCode can be raw or gzip compressed
// WASMByteCode []byte `bson:"wasm_byte_code"`
// // Source is a valid absolute HTTPS URI to the contract's source code, optional
// Source string `bson:"source"`
// // Builder is a valid docker image name with tag, optional
// Builder string `bson:"builder"`
// // InstantiatePermission access control to apply on contract creation, optional
// InstantiatePermission AccessConfig `bson:"instantiate_permission"`
//}
//
//type AccessConfig struct {
// Permission string `bson:"permission"`
// Address string `bson:"address"`
//}
//
//func (m *DocMsgStoreCode) GetType() string {
// return MsgTypeStoreCode
//}
//
//func (m *DocMsgStoreCode) BuildMsg(v interface{}) {
// msg := v.(*MsgStoreCode)
// m.Sender = msg.Sender
// //m.WASMByteCode = msg.WASMByteCode
// m.Source = msg.Source
// m.Builder = msg.Builder
// if msg.InstantiatePermission != nil {
// m.InstantiatePermission = AccessConfig{
// Permission: msg.InstantiatePermission.Permission.String(),
// Address: msg.InstantiatePermission.Address,
// }
// }
//
//}
//
//func (m *DocMsgStoreCode) HandleTxMsg(v SdkMsg) MsgDocInfo {
// var (
// addrs []string
// msg MsgStoreCode
// )
//
// ConvertMsg(v, &msg)
// addrs = append(addrs, msg.Sender)
// handler := func() (Msg, []string) {
// return m, addrs
// }
//
// return CreateMsgDocInfo(v, handler)
//}