Skip to content

Commit

Permalink
Merge branch 'main' into expertdicer/devgas-refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
expertdicer authored Feb 12, 2025
2 parents b192f30 + 1921af9 commit 079f48e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
12 changes: 12 additions & 0 deletions evm-core-ts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Changelog - Nibiru/evm-core-ts

Record of pull requests and differences between versions for
the `@nibiruchain/evm-core` package on `npm`.

## [0.0.x]

- v0.0.2: [#2204](https://github.com/NibiruChain/nibiru/pull/2204) - Add ERC20
caller to the "ethers" export.
- v0.0.1: [#2197](https://github.com/NibiruChain/nibiru/pull/2197) - Export
precompile addresses, ABIs, and ethers v6 adapters for strongly typed contracts.
This includes the FunToken, Wasm, and Nibiru Oracle precompiled contracts.
2 changes: 1 addition & 1 deletion evm-core-ts/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@nibiruchain/evm-core",
"description": "Lightweight Nibiru EVM TypeScript library for type-safe interactions with precompiled contracts, essential constants, and other core utilites.",
"version": "0.0.1",
"version": "0.0.2",
"private": false,
"include": ["src"],
"scripts": {
Expand Down
10 changes: 10 additions & 0 deletions evm-core-ts/src/ethers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ import {
type IOracle,
type IFunToken,
type NibiruOracleChainLinkLike,
type ERC20Minter,
NibiruOracleChainLinkLike__factory,
ERC20Minter__factory,
} from "./typechain"

export const wasmPrecompile = (runner: ContractRunner): IWasm =>
Expand Down Expand Up @@ -54,3 +56,11 @@ export const chainlinkLike = (
addr: string,
): NibiruOracleChainLinkLike =>
NibiruOracleChainLinkLike__factory.connect(addr, runner)

/**
* Returns a typed contract instance for a standard ERC20 contract.
* */
export const erc20Caller = (
runner: ContractRunner,
addr: string,
): ERC20Minter => ERC20Minter__factory.connect(addr, runner)

0 comments on commit 079f48e

Please sign in to comment.