0g-chain/contracts
Nick DeLuca 8023be0067
chore(nodejs): Update to active LTS v20 (#2011)
* chore(nodejs): Use active LTS v20 for nodejs

This updates nodejs to use the active LTS v20 from the maintenance LTS
v18.  This expands compatibility with packages, adds native support for
more features, etc.

In addition, the ci-seed-chain workflow was updated to use the
.tool-version file instead of hardcoded version.

* chore(hardhat): Update hardhat for nodejs 20 support
2024-08-20 11:50:03 -07:00
..
contracts update new names, NativeCoin -> CosmosCoin (#1596) 2023-05-23 12:32:27 -07:00
scripts update new names, NativeCoin -> CosmosCoin (#1596) 2023-05-23 12:32:27 -07:00
test update new names, NativeCoin -> CosmosCoin (#1596) 2023-05-23 12:32:27 -07:00
.eslintignore feat: add contract for ERC20KavaWrappedNativeCoin (#1594) 2023-05-19 16:39:50 -07:00
.eslintrc.cjs feat: add contract for ERC20KavaWrappedNativeCoin (#1594) 2023-05-19 16:39:50 -07:00
.gitignore feat: add contract for ERC20KavaWrappedNativeCoin (#1594) 2023-05-19 16:39:50 -07:00
.prettierignore feat: add contract for ERC20KavaWrappedNativeCoin (#1594) 2023-05-19 16:39:50 -07:00
.solhint.json feat: add contract for ERC20KavaWrappedNativeCoin (#1594) 2023-05-19 16:39:50 -07:00
.solhintignore feat: add contract for ERC20KavaWrappedNativeCoin (#1594) 2023-05-19 16:39:50 -07:00
hardhat.config.ts feat: add contract for ERC20KavaWrappedNativeCoin (#1594) 2023-05-19 16:39:50 -07:00
package-lock.json chore(nodejs): Update to active LTS v20 (#2011) 2024-08-20 11:50:03 -07:00
package.json chore(nodejs): Update to active LTS v20 (#2011) 2024-08-20 11:50:03 -07:00
README.md feat: add contract for ERC20KavaWrappedNativeCoin (#1594) 2023-05-19 16:39:50 -07:00
tsconfig.json feat: add contract for ERC20KavaWrappedNativeCoin (#1594) 2023-05-19 16:39:50 -07:00

Kava EVM contracts

Contracts for the Kava EVM used by the Kava blockchain. Includes an ERC20 contract for wrapping native cosmos sdk.Coins.

Setup

npm install

Test

npm test

Development

# Watch contract + tests
npm run dev

# Watch tests only
npm run test-watch

Deploying contracts to test networks

A deploy script is included in this hardhat project to deploy a contract directly to a network. To deploy the contracts to different networks:

npx hardhat run --network <network-name> scripts/deploy.ts

Configuration for various <network-name>s above are setup in the hardhat config.

Production compiling & Ethermint JSON

Ethermint uses its own json format that includes the ABI and bytecode in a single file. The bytecode should have no 0x prefix and should be under the property name bin. This structure is built from the compiled code with npm ethermint-json.

The following compiles the contract, builds the ethermint json and copies the file to the evmutil:

npm build