This repository was archived by the owner on Apr 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 578
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #447: Initial Application Skeleton Structure
- Loading branch information
Aleksandr Bezobchuk
committed
Jul 19, 2018
1 parent
07e7568
commit e5e3d48
Showing
10 changed files
with
149 additions
and
16 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,45 @@ | ||
package app | ||
|
||
import ( | ||
bam "github.com/cosmos/cosmos-sdk/baseapp" | ||
"github.com/cosmos/cosmos-sdk/wire" | ||
) | ||
|
||
const ( | ||
appName = "Ethermint" | ||
) | ||
|
||
// EthermintApp implements an extended ABCI application. | ||
type EthermintApp struct { | ||
*bam.BaseApp | ||
|
||
codec *wire.Codec | ||
sealed bool | ||
|
||
// TODO: stores and keys | ||
|
||
// TODO: keepers | ||
|
||
// TODO: mappers | ||
} | ||
|
||
// NewEthermintApp returns a reference to a new initialized Ethermint | ||
// application. | ||
func NewEthermintApp(opts ...func(*EthermintApp)) *EthermintApp { | ||
app := &EthermintApp{} | ||
|
||
// TODO: implement constructor | ||
|
||
for _, opt := range opts { | ||
opt(app) | ||
} | ||
|
||
app.seal() | ||
return app | ||
} | ||
|
||
// seal seals the Ethermint application and prohibits any future modifications | ||
// that change critical components. | ||
func (app *EthermintApp) seal() { | ||
app.sealed = true | ||
} |
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,7 @@ | ||
package main | ||
|
||
func main() { | ||
// TODO: Implement CLI commands and logic | ||
// | ||
// Ref: https://github.com/cosmos/ethermint/issues/432 | ||
} |
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,7 @@ | ||
package main | ||
|
||
func main() { | ||
// TODO: Implement daemon command and logic | ||
// | ||
// Ref: https://github.com/cosmos/ethermint/issues/433 | ||
} |
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 @@ | ||
package server |
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,8 @@ | ||
package types | ||
|
||
// AppContext provides the ability for the application to pass around and | ||
// obtain immutable objects easily. More importantly, it allows for the | ||
// utilization of the object-capability model in which components gain access | ||
// to other components for which they truly need. | ||
type AppContext struct { | ||
} |
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,10 @@ | ||
package version | ||
|
||
// Version contains the application semantic version. | ||
// | ||
// TODO: How do we want to version this being that an initial Ethermint has | ||
// been developed? | ||
const Version = "0.0.0" | ||
|
||
// GitCommit contains the git SHA1 short hash set by build flags. | ||
var GitCommit = "" |