Skip to content

Commit

Permalink
docs: add issue links for todos (#869)
Browse files Browse the repository at this point in the history
* remove weight todo

* add issue links for todos

* fix typo

---------

Co-authored-by: Denis Fadeev <[email protected]>
Co-authored-by: Lucas <[email protected]>
  • Loading branch information
3 people authored Aug 10, 2023
1 parent 544d878 commit 4321846
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 8 deletions.
2 changes: 2 additions & 0 deletions x/crosschain/types/message_vote_on_observed_inbound_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ func (msg *MsgVoteOnObservedInboundTx) ValidateBasic() error {
if msg.ReceiverChain < 0 {
return sdkerrors.Wrapf(ErrInvalidChainID, "chain id (%d)", msg.ReceiverChain)
}

// TODO: should parameterize the hardcoded max len
// FIXME: should allow this observation and handle errors in the state machine
// https://github.com/zeta-chain/node/issues/862
if len(msg.Message) > 10240 {
return sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "message is too long: %d", len(msg.Message))
}
Expand Down
3 changes: 3 additions & 0 deletions x/fungible/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState,
func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState {
genesis := types.DefaultGenesis()
genesis.Params = k.GetParams(ctx)

// TODO move foreign coins to observer
// https://github.com/zeta-chain/node/issues/863
//genesis.ForeignCoinsList = k(ctx)

// Get all zetaDepositAndCallContract
system, found := k.GetSystemContract(ctx)
if found {
Expand Down
12 changes: 7 additions & 5 deletions x/fungible/keeper/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ var (
ZEVMGasLimitDepositAndCall = big.NewInt(1_000_000)
)

// TODO Unit test for these funtions
// TODO Remove repetitive code
// DeployERC20Contract creates and deploys an ERC20 contract on the EVM with the
// DeployZRC20Contract creates and deploys an ERC20 contract on the EVM with the
// erc20 module account as owner. Also adds itself to ForeignCoins fungible module state variable
// TODO Unit test for these functions
// https://github.com/zeta-chain/node/issues/864
// TODO Remove repetitive code
func (k Keeper) DeployZRC20Contract(
ctx sdk.Context,
name, symbol string,
Expand Down Expand Up @@ -290,12 +291,13 @@ func (k Keeper) BalanceOfZRC4(
if err != nil {
return nil
}
// TODO : return the error here, we loose the error message if we return a nil . Maube use (big.Int,error )

// TODO: return the error here, we loose the error message if we return a nil. Maybe use (big.Int, error)
// https://github.com/zeta-chain/node/issues/865
unpacked, err := abi.Unpack("balanceOf", res.Ret)
if err != nil || len(unpacked) == 0 {
return nil
}
// TODO : return the error here, we loose the error message if we return a nil . Maube use (big.Int,error )

balance, ok := unpacked[0].(*big.Int)
if !ok {
Expand Down
1 change: 1 addition & 0 deletions x/fungible/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ func (AppModule) ConsensusVersion() uint64 { return 2 }
// BeginBlock executes all ABCI BeginBlock logic respective to the fungible module.
func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) {
//TODO : moved to init-genesis
// https://github.com/zeta-chain/node/issues/866
if ctx.BlockHeight() == 1 {
err := am.keeper.BlockOneDeploySystemContracts(sdk.WrapSDKContext(ctx))
if err != nil {
Expand Down
3 changes: 3 additions & 0 deletions x/observer/keeper/observer_mapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ func (k Keeper) ObserversByChain(goCtx context.Context, req *types.QueryObserver
}

ctx := sdk.UnwrapSDKContext(goCtx)

// TODO move parsing to client
// https://github.com/zeta-chain/node/issues/867

chainName := common.ParseChainName(req.ObservationChain)
chain := k.GetParams(ctx).GetChainFromChainName(chainName)
if chain == nil {
Expand Down
3 changes: 1 addition & 2 deletions x/observer/module_simulation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import (

/* #nosec */
const (
opWeightMsgUpdateClientParams = "op_weight_msg_update_client_params"
// TODO: Determine the simulation weight value
opWeightMsgUpdateClientParams = "op_weight_msg_update_client_params"
defaultWeightMsgUpdateClientParams int = 100
)

Expand Down
4 changes: 3 additions & 1 deletion zetaclient/bitcoin_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ func (ob *BitcoinChainClient) GetLastBlockHeight() int64 {
return height
}

// TODO
// GetBaseGasPrice ...
// TODO: implement
// https://github.com/zeta-chain/node/issues/868
func (ob *BitcoinChainClient) GetBaseGasPrice() *big.Int {
return big.NewInt(0)
}
Expand Down

0 comments on commit 4321846

Please sign in to comment.