-
-
Notifications
You must be signed in to change notification settings - Fork 250
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(networks): add Linea network (#12782)
* add linea basic config * set featured to false * subgraph dummy endpoints * add unlock address * api verif key * Update packages/networks/src/networks/linea.ts * more linea setup * comment features * add workaround to deploy to linea graph * update graph start block and name * fixed network name helper * added missing contracts on linea * adding linea RPC provider --------- Co-authored-by: Julien Genestoux <julien.genestoux@gmail.com>
- Loading branch information
Showing
12 changed files
with
616 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
import { HookType, NetworkConfig } from '@unlock-protocol/types' | ||
|
||
export const linea: NetworkConfig = { | ||
blockScan: { | ||
url: (address: string) => `https://blockscan.com/address/${address}`, | ||
}, | ||
chain: 'linea', | ||
description: | ||
'Linea a Layer 2 zk-Rollup EVM-compatible chain powered by ConsenSys.', | ||
explorer: { | ||
name: 'Linea', | ||
urls: { | ||
address: (address: string) => | ||
`https://lineascan.build/address/${address}`, | ||
base: `https://lineascan.build/`, | ||
token: (address: string, holder: string) => | ||
`https://lineascan.build/token/${address}?a=${holder}`, | ||
transaction: (hash: string) => `https://lineascan.build/tx/${hash}`, | ||
}, | ||
}, | ||
featured: false, | ||
hooks: { | ||
onKeyPurchaseHook: [ | ||
{ | ||
address: '0x6878Ae3c863f6Ebd27B47C02F6B32aAC8B0BA07E', | ||
id: HookType.PASSWORD, | ||
name: 'Password required', | ||
}, | ||
{ | ||
address: '0x8c5D54B2CAA4C2D08B0DDF82a1e6D2641779B8EC', | ||
id: HookType.CAPTCHA, | ||
name: 'Captcha', | ||
}, | ||
{ | ||
address: '0xaE8F3F0826A39122401ED634f0a5C19549331432', | ||
id: HookType.GUILD, | ||
name: 'Guild', | ||
}, | ||
{ | ||
address: '0xCD9C9b40D757b56359e19563203D3bc64089638d', | ||
id: HookType.PROMOCODE, | ||
name: 'Discount code', | ||
}, | ||
], | ||
}, | ||
id: 59144, | ||
|
||
isTestNetwork: false, | ||
|
||
keyManagerAddress: '0x338b1f296217485bf4df6CE9f93ab4C73F72b57D', | ||
|
||
maxFreeClaimCost: 10, | ||
|
||
// multisig: '', // TODO | ||
|
||
name: 'Linea', | ||
|
||
nativeCurrency: { | ||
coingecko: 'linea-eth', | ||
decimals: 18, | ||
name: 'Linea Ether', | ||
symbol: 'ETH', | ||
}, | ||
previousDeploys: [], | ||
provider: 'https://rpc.unlock-protocol.com/59144', | ||
publicLockVersionToDeploy: 13, | ||
publicProvider: 'https://rpc.linea.build/', | ||
startBlock: 560908, | ||
subgraph: { | ||
endpoint: 'https://graph-query.linea.build/subgraphs/name/unlock-protocol', | ||
endpointV2: | ||
'https://graph-query.linea.build/subgraphs/name/unlock-protocol', | ||
// NB: this name should be changed once The Graph supports Linea | ||
networkName: 'linea-mainnet', | ||
}, | ||
tokens: [ | ||
{ | ||
address: '0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f', | ||
decimals: 18, | ||
name: 'Wrapped Ether', | ||
symbol: 'WETH', | ||
}, | ||
{ | ||
address: '0x4AF15ec2A0BD43Db75dd04E62FAA3B8EF36b00d5', | ||
decimals: 18, | ||
name: 'Dai Stablecoin', | ||
symbol: 'DAI', | ||
}, | ||
{ | ||
address: '0xA219439258ca9da29E9Cc4cE5596924745e12B93', | ||
decimals: 6, | ||
name: 'Tether USD', | ||
symbol: 'USDT', | ||
}, | ||
{ | ||
address: '0x176211869cA2b568f2A7D4EE941E073a821EE1ff', | ||
decimals: 6, | ||
name: 'USD Coin', | ||
symbol: 'USDC', | ||
}, | ||
{ | ||
address: '0x3aAB2285ddcDdaD8edf438C1bAB47e1a9D05a9b4', | ||
decimals: 8, | ||
name: 'Wrapped BTC', | ||
symbol: 'WBTC', | ||
}, | ||
], | ||
// uniswapV3: {}, | ||
// universalCard: {}, | ||
unlockAddress: '0x70B3c9Dd9788570FAAb24B92c3a57d99f8186Cc7', | ||
url: 'https://linea.build/', | ||
} | ||
|
||
export default linea |
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
Oops, something went wrong.