Skip to content

Commit 3d9d8fb

Browse files
committed
chore: fix comment formatting and typos across codebase
Signed-off-by: criciss <cricis@msn.com>
1 parent 9a516a3 commit 3d9d8fb

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

x/crosschain/keeper/gas_payment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ type ChainGasParams struct {
3232

3333
// PayGasAndUpdateCctx updates the outbound tx with the new amount after paying the gas fee
3434
// **Caller should feed temporary ctx into this function**
35-
// chainID is the outbound chain chain id , this can be receiver chain for regular transactions and sender-chain to reverted transactions
35+
// chainID is the outbound chain id, this can be receiver chain for regular transactions and sender-chain to reverted transactions
3636
func (k Keeper) PayGasAndUpdateCctx(
3737
ctx sdk.Context,
3838
chainID int64,

x/crosschain/keeper/msg_server_vote_outbound.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const voteOutboundID = "Vote Outbound"
2626
// transaction is processed.
2727
//
2828
// If the observation is successful, the difference between zeta burned
29-
// and minted is minted by the bank module and deposited into the module
29+
// and minted by the bank module and deposited into the module
3030
// account.
3131
//
3232
// If the observation is unsuccessful, the logic depends on the previous
@@ -186,8 +186,8 @@ func (k Keeper) refundUnusedGas(
186186
userGasFeePaid := outboundParams.UserGasFeePaid
187187

188188
// Handle cases for not funding the stability pool or refunding the user
189-
// 1. If outboundTxFeePaid is nil or zero, we do not fund the stability pool or refund the user.This is for Non EVM chains which do not populate outboundTxFeePaid
190-
// 2. If outboundTxFeePaid is greater than or equal to userGasFeePaid, we do not fund the stability pool or refund the user. Since the outbound tx used all the gas paid by the user.The additional gas used is covered by the stability pool.
189+
// 1. If outboundTxFeePaid is nil or zero, we do not fund the stability pool or refund the user. This is for Non EVM chains which do not populate outboundTxFeePaid
190+
// 2. If outboundTxFeePaid is greater than or equal to userGasFeePaid, we do not fund the stability pool or refund the user. Since the outbound tx used all the gas paid by the user, the additional gas used is covered by the stability pool.
191191
// https://github.com/zeta-chain/node/issues/4219
192192
// Enable for non EVM chains once zeta-client supports populating gas used and effective gas price for non EVM chains.
193193
if outboundTxFeePaid.IsNil() || outboundTxFeePaid.IsZero() || outboundTxFeePaid.GTE(userGasFeePaid) {

x/fungible/keeper/evm.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ func (k Keeper) DeployConnectorZEVM(ctx sdk.Context, wzeta common.Address) (comm
242242
return contractAddr, nil
243243
}
244244

245-
// DepositZRC20 deposits ZRC4 tokens into to account;
245+
// DepositZRC20 deposits ZRC20 tokens into to account;
246246
// Callable only by the fungible module account
247247
// returns directly CallEVM()
248248
func (k Keeper) DepositZRC20(
@@ -270,7 +270,7 @@ func (k Keeper) DepositZRC20(
270270
)
271271
}
272272

273-
// DepositZeta deposits ZETA tokens into and account using the gateway contract;
273+
// DepositZeta deposits ZETA tokens into an account using the gateway contract;
274274
func (k Keeper) DepositZeta(
275275
ctx sdk.Context,
276276
to common.Address,
@@ -388,7 +388,7 @@ func (k Keeper) CallDepositAndCall(ctx sdk.Context,
388388
}
389389

390390
// CallOnReceiveZevmConnector calls the onReceive function of the ZevmConnector contract
391-
// Before calling it mints the zetaValue tokens to the fungible module , and this amount is then provided as value to the onReceive function
391+
// Before calling it mints the zetaValue tokens to the fungible module, and this amount is then provided as value to the onReceive function
392392
// The onReceive function will then wrap this native zeta into WZETA and call the onReceive function of the destination contract specified by the destinationAddress
393393
func (k Keeper) CallOnReceiveZevmConnector(ctx sdk.Context,
394394
zetaTxSenderAddress []byte,
@@ -440,7 +440,7 @@ func (k Keeper) CallOnReceiveZevmConnector(ctx sdk.Context,
440440
}
441441

442442
// CallOnRevertZevmConnector calls the onRevert function of the ZevmConnector contract
443-
// Before calling it mints the remainingZetaValue tokens to the fungible module , and this amount is then provided as value to the onRevert function
443+
// Before calling it mints the remainingZetaValue tokens to the fungible module, and this amount is then provided as value to the onRevert function
444444
// The onRevert function will then wrap this native zeta into WZETA and call the onRevert function of the contract specified by the zetaTxSenderAddress
445445
// Note the destination address is the original destination address of the transaction and not the current destination .
446446
func (k Keeper) CallOnRevertZevmConnector(ctx sdk.Context,
@@ -619,7 +619,7 @@ func (k Keeper) QueryZRC20Data(
619619
return types.NewZRC20Data(nameRes.Value, symbolRes.Value, decimalRes.Value), nil
620620
}
621621

622-
// BalanceOfZRC4 queries an account's balance for a given ZRC4 contract
622+
// BalanceOfZRC20 queries an account's balance for a given ZRC20 contract
623623
func (k Keeper) BalanceOfZRC4(
624624
ctx sdk.Context,
625625
contract, account common.Address,
@@ -647,7 +647,7 @@ func (k Keeper) BalanceOfZRC4(
647647
return balance, nil
648648
}
649649

650-
// TotalSupplyZRC4 queries the total supply of a given ZRC4 contract
650+
// TotalSupplyZRC20 queries the total supply of a given ZRC20 contract
651651
func (k Keeper) TotalSupplyZRC4(
652652
ctx sdk.Context,
653653
contract common.Address,
@@ -732,12 +732,12 @@ func (k Keeper) CallEVM(
732732
if ok {
733733
errMessage.AddRevertReason(revertErr.ErrorData())
734734
}
735-
// Marshall the error message into a JSON string. If it fails, return the string representation of the error message
735+
// Marshal the error message into a JSON string. If it fails, return the string representation of the error message
736736
errString, err := errMessage.ToJSON()
737737
if err != nil {
738-
return resp, fmt.Errorf("json marshalling failed %s,%s", err.Error(), errMessage.String())
738+
return resp, fmt.Errorf("json marshalling failed %s, %s", err.Error(), errMessage.String())
739739
}
740-
// The JSON string already contains all the necessary information we do not need to wrap
740+
// The JSON string already contains all the necessary information, we do not need to wrap
741741
return resp, errors.New(errString)
742742
}
743743
return resp, nil

0 commit comments

Comments
 (0)