native: implement HF-based update

A part of #3213.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
Anna Shaleva 2024-03-27 20:48:14 +03:00
parent 83fdcc8568
commit d62fad1268
19 changed files with 416 additions and 105 deletions

View file

@ -31,7 +31,6 @@ func newLedger() *Ledger {
var l = &Ledger{
ContractMD: *interop.NewContractMD(nativenames.Ledger, ledgerContractID),
}
defer l.UpdateHash()
desc := newDescriptor("currentHash", smartcontract.Hash256Type)
md := newMethodAndPrice(l.currentHash, 1<<15, callflag.ReadStates)
@ -81,7 +80,7 @@ func (l *Ledger) Metadata() *interop.ContractMD {
}
// Initialize implements the Contract interface.
func (l *Ledger) Initialize(ic *interop.Context) error {
func (l *Ledger) Initialize(ic *interop.Context, hf *config.Hardfork) error {
return nil
}