-
Notifications
You must be signed in to change notification settings - Fork 5
/
instantiate_contract.go
52 lines (51 loc) · 1.49 KB
/
instantiate_contract.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
package wasm
//
//import (
// . "github.com/kaifei-bianjie/msg-parser/modules"
// models "github.com/kaifei-bianjie/msg-parser/types"
//)
//
//type DocMsgInstantiateContract struct {
// // Sender is the that actor that signed the messages
// Sender string `bson:"sender"`
// // Admin is an optional address that can execute migrations
// Admin string `bson:"admin"`
// // CodeID is the reference to the stored WASM code
// CodeID int64 `bson:"code_id"`
// // Label is optional metadata to be stored with a contract instance.
// Label string `bson:"label"`
// // InitMsg json encoded message to be passed to the contract on instantiation
// InitMsg string `bson:"init_msg"`
// // InitFunds coins that are transferred to the contract on instantiation
// InitFunds []models.Coin `bson:"init_funds"`
//}
//
//func (m *DocMsgInstantiateContract) GetType() string {
// return MsgTypeInstantiateContract
//}
//
//func (m *DocMsgInstantiateContract) BuildMsg(v interface{}) {
// msg := v.(*MsgInstantiateContract)
// m.Sender = msg.Sender
// m.Admin = msg.Admin
// m.CodeID = msg.CodeID
// m.Label = msg.Label
// m.InitMsg = string(msg.InitMsg)
// m.InitFunds = models.BuildDocCoins(msg.InitFunds)
//
//}
//
//func (m *DocMsgInstantiateContract) HandleTxMsg(v SdkMsg) MsgDocInfo {
// var (
// addrs []string
// msg MsgInstantiateContract
// )
//
// ConvertMsg(v, &msg)
// addrs = append(addrs, msg.Sender, msg.Admin)
// handler := func() (Msg, []string) {
// return m, addrs
// }
//
// return CreateMsgDocInfo(v, handler)
//}