core: implement skeletons for NEO/GAS native contracts
This commit is contained in:
parent
25354c44f9
commit
76700f31cf
9 changed files with 893 additions and 105 deletions
|
@ -42,9 +42,23 @@ type ContractMD struct {
|
|||
|
||||
// Contracts is a set of registered native contracts.
|
||||
type Contracts struct {
|
||||
NEO *NEO
|
||||
GAS *GAS
|
||||
Contracts []Contract
|
||||
}
|
||||
|
||||
// SetGAS sets GAS native contract.
|
||||
func (cs *Contracts) SetGAS(g *GAS) {
|
||||
cs.GAS = g
|
||||
cs.Contracts = append(cs.Contracts, g)
|
||||
}
|
||||
|
||||
// SetNEO sets NEO native contract.
|
||||
func (cs *Contracts) SetNEO(n *NEO) {
|
||||
cs.NEO = n
|
||||
cs.Contracts = append(cs.Contracts, n)
|
||||
}
|
||||
|
||||
// NewContractMD returns Contract with the specified list of methods.
|
||||
func NewContractMD(name string) *ContractMD {
|
||||
c := &ContractMD{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue