-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from lidofinance/develop
3.0.1
- Loading branch information
Showing
68 changed files
with
8,416 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# 3.0.1 | ||
|
||
## SDK | ||
|
||
### Fixed | ||
|
||
- modules constructors types did not allow `rpcProvider` passage | ||
- increased default timeout on transaction confirmation | ||
- account hoisting in `LidoSDKSteth` and `LidoSDKWSteth` for `signPermit` and `populatePermit` | ||
- `LidoSDKRewards`: | ||
- `getRewardsFromSubgraph` now returns APR in correct units(not in percent) | ||
- `getRewardsFromSubgraph` now allows object to be returned from `getSubgraphUrl` | ||
- `LidoSDKStatitstics` now has helper types | ||
- `LidoSDKWithdraw`: | ||
- now has more exported types | ||
- `approveSimulateTx`,`requestWithdrawalSimulateTx`,`requestWithdrawalWithPermitSimulateTx` fixed account hoisting | ||
- `getClaimableRequestsETHByAccount` now returns only claimable requests | ||
|
||
## Playground | ||
|
||
- Playground now has custom RPC input | ||
|
||
## Tests | ||
|
||
- All modules are covered by unit tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { beforeAll, describe } from '@jest/globals'; | ||
import { LidoSDKstETH } from '../steth.js'; | ||
import { | ||
useRpcCore, | ||
useWeb3Core, | ||
} from '../../../tests/utils/fixtures/use-core.js'; | ||
import { expectERC20Wallet } from '../../../tests/utils/expect/expect-erc20-wallet.js'; | ||
import { LIDO_CONTRACT_NAMES } from '../../index.js'; | ||
import { useStake } from '../../../tests/utils/fixtures/use-stake.js'; | ||
import { useTestsEnvs } from '../../../tests/utils/fixtures/use-test-envs.js'; | ||
import { SPENDING_TIMEOUT } from '../../../tests/utils/test-spending.js'; | ||
|
||
describe('LidoSDKstETH', () => { | ||
const rpcCore = useRpcCore(); | ||
const web3Core = useWeb3Core(); | ||
const stake = useStake(); | ||
const { skipSpendingTests } = useTestsEnvs(); | ||
|
||
const constructedWithRpcCore = new LidoSDKstETH({ core: rpcCore }); | ||
const constructedWithWeb3Core = new LidoSDKstETH({ core: web3Core }); | ||
|
||
beforeAll(async () => { | ||
if (!skipSpendingTests) await stake.stakeEth({ value: 500n }); | ||
}, SPENDING_TIMEOUT); | ||
|
||
expectERC20Wallet({ | ||
contractName: LIDO_CONTRACT_NAMES.lido, | ||
constructedWithRpcCore, | ||
constructedWithWeb3Core, | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { describe } from '@jest/globals'; | ||
import { LidoSDKstETH } from '../steth.js'; | ||
import { | ||
useRpcCore, | ||
useWeb3Core, | ||
} from '../../../tests/utils/fixtures/use-core.js'; | ||
import { expectERC20 } from '../../../tests/utils/expect/expect-erc20.js'; | ||
import { LIDO_CONTRACT_NAMES } from '../../index.js'; | ||
|
||
describe('LidoSDKstETH', () => { | ||
const rpcCore = useRpcCore(); | ||
const web3Core = useWeb3Core(); | ||
|
||
const constructedWithRpcCore = new LidoSDKstETH({ core: rpcCore }); | ||
const constructedWithWeb3Core = new LidoSDKstETH({ core: web3Core }); | ||
|
||
expectERC20({ | ||
contractName: LIDO_CONTRACT_NAMES.lido, | ||
constructedWithRpcCore, | ||
constructedWithWeb3Core, | ||
ModulePrototype: LidoSDKstETH, | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { beforeAll, describe } from '@jest/globals'; | ||
import { LidoSDKwstETH } from '../wsteth.js'; | ||
import { | ||
useRpcCore, | ||
useWeb3Core, | ||
} from '../../../tests/utils/fixtures/use-core.js'; | ||
import { expectERC20Wallet } from '../../../tests/utils/expect/expect-erc20-wallet.js'; | ||
import { LIDO_CONTRACT_NAMES } from '../../index.js'; | ||
import { SPENDING_TIMEOUT } from '../../../tests/utils/test-spending.js'; | ||
import { useWrap } from '../../../tests/utils/fixtures/use-wrap.js'; | ||
import { useTestsEnvs } from '../../../tests/utils/fixtures/use-test-envs.js'; | ||
|
||
describe('LidoSDKwstETH', () => { | ||
const rpcCore = useRpcCore(); | ||
const web3Core = useWeb3Core(); | ||
const wrap = useWrap(); | ||
const { skipSpendingTests } = useTestsEnvs(); | ||
|
||
const constructedWithRpcCore = new LidoSDKwstETH({ core: rpcCore }); | ||
const constructedWithWeb3Core = new LidoSDKwstETH({ core: web3Core }); | ||
|
||
beforeAll(async () => { | ||
if (!skipSpendingTests) await wrap.wrapEth({ value: 600n }); | ||
}, SPENDING_TIMEOUT); | ||
|
||
expectERC20Wallet({ | ||
contractName: LIDO_CONTRACT_NAMES.wsteth, | ||
constructedWithRpcCore, | ||
constructedWithWeb3Core, | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { describe } from '@jest/globals'; | ||
import { LidoSDKwstETH } from '../wsteth.js'; | ||
import { | ||
useRpcCore, | ||
useWeb3Core, | ||
} from '../../../tests/utils/fixtures/use-core.js'; | ||
import { expectERC20 } from '../../../tests/utils/expect/expect-erc20.js'; | ||
import { LIDO_CONTRACT_NAMES } from '../../index.js'; | ||
|
||
describe('LidoSDKWsteth', () => { | ||
const rpcCore = useRpcCore(); | ||
const web3Core = useWeb3Core(); | ||
|
||
const constructedWithRpcCore = new LidoSDKwstETH({ core: rpcCore }); | ||
const constructedWithWeb3Core = new LidoSDKwstETH({ core: web3Core }); | ||
|
||
expectERC20({ | ||
contractName: LIDO_CONTRACT_NAMES.wsteth, | ||
constructedWithRpcCore, | ||
constructedWithWeb3Core, | ||
ModulePrototype: LidoSDKwstETH, | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.