Commit 7c7299cd authored by Moody Salem's avatar Moody Salem

bump sdk-core

parent 691ab89a
...@@ -45,7 +45,7 @@ describe('Trade', () => { ...@@ -45,7 +45,7 @@ describe('Trade', () => {
it('can be constructed with ETHER as input', () => { it('can be constructed with ETHER as input', () => {
const trade = new Trade( const trade = new Trade(
new Route([pair_weth_0], ETHER, token0), new Route([pair_weth_0], ETHER, token0),
CurrencyAmount.ether(1, JSBI.BigInt(100)), CurrencyAmount.fromRawAmount(Ether.onChain(1), JSBI.BigInt(100)),
TradeType.EXACT_INPUT TradeType.EXACT_INPUT
) )
expect(trade.inputAmount.currency).toEqual(ETHER) expect(trade.inputAmount.currency).toEqual(ETHER)
...@@ -64,7 +64,7 @@ describe('Trade', () => { ...@@ -64,7 +64,7 @@ describe('Trade', () => {
it('can be constructed with ETHER as output', () => { it('can be constructed with ETHER as output', () => {
const trade = new Trade( const trade = new Trade(
new Route([pair_weth_0], token0, ETHER), new Route([pair_weth_0], token0, ETHER),
CurrencyAmount.ether(1, JSBI.BigInt(100)), CurrencyAmount.fromRawAmount(Ether.onChain(1), JSBI.BigInt(100)),
TradeType.EXACT_OUTPUT TradeType.EXACT_OUTPUT
) )
expect(trade.inputAmount.currency).toEqual(token0) expect(trade.inputAmount.currency).toEqual(token0)
...@@ -164,7 +164,7 @@ describe('Trade', () => { ...@@ -164,7 +164,7 @@ describe('Trade', () => {
it('works for ETHER currency input', () => { it('works for ETHER currency input', () => {
const result = Trade.bestTradeExactIn( const result = Trade.bestTradeExactIn(
[pair_weth_0, pair_0_1, pair_0_3, pair_1_3], [pair_weth_0, pair_0_1, pair_0_3, pair_1_3],
CurrencyAmount.ether(1, JSBI.BigInt(100)), CurrencyAmount.fromRawAmount(Ether.onChain(1), JSBI.BigInt(100)),
token3 token3
) )
expect(result).toHaveLength(2) expect(result).toHaveLength(2)
...@@ -448,7 +448,7 @@ describe('Trade', () => { ...@@ -448,7 +448,7 @@ describe('Trade', () => {
const result = Trade.bestTradeExactOut( const result = Trade.bestTradeExactOut(
[pair_weth_0, pair_0_1, pair_0_3, pair_1_3], [pair_weth_0, pair_0_1, pair_0_3, pair_1_3],
token3, token3,
CurrencyAmount.ether(1, JSBI.BigInt(100)) CurrencyAmount.fromRawAmount(Ether.onChain(1), JSBI.BigInt(100))
) )
expect(result).toHaveLength(2) expect(result).toHaveLength(2)
expect(result[0].inputAmount.currency).toEqual(token3) expect(result[0].inputAmount.currency).toEqual(token3)
......
...@@ -30,7 +30,10 @@ describe('Router', () => { ...@@ -30,7 +30,10 @@ describe('Router', () => {
describe('exact in', () => { describe('exact in', () => {
it.only('ether to token1', () => { it.only('ether to token1', () => {
const result = Router.swapCallParameters( const result = Router.swapCallParameters(
Trade.exactIn(new Route([pair_weth_0, pair_0_1], ETHER, token1), CurrencyAmount.ether(1, JSBI.BigInt(100))), Trade.exactIn(
new Route([pair_weth_0, pair_0_1], ETHER, token1),
CurrencyAmount.fromRawAmount(Ether.onChain(1), JSBI.BigInt(100))
),
{ ttl: 50, recipient: '0x0000000000000000000000000000000000000004', allowedSlippage: new Percent('1', '100') } { ttl: 50, recipient: '0x0000000000000000000000000000000000000004', allowedSlippage: new Percent('1', '100') }
) )
expect(result.methodName).toEqual('swapExactETHForTokens') expect(result.methodName).toEqual('swapExactETHForTokens')
...@@ -45,7 +48,10 @@ describe('Router', () => { ...@@ -45,7 +48,10 @@ describe('Router', () => {
it('deadline specified', () => { it('deadline specified', () => {
const result = Router.swapCallParameters( const result = Router.swapCallParameters(
Trade.exactIn(new Route([pair_weth_0, pair_0_1], ETHER, token1), CurrencyAmount.ether(1, JSBI.BigInt(100))), Trade.exactIn(
new Route([pair_weth_0, pair_0_1], ETHER, token1),
CurrencyAmount.fromRawAmount(Ether.onChain(1), JSBI.BigInt(100))
),
{ {
deadline: 50, deadline: 50,
recipient: '0x0000000000000000000000000000000000000004', recipient: '0x0000000000000000000000000000000000000004',
...@@ -116,7 +122,10 @@ describe('Router', () => { ...@@ -116,7 +122,10 @@ describe('Router', () => {
}) })
it('token1 to ether', () => { it('token1 to ether', () => {
const result = Router.swapCallParameters( const result = Router.swapCallParameters(
Trade.exactOut(new Route([pair_0_1, pair_weth_0], token1, ETHER), CurrencyAmount.ether(1, JSBI.BigInt(100))), Trade.exactOut(
new Route([pair_0_1, pair_weth_0], token1, ETHER),
CurrencyAmount.fromRawAmount(Ether.onChain(1), JSBI.BigInt(100))
),
{ ttl: 50, recipient: '0x0000000000000000000000000000000000000004', allowedSlippage: new Percent('1', '100') } { ttl: 50, recipient: '0x0000000000000000000000000000000000000004', allowedSlippage: new Percent('1', '100') }
) )
expect(result.methodName).toEqual('swapTokensForExactETH') expect(result.methodName).toEqual('swapTokensForExactETH')
...@@ -149,7 +158,10 @@ describe('Router', () => { ...@@ -149,7 +158,10 @@ describe('Router', () => {
describe('exact in', () => { describe('exact in', () => {
it('ether to token1', () => { it('ether to token1', () => {
const result = Router.swapCallParameters( const result = Router.swapCallParameters(
Trade.exactIn(new Route([pair_weth_0, pair_0_1], ETHER, token1), CurrencyAmount.ether(1, JSBI.BigInt(100))), Trade.exactIn(
new Route([pair_weth_0, pair_0_1], ETHER, token1),
CurrencyAmount.fromRawAmount(Ether.onChain(1), JSBI.BigInt(100))
),
{ {
ttl: 50, ttl: 50,
recipient: '0x0000000000000000000000000000000000000004', recipient: '0x0000000000000000000000000000000000000004',
...@@ -235,7 +247,7 @@ describe('Router', () => { ...@@ -235,7 +247,7 @@ describe('Router', () => {
Router.swapCallParameters( Router.swapCallParameters(
Trade.exactOut( Trade.exactOut(
new Route([pair_0_1, pair_weth_0], token1, ETHER), new Route([pair_0_1, pair_weth_0], token1, ETHER),
CurrencyAmount.ether(1, JSBI.BigInt(100)) CurrencyAmount.fromRawAmount(Ether.onChain(1), JSBI.BigInt(100))
), ),
{ {
ttl: 50, ttl: 50,
......
...@@ -1706,10 +1706,10 @@ ...@@ -1706,10 +1706,10 @@
semver "^7.3.2" semver "^7.3.2"
tsutils "^3.17.1" tsutils "^3.17.1"
"@uniswap/sdk-core@^3.0.0-alpha.2": "@uniswap/sdk-core@^3.0.0-alpha.3":
version "3.0.0-alpha.2" version "3.0.0-alpha.3"
resolved "https://registry.yarnpkg.com/@uniswap/sdk-core/-/sdk-core-3.0.0-alpha.2.tgz#58f850a3a4e31c366a7471a92bcf704c35491cdd" resolved "https://registry.yarnpkg.com/@uniswap/sdk-core/-/sdk-core-3.0.0-alpha.3.tgz#a742b430a9587fe48384aa5007706d225497c875"
integrity sha512-X4tqngp/HLNIbfzHLXtf25OeLtgDVHafp6bCGYR29qsWwlOJR+GlQ+cYDuR+3tOZHt6kuJcXG4rAP6vnjkcqkg== integrity sha512-SS6fFbFZT2s/oq1dCdbqLGppVszfL1dkP8uQOIgXm9qecH9Vt70zTwQU73bLP2VskFZcpkN5inTAwSZiZSs5wA==
dependencies: dependencies:
"@ethersproject/address" "^5.0.2" "@ethersproject/address" "^5.0.2"
big.js "^5.2.2" big.js "^5.2.2"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment