package
0.0.0-20250108125741-e95afb000453
Repository: https://github.com/evmos/os.git
Documentation: pkg.go.dev

# README

Mocks

The mocks in this folder have been generated using the mockery tool. To regenerate the mocks, run the following commands at the root of this repository:

  • BankKeeper (from used version of Cosmos SDK):
# update the currently used version
COSMOS_VERSION="v0.50.9-evmos"
CUR_DIR="$(pwd)"
TMP_DIR="/tmp/tmp-sdk-mocks-$(date +%s)"

echo "Cloning Cosmos SDK $COSMOS_VERSION into $TMP_DIR..." &&
git clone --depth 1 --branch "$COSMOS_VERSION" https://github.com/evmos/cosmos-sdk.git "$TMP_DIR" &&
cd "$TMP_DIR" &&

# Go into bank module and generate mock
echo "Generating mocks for bank keeper..." &&
cd x/bank/keeper &&
mockery --name Keeper &&
sed -i '' 's/\([^a-zA-Z]\)Keeper/\1BankKeeper/g' mocks/Keeper.go &&
mv mocks/Keeper.go "$CUR_DIR/x/erc20/types/mocks/BankKeeper.go" && 

# Clean up
echo "Cleaning up $TMP_DIR..." &&
cd "$CUR_DIR" &&
rm -rf "$TMP_DIR"

echo "Done."
  • EVMKeeper (reduced interface defined in ERC20 types):
cd x/erc20/types
mockery --name EVMKeeper