ipld-eth-server/pkg/core/watched_contract.go
2017-11-28 14:40:05 -06:00

25 lines
504 B
Go

package core
type WatchedContract struct {
Hash string
Transactions []Transaction
}
type ContractAttribute struct {
Name string
Type string
}
type ContractAttributes []ContractAttribute
func (attributes ContractAttributes) Len() int {
return len(attributes)
}
func (attributes ContractAttributes) Swap(i, j int) {
attributes[i], attributes[j] = attributes[j], attributes[i]
}
func (attributes ContractAttributes) Less(i, j int) bool {
return attributes[i].Name < attributes[j].Name
}