core: implement skeletons for NEO/GAS native contracts

This commit is contained in:
Evgenii Stratonikov 2020-03-25 13:00:11 +03:00
parent 25354c44f9
commit 76700f31cf
9 changed files with 893 additions and 105 deletions

View file

@ -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{