Skip to content

Commit

Permalink
Pulling everything into main (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMarstonConnell authored Oct 22, 2022
2 parents da46e65 + b32d4af commit 2d3bda6
Show file tree
Hide file tree
Showing 289 changed files with 13,675 additions and 57,406 deletions.
34 changes: 14 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,21 @@ name: Build
on:
pull_request:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10
- "v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+" # Push events to matching alpha releases
- "v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+" # Push events to matching beta releases
branches: [ "master", "dev" ]

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
steps:
- uses: actions/checkout@v3

- name: Build
run: make build
- uses: actions/setup-go@v2
with:
go-version: 1.18.1 # The Go version to download (if necessary) and use.
- name: Build CLI
shell: bash
run: |
make build
native-build-cli:
runs-on: ${{matrix.os}}
Expand All @@ -27,7 +28,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v2
with:
go-version: 1.19 # The Go version to download (if necessary) and use.
go-version: 1.18.1 # The Go version to download (if necessary) and use.
- name: Build CLI
shell: bash
run: |
Expand Down Expand Up @@ -59,20 +60,11 @@ jobs:
# name: canined-MacOS-arm64
# path: canined-MacOS-arm64

Release:
NightlyRelease:
needs:
[native-build-cli]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
- name: Declare Commit Variables
id: is_pre_release
shell: bash
run: |
echo "::set-output name=IS_PRE_RELEASE::$(echo "${{ steps.get_version.outputs.VERSION }}" | awk 'BEGIN{prerelease="false"} /beta|alpha/{prerelease="true"} END{print prerelease}')"
- uses: actions/download-artifact@v3
with:
name: canined-Linux
Expand All @@ -82,7 +74,9 @@ jobs:
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: "nightly"
name: "nightly"
prerelease: ${{ steps.is_pre_release.outputs.IS_PRE_RELEASE }}
files: |
canined-macOS
canined-Linux
canined-Linux
78 changes: 78 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Release

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10
- "v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+" # Push events to matching alpha releases
- "v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+" # Push events to matching beta releases

jobs:
native-build-cli:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-20.04, macos-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v2
with:
go-version: 1.18.1 # The Go version to download (if necessary) and use.
- name: Build CLI
shell: bash
run: |
make build
cp "build/canined" "canined-$RUNNER_OS"
- uses: actions/upload-artifact@v3
with:
name: canined-${{runner.os}}
path: canined-${{runner.os}}

# MacOS-ARM64-CLI:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-go@v3
# with:
# go-version: 1.19 # The Go version to download (if necessary) and use.
# - name: Install xgo
# run: |
# go install github.com/crazy-max/[email protected]
# xgo || true # check installation
# - name: Build MacOS CLI
# shell: bash
# run: |
# make build_macos_arm64_cli
# cp "canined-macos-arm64" "canined-MacOS-arm64"
# - uses: actions/upload-artifact@v3
# with:
# name: canined-MacOS-arm64
# path: canined-MacOS-arm64

Release:
needs:
[native-build-cli]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
- name: Declare Commit Variables
id: is_pre_release
shell: bash
run: |
echo "::set-output name=IS_PRE_RELEASE::$(echo "${{ steps.get_version.outputs.VERSION }}" | awk 'BEGIN{prerelease="false"} /beta|alpha/{prerelease="true"} END{print prerelease}')"
- uses: actions/download-artifact@v3
with:
name: canined-Linux
- uses: actions/download-artifact@v3
with:
name: canined-macOS
- name: Release
uses: softprops/action-gh-release@v1
with:
prerelease: ${{ steps.is_pre_release.outputs.IS_PRE_RELEASE }}
files: |
canined-macOS
canined-Linux
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ else
go build -mod=readonly $(BUILD_FLAGS) -o build/canined ./cmd/canined
endif

build_cli:
go build -o build/canined -mod=readonly -tags "$(GO_TAGS) build/canined" -ldflags '$(LD_FLAGS)' ./cmd/canined

build-contract-tests-hooks:
ifeq ($(OS),Windows_NT)
go build -mod=readonly $(BUILD_FLAGS) -o build/contract_tests.exe ./cmd/contract_tests
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@


## Installing the Canine CLI
To install `canined` on your Linux/MacOs machine, please go to [Releases](https://github.com/JACKAL-DAO/canine-chain/releases) and download the latest release. Extract the zipped executable to use it. You might have to run `sudo chmod +x canined` to allow it to run.
To install `canined` on your Linux machine, please go to [Releases](https://github.com/JACKAL-DAO/canine-chain/releases) and download the latest release. Move the executable to a folder in your `$PATH` and download [this](https://github.com/CosmWasm/wasmvm/raw/v1.1.1/internal/api/libwasmvm.x86_64.so) to `/lib/libwasmvm.x86_64.so`

```sh
sudo wget https://github.com/CosmWasm/wasmvm/raw/v1.1.1/internal/api/libwasmvm.x86_64.so -O /lib/libwasmvm.x86_64.so
```

You may also need to run `sudo chmod +x canined` inside the executables directory to allow it to run.

## License

Expand Down
4 changes: 2 additions & 2 deletions app/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
ibcante "github.com/cosmos/ibc-go/v3/modules/core/ante"
"github.com/cosmos/ibc-go/v3/modules/core/keeper"

wasmkeeper "github.com/jackal-dao/canine/x/wasm/keeper"
wasmTypes "github.com/jackal-dao/canine/x/wasm/types"
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmTypes "github.com/CosmWasm/wasmd/x/wasm/types"
)

// HandlerOptions extend the SDK's AnteHandler options by requiring the IBC
Expand Down
30 changes: 3 additions & 27 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ import (
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
dbm "github.com/tendermint/tm-db"

"github.com/CosmWasm/wasmd/x/wasm"
wasmclient "github.com/CosmWasm/wasmd/x/wasm/client"
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmappparams "github.com/jackal-dao/canine/app/params"
"github.com/jackal-dao/canine/x/wasm"
wasmclient "github.com/jackal-dao/canine/x/wasm/client"
wasmkeeper "github.com/jackal-dao/canine/x/wasm/keeper"

mint "github.com/jackal-dao/canine/x/jklmint"
mintkeeper "github.com/jackal-dao/canine/x/jklmint/keeper"
Expand All @@ -135,10 +135,6 @@ import (
notificationsmodulekeeper "github.com/jackal-dao/canine/x/notifications/keeper"
notificationsmoduletypes "github.com/jackal-dao/canine/x/notifications/types"

lpmodule "github.com/jackal-dao/canine/x/lp"
lpmodulekeeper "github.com/jackal-dao/canine/x/lp/keeper"
lpmoduletypes "github.com/jackal-dao/canine/x/lp/types"

// unnamed import of statik for swagger UI support
_ "github.com/cosmos/cosmos-sdk/client/docs/statik"

Expand Down Expand Up @@ -239,7 +235,6 @@ var (
storagemodule.AppModuleBasic{},
dsigmodule.AppModuleBasic{},
filetreemodule.AppModuleBasic{},
lpmodule.AppModuleBasic{},
notificationsmodule.AppModuleBasic{},
)

Expand All @@ -257,7 +252,6 @@ var (
rnsmoduletypes.ModuleName: {authtypes.Minter, authtypes.Burner, authtypes.Staking},
storagemoduletypes.ModuleName: {authtypes.Minter, authtypes.Burner},
dsigmoduletypes.ModuleName: {authtypes.Minter, authtypes.Burner},
lpmoduletypes.ModuleName: {authtypes.Minter, authtypes.Burner, authtypes.Staking},
}
)

Expand Down Expand Up @@ -316,7 +310,6 @@ type WasmApp struct {
DsigKeeper dsigmodulekeeper.Keeper
FileTreeKeeper filetreemodulekeeper.Keeper

LpKeeper lpmodulekeeper.Keeper

NotificationsKeeper notificationsmodulekeeper.Keeper

Expand Down Expand Up @@ -359,7 +352,6 @@ func NewWasmApp(
evidencetypes.StoreKey, ibctransfertypes.StoreKey, capabilitytypes.StoreKey,
feegrant.StoreKey, authzkeeper.StoreKey, wasm.StoreKey, icahosttypes.StoreKey, icacontrollertypes.StoreKey, intertxtypes.StoreKey,
rnsmoduletypes.StoreKey, storagemoduletypes.StoreKey, dsigmoduletypes.StoreKey, filetreemoduletypes.StoreKey,
lpmoduletypes.StoreKey,
notificationsmoduletypes.StoreKey,
)
tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey)
Expand Down Expand Up @@ -628,16 +620,6 @@ func NewWasmApp(
)
filetreeModule := filetreemodule.NewAppModule(appCodec, app.FileTreeKeeper, app.accountKeeper, app.bankKeeper)

app.LpKeeper = *lpmodulekeeper.NewKeeper(
appCodec,
keys[lpmoduletypes.StoreKey],
keys[lpmoduletypes.MemStoreKey],
app.getSubspace(lpmoduletypes.ModuleName),

app.bankKeeper,
)
lpModule := lpmodule.NewAppModule(appCodec, app.LpKeeper, app.accountKeeper, app.bankKeeper)

// Create static IBC router, add app routes, then set and seal it
ibcRouter := porttypes.NewRouter()

Expand Down Expand Up @@ -701,7 +683,6 @@ func NewWasmApp(
storageModule,
dsigModule,
filetreeModule,
lpModule,
notificationsModule,
)

Expand Down Expand Up @@ -736,7 +717,6 @@ func NewWasmApp(
storagemoduletypes.ModuleName,
dsigmoduletypes.ModuleName,
filetreemoduletypes.ModuleName,
lpmoduletypes.ModuleName,
notificationsmoduletypes.ModuleName,
)

Expand Down Expand Up @@ -767,7 +747,6 @@ func NewWasmApp(
storagemoduletypes.ModuleName,
dsigmoduletypes.ModuleName,
filetreemoduletypes.ModuleName,
lpmoduletypes.ModuleName,
notificationsmoduletypes.ModuleName,
)

Expand Down Expand Up @@ -806,7 +785,6 @@ func NewWasmApp(
storagemoduletypes.ModuleName,
dsigmoduletypes.ModuleName,
filetreemoduletypes.ModuleName,
lpmoduletypes.ModuleName,
notificationsmoduletypes.ModuleName,
)

Expand Down Expand Up @@ -841,7 +819,6 @@ func NewWasmApp(
transferModule,
rnsModule,
storageModule,
lpModule,
)

app.sm.RegisterStoreDecoders()
Expand Down Expand Up @@ -1047,7 +1024,6 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(icacontrollertypes.SubModuleName)
paramsKeeper.Subspace(wasm.ModuleName)
paramsKeeper.Subspace(rnsmoduletypes.ModuleName)
paramsKeeper.Subspace(lpmoduletypes.ModuleName)

return paramsKeeper
}
2 changes: 1 addition & 1 deletion app/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

abci "github.com/tendermint/tendermint/abci/types"

"github.com/jackal-dao/canine/x/wasm"
"github.com/CosmWasm/wasmd/x/wasm"
)

var emptyWasmOpts []wasm.Option = nil
Expand Down
4 changes: 2 additions & 2 deletions app/sim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ import (
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
dbm "github.com/tendermint/tm-db"

"github.com/jackal-dao/canine/x/wasm"
wasmtypes "github.com/jackal-dao/canine/x/wasm/types"
"github.com/CosmWasm/wasmd/x/wasm"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
)

// Get flags every time the simulator is run
Expand Down
2 changes: 1 addition & 1 deletion app/test_access.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
ibctransferkeeper "github.com/cosmos/ibc-go/v3/modules/apps/transfer/keeper"
ibckeeper "github.com/cosmos/ibc-go/v3/modules/core/keeper"

"github.com/jackal-dao/canine/x/wasm"
"github.com/CosmWasm/wasmd/x/wasm"
)

type TestSupport struct {
Expand Down
2 changes: 1 addition & 1 deletion app/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
tmtypes "github.com/tendermint/tendermint/types"
dbm "github.com/tendermint/tm-db"

"github.com/jackal-dao/canine/x/wasm"
"github.com/CosmWasm/wasmd/x/wasm"
)

// DefaultConsensusParams defines the default Tendermint consensus params used in
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"

"github.com/CosmWasm/wasmd/x/wasm"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
"github.com/jackal-dao/canine/app"
"github.com/jackal-dao/canine/x/wasm"
wasmtypes "github.com/jackal-dao/canine/x/wasm/types"
)

func setup(db dbm.DB, withGenesis bool, invCheckPeriod uint, opts ...wasm.Option) (*app.WasmApp, app.GenesisState) {
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"

wasmtypes "github.com/jackal-dao/canine/x/wasm/types"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
)

func BenchmarkTxSending(b *testing.B) {
Expand Down
Loading

0 comments on commit 2d3bda6

Please sign in to comment.