feat: update ethers@6

fix: bigint errors

fix: TS errors

fix: gasLimit fetch

fix: review comments

fix: contracts errors

chore: bump rc version

fix: revert wrong fix

fix: ts config

fix: ts config

fix: ts config

feat: update signer
This commit is contained in:
Oleg Nechiporenko
2023-09-07 00:12:07 +03:00
parent 27c426e815
commit c2a4084158
38 changed files with 409 additions and 608 deletions

View File

@@ -195,7 +195,7 @@ describe('Orion', () => {
expect(unit.aggregator.ws.api).toBe(`ws://localhost:${server1.port}/v1`);
expect(unit.blockchainService.api).toBe(blockchainServiceAPI);
expect(unit.priceFeed.api).toBe(orionPriceFeedAPI + '/price-feed');
expect(unit.provider.connection.url).toBe('https://cloudflare-eth.com/');
expect(unit.provider._getConnection().url).toBe('https://cloudflare-eth.com/');
const info = await simpleFetch(unit.blockchainService.getInfo)();
expect(info).toBeDefined();
@@ -246,7 +246,7 @@ describe('Orion', () => {
});
const bscUnit = orion.units[SupportedChainId.BSC_TESTNET]
expect(bscUnit?.provider.connection.url).toBe('https://data-seed-prebsc-1-s1.binance.org:8545/');
expect(bscUnit?.provider._getConnection().url).toBe('https://data-seed-prebsc-1-s1.binance.org:8545/');
expect(orion.referralSystem.api).toBe('https://zxczxc.orionprotocol.io');
});
@@ -312,7 +312,7 @@ describe('Orion', () => {
const network = await unitBSC.provider.getNetwork();
expect(network.chainId).toBe(97);
const zeroAddressWithout0x = ethers.constants.AddressZero.slice(2);
const zeroAddressWithout0x = ethers.ZeroAddress.slice(2);
expect(simpleFetch(orion.referralSystem.getMiniStats)(zeroAddressWithout0x))
.rejects
.toThrow('empty reward history');

View File

@@ -83,7 +83,7 @@ describe('Fee calculation', () => {
const gasPriceGwei = 3;
const feePercent = 0.2;
const baseAssetAddress = '0xcb2951e90d8dcf16e1fa84ac0c83f48906d6a744';
const baseCurrencyAddress = ethers.constants.AddressZero;
const baseCurrencyAddress = ethers.ZeroAddress;
const feeAssetAddress = '0xf223eca06261145b3287a0fefd8cfad371c7eb34';
const { totalFeeInFeeAsset: ornTotalFee } = calculateFeeInFeeAsset(
amount,