Skip to content

Commit

Permalink
Merge pull request #302 from stratosnet/release
Browse files Browse the repository at this point in the history
Release v0.10.0
  • Loading branch information
jinzuo-qsn authored Jul 20, 2023
2 parents 3896ff2 + 7656ace commit 5aecd57
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 67 deletions.
61 changes: 0 additions & 61 deletions client/keys/keys.go

This file was deleted.

4 changes: 2 additions & 2 deletions rpc/backend/evm_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (b *Backend) GetBlockByNumber(blockNum types.BlockNumber, fullTx bool) (*ty
if err != nil {
return nil, err
}
res.BaseFee = feeResp.BaseFee.BigInt()
res.BaseFee = (*hexutil.Big)(feeResp.BaseFee.BigInt())

return res, nil
}
Expand Down Expand Up @@ -122,7 +122,7 @@ func (b *Backend) GetBlockByHash(hash common.Hash, fullTx bool) (*types.Block, e
if err != nil {
return nil, err
}
res.BaseFee = feeResp.BaseFee.BigInt()
res.BaseFee = (*hexutil.Big)(feeResp.BaseFee.BigInt())

return res, nil
}
Expand Down
4 changes: 2 additions & 2 deletions rpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (web3 *Web3Server) registerAPIs(server *rpc.Server, apis []rpc.API) error {

func (web3 *Web3Server) StartHTTP(apis []rpc.API) error {
rpcSrv := rpc.NewServer()
handler := node.NewHTTPHandlerStack(rpcSrv, []string{"*"}, []string{"localhost", "host.docker.internal"}, []byte{}) // TODO: Replace cors and vshosts from config
handler := node.NewHTTPHandlerStack(rpcSrv, []string{}, []string{"*"}, []byte{})
if err := web3.registerAPIs(rpcSrv, apis); err != nil {
return err
}
Expand All @@ -96,7 +96,7 @@ func (web3 *Web3Server) StartHTTP(apis []rpc.API) error {

func (web3 *Web3Server) StartWS(apis []rpc.API) error {
rpcSrv := rpc.NewServer()
handler := rpcSrv.WebsocketHandler([]string{}) // TODO: Add config origins
handler := rpcSrv.WebsocketHandler([]string{})
if err := web3.registerAPIs(rpcSrv, apis); err != nil {
return err
}
Expand Down
3 changes: 2 additions & 1 deletion rpc/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,10 @@ type Block struct {
GasUsed *hexutil.Big `json:"gasUsed"`
Timestamp hexutil.Uint64 `json:"timestamp"`
Uncles []common.Hash `json:"uncles"`
Withdrawals []common.Hash `json:"withdrawals"`
ReceiptsRoot common.Hash `json:"receiptsRoot"`
Transactions []interface{} `json:"transactions"`
BaseFee *big.Int `json:"baseFeePerGas"`
BaseFee *hexutil.Big `json:"baseFeePerGas"`
}

// TransactionReceipt represents a mined transaction returned to RPC clients.
Expand Down
1 change: 1 addition & 0 deletions rpc/types/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ func EthBlockFromTendermint(txDecoder sdk.TxDecoder, block *tmtypes.Block, fullT
Timestamp: hexutil.Uint64(header.Time),
Transactions: transactions,
Uncles: make([]common.Hash, 0),
Withdrawals: make([]common.Hash, 0),
ReceiptsRoot: common.Hash{},
BaseFee: nil,
}, nil
Expand Down
2 changes: 1 addition & 1 deletion x/evm/keeper/statedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (k *Keeper) SetBalance(ctx sdk.Context, addr common.Address, amount *big.In
case 1:
// mint
coins := sdk.NewCoins(sdk.NewCoin(params.EvmDenom, sdk.NewIntFromBigInt(delta)))
if err := k.potKeeper.SafeMintCoins(ctx, types.ModuleName, coins); err != nil {
if err := k.bankKeeper.MintCoins(ctx, types.ModuleName, coins); err != nil {
return err
}
if err := k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, cosmosAddr, coins); err != nil {
Expand Down
1 change: 1 addition & 0 deletions x/evm/types/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ type BankKeeper interface {
SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
// SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error
SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
GetSupply(ctx sdk.Context, denom string) sdk.Coin
}
Expand Down

0 comments on commit 5aecd57

Please sign in to comment.