Commit d324c064 authored by hezhengjun's avatar hezhengjun Committed by 33cn

refactor message interface

parent 465913bc
...@@ -34,33 +34,33 @@ func NewMessage(from Address, to *Address, nonce int64, amount uint64, gasLimit ...@@ -34,33 +34,33 @@ func NewMessage(from Address, to *Address, nonce int64, amount uint64, gasLimit
} }
// From 来源 // From 来源
func (m Message) From() Address { return m.from } func (m *Message) From() Address { return m.from }
// To 目的地址 // To 目的地址
func (m Message) To() *Address { return m.to } func (m *Message) To() *Address { return m.to }
// GasPrice Gas价格 // GasPrice Gas价格
func (m Message) GasPrice() uint32 { return m.gasPrice } func (m *Message) GasPrice() uint32 { return m.gasPrice }
// Value 转账金额 // Value 转账金额
func (m Message) Value() uint64 { return m.amount } func (m *Message) Value() uint64 { return m.amount }
// Nonce nonce值 // Nonce nonce值
func (m Message) Nonce() int64 { return m.nonce } func (m *Message) Nonce() int64 { return m.nonce }
// Data 附带数据 // Data 附带数据
func (m Message) Data() []byte { return m.data } func (m *Message) Data() []byte { return m.data }
// GasLimit Gas限制 // GasLimit Gas限制
func (m Message) GasLimit() uint64 { return m.gasLimit } func (m *Message) GasLimit() uint64 { return m.gasLimit }
// GasLimit Gas限制 // GasLimit Gas限制
func (m Message) SetGasLimit(gasLimit uint64) { func (m *Message) SetGasLimit(gasLimit uint64) {
m.gasLimit = gasLimit m.gasLimit = gasLimit
} }
// Alias 合约别名 // Alias 合约别名
func (m Message) Alias() string { return m.alias } func (m *Message) Alias() string { return m.alias }
// Para 合约参数 // Para 合约参数
func (m Message) Para() []byte { return m.para } func (m *Message) Para() []byte { return m.para }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment