Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into feat/indexer
Browse files Browse the repository at this point in the history
  • Loading branch information
Vritra4 committed May 22, 2024
2 parents 3aa7a8a + a23ca15 commit c282a3b
Show file tree
Hide file tree
Showing 44 changed files with 3,014 additions and 402 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# MiniEVM

MiniEVM is an optimistic rollup consumer chain powered by EVM, designed to simplify the process of bootstrapping an L2 network. The main advantage of using MiniEVM is that the users can leverage the OPinit stack for enhanced security and utilize all the Initia ecosystem tooling from day one, without the need to prepare a validator group or build the users' own ecosystem tools.
- https://github.com/initia-labs/evm

## Prerequisites

Expand Down
18 changes: 17 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"net/http"
"os"
"path/filepath"
"strings"

"github.com/gorilla/mux"
"github.com/rakyll/statik/fs"
Expand Down Expand Up @@ -935,7 +936,22 @@ func NewMinitiaApp(
if err != nil {
// Once we switch to using protoreflect-based antehandlers, we might
// want to panic here instead of logging a warning.
fmt.Fprintln(os.Stderr, err.Error())
errMsg := ""

// ignore injective proto annotations comes from github.com/cosoms/relayer
for _, s := range strings.Split(err.Error(), "\n") {
if strings.Contains(s, "injective") {
continue
}

errMsg += s + "\n"
}

if errMsg != "" {
// Once we switch to using protoreflect-based antehandlers, we might
// want to panic here instead of logging a warning.
fmt.Fprintln(os.Stderr, errMsg)
}
}

// Load the latest state from disk if necessary, and initialize the base-app. From this point on
Expand Down
24 changes: 23 additions & 1 deletion app/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ import (
ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported"
ibctypes "github.com/cosmos/ibc-go/v8/modules/core/types"

l2slinky "github.com/initia-labs/OPinit/x/opchild/l2slinky"
opchildtypes "github.com/initia-labs/OPinit/x/opchild/types"

auctiontypes "github.com/skip-mev/block-sdk/v2/x/auction/types"
slinkytypes "github.com/skip-mev/slinky/pkg/types"
oracletypes "github.com/skip-mev/slinky/x/oracle/types"
)

// GenesisState - The genesis state of the blockchain is represented here as a map of raw json
Expand All @@ -32,7 +35,26 @@ func NewDefaultGenesisState(cdc codec.JSONCodec, mbm module.BasicManager, denom
ConfigureMinGasPrices(cdc).
ConfigureICA(cdc).
ConfigureIBCAllowedClients(cdc).
ConfigureAuctionFee(cdc, denom)
ConfigureAuctionFee(cdc, denom).
AddTimestampCurrencyPair(cdc)
}

func (genState GenesisState) AddTimestampCurrencyPair(cdc codec.JSONCodec) GenesisState {
var oracleGenState oracletypes.GenesisState
cdc.MustUnmarshalJSON(genState[oracletypes.ModuleName], &oracleGenState)

cp, err := slinkytypes.CurrencyPairFromString(l2slinky.ReservedCPTimestamp)
if err != nil {
panic(err)
}

oracleGenState.CurrencyPairGenesis = append(oracleGenState.CurrencyPairGenesis, oracletypes.CurrencyPairGenesis{
CurrencyPair: cp,
CurrencyPairPrice: nil,
Nonce: 0,
})
genState[oracletypes.ModuleName] = cdc.MustMarshalJSON(&oracleGenState)
return genState
}

func (genState GenesisState) ConfigureAuctionFee(cdc codec.JSONCodec, denom string) GenesisState {
Expand Down
1 change: 1 addition & 0 deletions app/ibc-hooks/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ func _createTestInput(
)
evmParams := evmtypes.DefaultParams()
require.NoError(t, evmKeeper.Params.Set(ctx, evmParams))
require.NoError(t, evmKeeper.Initialize(ctx))

// set erc20 keeper
*erc20Keeper = *evmKeeper.ERC20Keeper().(*evmkeeper.ERC20Keeper)
Expand Down
9 changes: 9 additions & 0 deletions client/docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,15 @@
}
}
},
{
"url": "./tmp-swagger-gen/ibc/applications/nft_transfer/v1/query.swagger.json",
"operationIds": {
"rename": {
"Params": "IBCNftParams",
"EscrowAddress": "IBCNftEscrowAddress"
}
}
},
{
"url": "./tmp-swagger-gen/ibc/applications/fee/v1/query.swagger.json",
"operationIds": {
Expand Down
2 changes: 1 addition & 1 deletion client/docs/statik/statik.go

Large diffs are not rendered by default.

Loading

0 comments on commit c282a3b

Please sign in to comment.