native: implement CryptoLib contract

This commit is contained in:
Evgeniy Stratonikov 2021-02-15 18:43:10 +03:00 committed by Anna Shaleva
parent 19a23a36e4
commit 100f2db3fb
22 changed files with 240 additions and 172 deletions

View file

@ -24,6 +24,7 @@ type Contracts struct {
Designate *Designate
NameService *NameService
Notary *Notary
Crypto *Crypto
Contracts []interop.Contract
// persistScript is vm script which executes "onPersist" method of every native contract.
persistScript []byte
@ -61,6 +62,10 @@ func NewContracts(p2pSigExtensionsEnabled bool) *Contracts {
cs.Management = mgmt
cs.Contracts = append(cs.Contracts, mgmt)
c := newCrypto()
cs.Crypto = c
cs.Contracts = append(cs.Contracts, c)
ledger := newLedger()
cs.Ledger = ledger
cs.Contracts = append(cs.Contracts, ledger)