-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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 #1481: IBC MVP Refactor
in progress in progress fix all keeper/handler/types, start working on test finalize rebase fixing clients add linear_cli.go, refactor relayer cli fix examples add wire, msg naming format, fix examples in progress in progress add client/store in progress in progress cleanup finalize cleanup fix errors refactor ibc
- Loading branch information
Showing
37 changed files
with
1,279 additions
and
554 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
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,43 @@ | ||
package lib | ||
|
||
import ( | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
"github.com/cosmos/cosmos-sdk/wire" | ||
) | ||
|
||
type Value struct { | ||
store sdk.KVStore | ||
cdc *wire.Codec | ||
key []byte | ||
} | ||
|
||
func NewValue(store sdk.KVStore, cdc *wire.Codec, key []byte) Value { | ||
return Value{ | ||
store: store, | ||
cdc: cdc, | ||
key: key, | ||
} | ||
} | ||
|
||
func (v Value) MustGet(ptr interface{}) { | ||
bz := v.store.Get(v.key) | ||
v.cdc.MustUnmarshalBinary(bz, ptr) | ||
} | ||
|
||
func (v Value) Get(ptr interface{}) bool { | ||
bz := v.store.Get(v.key) | ||
if bz == nil { | ||
return false | ||
} | ||
v.cdc.MustUnmarshalBinary(bz, ptr) | ||
return true | ||
} | ||
|
||
func (v Value) Has() bool { | ||
bz := v.store.Get(v.key) | ||
return bz != nil | ||
} | ||
|
||
func (v Value) Set(val interface{}) { | ||
v.store.Set(v.key, v.cdc.MustMarshalBinary(val)) | ||
} |
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 cli | ||
|
||
const ( | ||
FlagTo = "to" | ||
FlagAmount = "amount" | ||
FlagDestChain = "dest-chain-id" | ||
) |
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,16 @@ | ||
package rest | ||
|
||
import ( | ||
"github.com/gorilla/mux" | ||
|
||
"github.com/cosmos/cosmos-sdk/crypto/keys" | ||
|
||
"github.com/cosmos/cosmos-sdk/client/context" | ||
"github.com/cosmos/cosmos-sdk/wire" | ||
) | ||
|
||
// RegisterRoutes - Central function to define routes that get registered by the main application | ||
func RegisterRoutes(cliCtx context.CLIContext, r *mux.Router, cdc *wire.Codec, kb keys.Keybase) { | ||
|
||
r.HandleFunc("/accounts/{address}/send", SendRequestHandlerFn(cdc, kb, cliCtx)).Methods("POST") | ||
} |
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.