forked from cerc-io/ipld-eth-server
Move WatchedContract to repositories
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package core
|
||||
|
||||
type Contract struct {
|
||||
Attributes ContractAttributes
|
||||
Hash string
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user