-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MN-805: refactor insolard and genesis (#91)
* MN-805: refactor insolard & genesis * MN-805: refactoring genesis files * MN-805: refactoring genesis files Co-authored-by: pavel-moskovkin <[email protected]>
- Loading branch information
Showing
29 changed files
with
941 additions
and
1,227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Copyright 2020 Insolar Network Ltd. | ||
// All rights reserved. | ||
// This material is licensed under the Insolar License version 1.0, | ||
// available at https://github.com/insolar/insolar/blob/master/LICENSE.md. | ||
|
||
package main | ||
|
||
import ( | ||
"github.com/pkg/errors" | ||
|
||
"github.com/insolar/insolar/insolard" | ||
"github.com/insolar/insolar/log" | ||
"github.com/insolar/insolar/logicrunner/builtin" | ||
"github.com/insolar/mainnet/application/appfoundation" | ||
appbuiltin "github.com/insolar/mainnet/application/builtin" | ||
"github.com/insolar/mainnet/application/genesis" | ||
"github.com/insolar/mainnet/application/genesis/contracts" | ||
) | ||
|
||
func main() { | ||
parentDomain := genesis.GenesisNameRootDomain | ||
scVersion := int64(appfoundation.AllowedVersionSmartContract) | ||
builtinContracts := builtin.BuiltinContracts{ | ||
CodeRegistry: appbuiltin.InitializeContractMethods(), | ||
CodeRefRegistry: appbuiltin.InitializeCodeRefs(), | ||
CodeDescriptors: appbuiltin.InitializeCodeDescriptors(), | ||
PrototypeDescriptors: appbuiltin.InitializePrototypeDescriptors(), | ||
} | ||
apiOptions, err := genesis.InitAPIOptions() | ||
if err != nil { | ||
log.Fatal(errors.Wrap(err, "failed to get API info response")) | ||
} | ||
initStates := contracts.InitStates | ||
|
||
insolard.RunInsolarNode(parentDomain, scVersion, apiOptions, initStates, builtinContracts) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.