Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #80 from primevprotocol/resolve.0
Browse files Browse the repository at this point in the history
feat: add preconf contract
  • Loading branch information
aloknerurkar authored Nov 13, 2023
2 parents 5df7a6d + 83b8da4 commit d9ef732
Show file tree
Hide file tree
Showing 17 changed files with 2,321 additions and 65 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ vendor
**/.idea
**/.vscode
*.DS_STORE
bin/*
6 changes: 6 additions & 0 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ type config struct {
LogLevel string `yaml:"log_level" json:"log_level"`
Bootnodes []string `yaml:"bootnodes" json:"bootnodes"`
ExposeProviderAPI bool `yaml:"expose_provider_api" json:"expose_provider_api"`
PreconfContract string `yaml:"preconf_contract" json:"preconf_contract"`
RegistryContract string `yaml:"registry_contract" json:"registry_contract"`
RPCEndpoint string `yaml:"rpc_endpoint" json:"rpc_endpoint"`
}

func checkConfig(cfg *config) error {
Expand Down Expand Up @@ -186,6 +189,9 @@ func start(c *cli.Context) error {
Logger: logger,
Bootnodes: cfg.Bootnodes,
ExposeProviderAPI: cfg.ExposeProviderAPI,
PreconfContract: cfg.PreconfContract,
RegistryContract: cfg.RegistryContract,
RPCEndpoint: cfg.RPCEndpoint,
})
if err != nil {
return fmt.Errorf("failed starting node: %w", err)
Expand Down
3 changes: 3 additions & 0 deletions config/provider.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@ secret: hello
log_fmt: text
log_level: debug
expose_provider_api: true
preconf_contract: 0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0
registry_contract: 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512
rpc_endpoint: http://34.215.163.180:8545
bootnodes:
- /ip4/<localhost>/tcp/13522/p2p/<p2p_ID>
236 changes: 197 additions & 39 deletions gen/go/rpc/providerapi/v1/providerapi.pb.go

Large diffs are not rendered by default.

172 changes: 172 additions & 0 deletions gen/go/rpc/providerapi/v1/providerapi.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

89 changes: 88 additions & 1 deletion gen/go/rpc/providerapi/v1/providerapi_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d9ef732

Please sign in to comment.