Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: replace ethcall with own fork that includes filecoin check for fromAddress #50

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 16
node-version: 18
registry-url: https://registry.npmjs.org

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 16
node-version: 18
registry-url: https://registry.npmjs.org

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ A typescript SDK that can be used to create Dapps and keepers in the Ajna ecosys

## Setup

- Install/select Node.js 14/16/18 using your preferred package/version manager. Note that CI runs against Node 14, but the linter requires ^16.14 or ^18.
- Install/select Node.js ^18 using your preferred package/version manager. Note that CI runs against Node 18.
- `yarn install` installs dependencies.
- `yarn build` builds the app at `build`, cleaning the folder first.

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@ajna-finance/sdk",
"description": "A typescript SDK that can be used to create Dapps in Ajna ecosystem.",
"version": "0.4.2",
"version": "0.4.3",
"repository": {
"type": "git",
"url": "https://github.com/ajna-finance/sdk.git"
Expand All @@ -19,7 +19,7 @@
"dist"
],
"engines": {
"node": ">=16.14",
"node": ">=18.12",
"yarn": "^1.22.0"
},
"scripts": {
Expand All @@ -41,7 +41,7 @@
"dependencies": {
"@ethersproject/abi": "^5.7.0",
"@ethersproject/providers": "^5.7.2",
"ethcall": "^4.8.13",
"ethcall": "git+https://github.com/imbaniac/ethcall.git#filecoin-multicall",
"ethers": "^5.7.2",
"expect": "^29.6.1",
"mathjs": "^11.8.2",
Expand Down
4 changes: 2 additions & 2 deletions src/tests/erc20-pool-contracts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ describe('ERC20 Pool', () => {

expect(prices.hpb).toEqual(indexToPrice(3236));
expect(prices.hpbIndex).toEqual(3236);
expect(prices.htp).toBeBetween(toWad(80), toWad(80.5));
expect(prices.htp).toBeBetween(toWad(80), toWad(81.5));
expect(prices.htpIndex).toEqual(priceToIndex(prices.htp));
expect(prices.lup).toEqual(indexToPrice(3242));
expect(prices.lupIndex).toEqual(3242);
Expand Down Expand Up @@ -376,7 +376,7 @@ describe('ERC20 Pool', () => {
// estimate change against canned loan
let loanEstimate = await poolA.estimateLoan(signerBorrower.address, toWad(5000), toWad(68));
const prices = await poolA.getPrices();
expect(loanEstimate.collateralization).toBeBetween(toWad(1.2), toWad(1.3));
expect(loanEstimate.collateralization).toBeBetween(toWad(1.15), toWad(1.3));
expect(loanEstimate.debt).toBeBetween(toWad(15000), toWad(15000).mul(2));
expect(loanEstimate.collateral).toEqual(toWad(130 + 68));
expect(loanEstimate.thresholdPrice).toBeBetween(toWad(78), toWad(78).mul(2));
Expand Down
5 changes: 2 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2164,10 +2164,9 @@ esutils@^2.0.2:
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==

ethcall@^4.8.13:
"ethcall@git+https://github.com/imbaniac/ethcall.git#filecoin-multicall":
version "4.8.13"
resolved "https://registry.yarnpkg.com/ethcall/-/ethcall-4.8.13.tgz#20b45cfbfea721d1ae66d5a53c96a1fe138390a0"
integrity sha512-kpD000saTfBDoQn5g8gqTJhjGinWnAPkAwyYCN8SsGCUgjZxTMtEVwA+soo4ii/uyRYKMDeFFVk866GqU0jerA==
resolved "git+https://github.com/imbaniac/ethcall.git#a5d86156c497358e594c746e3e6e361a82b3fbe4"
dependencies:
"@ethersproject/abi" "^5.0.0"
"@ethersproject/bytes" "^5.0.0"
Expand Down
Loading