Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
d08cae17
Unverified
Commit
d08cae17
authored
Apr 08, 2021
by
Noah Zinsmeister
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update to latest deploy + multicall 2
parent
f0f4110b
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
341 additions
and
165 deletions
+341
-165
index.ts
src/connectors/index.ts
+1
-1
abi.json
src/constants/multicall/abi.json
+324
-142
index.ts
src/constants/multicall/index.ts
+5
-6
index.ts
src/constants/v3/index.ts
+10
-15
updater.tsx
src/state/multicall/updater.tsx
+1
-1
No files found.
src/connectors/index.ts
View file @
d08cae17
...
@@ -27,7 +27,7 @@ export function getNetworkLibrary(): Web3Provider {
...
@@ -27,7 +27,7 @@ export function getNetworkLibrary(): Web3Provider {
}
}
export
const
injected
=
new
InjectedConnector
({
export
const
injected
=
new
InjectedConnector
({
supportedChainIds
:
[
1
,
3
,
4
,
5
,
42
,
1337
],
supportedChainIds
:
[
1
,
3
,
4
,
5
,
42
],
})
})
// mainnet only
// mainnet only
...
...
src/constants/multicall/abi.json
View file @
d08cae17
This diff is collapsed.
Click to expand it.
src/constants/multicall/index.ts
View file @
d08cae17
import
{
ChainId
}
from
'
@uniswap/sdk-core
'
import
{
ChainId
}
from
'
@uniswap/sdk-core
'
import
MULTICALL_ABI
from
'
./abi.json
'
import
MULTICALL_ABI
from
'
./abi.json
'
const
MULTICALL_NETWORKS
:
{
[
chainId
in
ChainId
|
1337
]:
string
}
=
{
const
MULTICALL_NETWORKS
:
{
[
chainId
in
ChainId
]:
string
}
=
{
[
ChainId
.
MAINNET
]:
'
0xeefBa1e63905eF1D7ACbA5a8513c70307C1cE441
'
,
[
ChainId
.
MAINNET
]:
'
0xeefBa1e63905eF1D7ACbA5a8513c70307C1cE441
'
,
[
ChainId
.
ROPSTEN
]:
'
0x53C43764255c17BD724F74c4eF150724AC50a3ed
'
,
[
ChainId
.
ROPSTEN
]:
'
0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696
'
,
[
ChainId
.
KOVAN
]:
'
0x2cc8688C5f75E365aaEEb4ea8D6a480405A48D2A
'
,
[
ChainId
.
KOVAN
]:
'
0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696
'
,
[
ChainId
.
RINKEBY
]:
'
0x42Ad527de7d4e9d9d011aC45B31D8551f8Fe9821
'
,
[
ChainId
.
RINKEBY
]:
'
0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696
'
,
[
ChainId
.
G
Ö
RLI
]:
'
0x77dCa2C955b15e9dE4dbBCf1246B4B85b651e50e
'
,
[
ChainId
.
G
Ö
RLI
]:
'
0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696
'
,
[
1337
]:
'
0xFeabCc62240297F1e4b238937D68e7516f0918D7
'
,
}
}
export
{
MULTICALL_ABI
,
MULTICALL_NETWORKS
}
export
{
MULTICALL_ABI
,
MULTICALL_NETWORKS
}
src/constants/v3/index.ts
View file @
d08cae17
import
{
ChainId
}
from
'
@uniswap/sdk-core
'
import
{
ChainId
}
from
'
@uniswap/sdk-core
'
export
const
FACTORY_ADDRESSES
:
{
[
chainId
in
ChainId
|
1337
]:
string
}
=
{
export
const
FACTORY_ADDRESSES
:
{
[
chainId
in
ChainId
]:
string
}
=
{
[
ChainId
.
MAINNET
]:
''
,
[
ChainId
.
MAINNET
]:
''
,
[
ChainId
.
ROPSTEN
]:
''
,
[
ChainId
.
ROPSTEN
]:
''
,
[
ChainId
.
RINKEBY
]:
''
,
[
ChainId
.
RINKEBY
]:
''
,
[
ChainId
.
G
Ö
RLI
]:
''
,
[
ChainId
.
G
Ö
RLI
]:
'
0x2e52A6ed50aeD4396BdC5889ACB9D04F6804D150
'
,
[
ChainId
.
KOVAN
]:
''
,
[
ChainId
.
KOVAN
]:
''
,
[
1337
]:
'
0x49A6d0854B0fF95065f0dA247b8a2d440D92D2c7
'
,
}
}
export
const
TICK_LENS_ADDRESSES
:
{
[
chainId
in
ChainId
|
1337
]:
string
}
=
{
export
const
TICK_LENS_ADDRESSES
:
{
[
chainId
in
ChainId
]:
string
}
=
{
[
ChainId
.
MAINNET
]:
''
,
[
ChainId
.
MAINNET
]:
''
,
[
ChainId
.
ROPSTEN
]:
''
,
[
ChainId
.
ROPSTEN
]:
''
,
[
ChainId
.
RINKEBY
]:
''
,
[
ChainId
.
RINKEBY
]:
''
,
[
ChainId
.
G
Ö
RLI
]:
''
,
[
ChainId
.
G
Ö
RLI
]:
'
0x637df729C49f229B328445AB64573B726F6814dC
'
,
[
ChainId
.
KOVAN
]:
''
,
[
ChainId
.
KOVAN
]:
''
,
[
1337
]:
'
0x99Cb00560BFca3E5B7Cda8e820dDFF1ED403966E
'
,
}
}
export
const
NONFUNGIBLE_POSITION_MANAGER_ADDRESSES
:
{
[
chainId
in
ChainId
|
1337
]:
string
}
=
{
export
const
NONFUNGIBLE_POSITION_MANAGER_ADDRESSES
:
{
[
chainId
in
ChainId
]:
string
}
=
{
[
ChainId
.
MAINNET
]:
''
,
[
ChainId
.
MAINNET
]:
''
,
[
ChainId
.
ROPSTEN
]:
''
,
[
ChainId
.
ROPSTEN
]:
''
,
[
ChainId
.
RINKEBY
]:
''
,
[
ChainId
.
RINKEBY
]:
''
,
[
ChainId
.
G
Ö
RLI
]:
''
,
[
ChainId
.
G
Ö
RLI
]:
'
0x514A3562Bbf313B262A4d2377B559CDe75FAC3C9
'
,
[
ChainId
.
KOVAN
]:
''
,
[
ChainId
.
KOVAN
]:
''
,
[
1337
]:
'
0x273Edaa13C845F605b5886Dd66C89AB497A6B17b
'
,
}
}
export
const
NONFUNGIBLE_TOKEN_POSITION_DESCRIPTOR_ADDRESSES
:
{
[
chainId
in
ChainId
|
1337
]:
string
}
=
{
export
const
NONFUNGIBLE_TOKEN_POSITION_DESCRIPTOR_ADDRESSES
:
{
[
chainId
in
ChainId
]:
string
}
=
{
[
ChainId
.
MAINNET
]:
''
,
[
ChainId
.
MAINNET
]:
''
,
[
ChainId
.
ROPSTEN
]:
''
,
[
ChainId
.
ROPSTEN
]:
''
,
[
ChainId
.
RINKEBY
]:
''
,
[
ChainId
.
RINKEBY
]:
''
,
[
ChainId
.
G
Ö
RLI
]:
''
,
[
ChainId
.
G
Ö
RLI
]:
'
0x2a3DB14c12674986f6F52deaD1d5ee0919715E8A
'
,
[
ChainId
.
KOVAN
]:
''
,
[
ChainId
.
KOVAN
]:
''
,
[
1337
]:
'
0x3d137e860008BaF6d1c063158e5ec0baBbcFefF8
'
,
}
}
export
const
SWAP_ROUTER_ADDRESSES
:
{
[
chainId
in
ChainId
|
1337
]:
string
}
=
{
export
const
SWAP_ROUTER_ADDRESSES
:
{
[
chainId
in
ChainId
]:
string
}
=
{
[
ChainId
.
MAINNET
]:
''
,
[
ChainId
.
MAINNET
]:
''
,
[
ChainId
.
ROPSTEN
]:
''
,
[
ChainId
.
ROPSTEN
]:
''
,
[
ChainId
.
RINKEBY
]:
''
,
[
ChainId
.
RINKEBY
]:
''
,
[
ChainId
.
G
Ö
RLI
]:
''
,
[
ChainId
.
G
Ö
RLI
]:
'
0x86e14633F8ab81FD49aEF388172A43A7C8731664
'
,
[
ChainId
.
KOVAN
]:
''
,
[
ChainId
.
KOVAN
]:
''
,
[
1337
]:
'
0x80AacDBEe92DC1c2Fbaa261Fb369696AF1AD9f98
'
,
}
}
src/state/multicall/updater.tsx
View file @
d08cae17
...
@@ -30,7 +30,7 @@ async function fetchChunk(
...
@@ -30,7 +30,7 @@ async function fetchChunk(
console
.
debug
(
'
Fetching chunk
'
,
multicallContract
,
chunk
,
minBlockNumber
)
console
.
debug
(
'
Fetching chunk
'
,
multicallContract
,
chunk
,
minBlockNumber
)
let
resultsBlockNumber
,
returnData
let
resultsBlockNumber
,
returnData
try
{
try
{
;[
resultsBlockNumber
,
returnData
]
=
await
multicallContract
.
aggregate
(
;[
resultsBlockNumber
,
returnData
]
=
await
multicallContract
.
callStatic
.
aggregate
(
chunk
.
map
((
obj
)
=>
[
obj
.
address
,
obj
.
callData
])
chunk
.
map
((
obj
)
=>
[
obj
.
address
,
obj
.
callData
])
)
)
}
catch
(
error
)
{
}
catch
(
error
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment