-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: ryanbajollari <[email protected]>
- Loading branch information
1 parent
1dc2b32
commit b16218c
Showing
81 changed files
with
7,097 additions
and
168 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ jobs: | |
steps: | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.22.1' | ||
go-go-version: '1.23' | ||
|
||
- name: Install runsim | ||
run: export GO111MODULE="on" && go install github.com/cosmos/tools/cmd/[email protected] | ||
|
@@ -38,7 +38,7 @@ jobs: | |
- uses: actions/setup-go@v5 | ||
if: env.GIT_DIFF | ||
with: | ||
go-version: '1.22.1' | ||
go-go-version: '1.23' | ||
cache: true | ||
- name: Test application non-determinism | ||
if: env.GIT_DIFF | ||
|
@@ -60,7 +60,7 @@ jobs: | |
- uses: actions/setup-go@v5 | ||
if: env.GIT_DIFF | ||
with: | ||
go-version: '1.22.1' | ||
go-go-version: '1.23' | ||
cache: true | ||
- uses: actions/cache@v4 | ||
if: env.GIT_DIFF | ||
|
@@ -87,7 +87,7 @@ jobs: | |
- uses: actions/setup-go@v5 | ||
if: env.GIT_DIFF | ||
with: | ||
go-version: '1.22.1' | ||
go-go-version: '1.23' | ||
cache: true | ||
- uses: actions/cache@v4 | ||
if: env.GIT_DIFF | ||
|
@@ -113,7 +113,7 @@ jobs: | |
- uses: actions/setup-go@v5 | ||
if: env.GIT_DIFF | ||
with: | ||
go-version: '1.22.1' | ||
go-go-version: '1.23' | ||
cache: true | ||
- uses: actions/cache@v4 | ||
if: env.GIT_DIFF | ||
|
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,27 @@ | ||
package query | ||
|
||
import ( | ||
"context" | ||
|
||
gasestimatetypes "github.com/ojo-network/ojo/x/gasestimate/types" | ||
) | ||
|
||
// GovQueryClient returns the govtypes.QueryClient | ||
// initialized with the clients grpc connection | ||
func (c *Client) GasEstimateClient() gasestimatetypes.QueryClient { | ||
return gasestimatetypes.NewQueryClient(c.grpcConn) | ||
} | ||
|
||
func (c *Client) GetGasEstimate(ctx context.Context, network string) (int64, error) { | ||
queryClient := c.GasEstimateClient() | ||
query := &gasestimatetypes.GasEstimateRequest{ | ||
Network: network, | ||
} | ||
|
||
res, err := queryClient.GasEstimate(ctx, query) | ||
if err != nil { | ||
return 0, err | ||
} | ||
|
||
return res.GasEstimate, nil | ||
} |
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,23 @@ | ||
package query | ||
|
||
import ( | ||
"context" | ||
|
||
gmptypes "github.com/ojo-network/ojo/x/gmp/types" | ||
) | ||
|
||
func (c *Client) GmpQueryClient() gmptypes.QueryClient { | ||
return gmptypes.NewQueryClient(c.grpcConn) | ||
} | ||
|
||
func (c *Client) QueryPayments() (*gmptypes.AllPaymentsResponse, error) { | ||
ctx, cancel := context.WithTimeout(context.Background(), queryTimeout) | ||
defer cancel() | ||
|
||
queryResponse, err := c.GmpQueryClient().AllPayments( | ||
ctx, | ||
&gmptypes.AllPaymentsRequest{}, | ||
) | ||
|
||
return queryResponse, err | ||
} |
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,26 @@ | ||
package tx | ||
|
||
import ( | ||
"cosmossdk.io/math" | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
gmptypes "github.com/ojo-network/ojo/x/gmp/types" | ||
) | ||
|
||
// TxCreatePayment creates a gmp payment transaction | ||
func (c *Client) TxCreatePayment() (*sdk.TxResponse, error) { | ||
fromAddr, err := c.keyringRecord.GetAddress() | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
msg := gmptypes.NewMsgCreatePayment( | ||
fromAddr.String(), | ||
"Arbitrum", | ||
"BTC", | ||
sdk.NewCoin("uojo", math.NewInt(1_000_000_000)), | ||
math.LegacyOneDec(), | ||
100, | ||
) | ||
|
||
return c.BroadcastTx(msg) | ||
} |
Oops, something went wrong.