Commit d045fdc5 authored by isstuev's avatar isstuev

tmp

parent 42149143
......@@ -62,3 +62,4 @@ NEXT_PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID=__PLACEHOLDER_FOR_NEXT_PUBLIC_GOOGLE_AN
# l2 config
NEXT_PUBLIC_IS_L2_NETWORK=__PLACEHOLDER_FOR_NEXT_PUBLIC_IS_L2_NETWORKL__
NEXT_PUBLIC_L1_BASE_URL=__PLACEHOLDER_FOR_NEXT_PUBLIC_L1_BASE_URL__
NEXT_PUBLIC_L2_WITHDRAWAL_URL=__PLACEHOLDER_FOR_NEXT_PUBLIC_L2_WITHDRAWAL_URL__
......@@ -139,6 +139,7 @@ The app instance could be customized by passing following variables to NodeJS en
| --- | --- | --- | --- |
| NEXT_PUBLIC_IS_L2_NETWORK | `boolean` *(optional)* | Set to true for L2 solutions (Optimism Bedrock based) | false |
| NEXT_PUBLIC_L1_BASE_URL | `string` *(optional)* | Base Blockscout URL for L1 network | `'http://eth-goerli.blockscout.com'` |
| NEXT_PUBLIC_L2_WITHDRAWAL_URL | `string` *(optional)* | URL for L2 -> L1 withdrawals | `https://app.optimism.io/bridge/withdraw` |
### Marketplace app configuration properties
......
......@@ -110,6 +110,7 @@ const config = Object.freeze({
L2: {
isL2Network: getEnvValue(process.env.NEXT_PUBLIC_IS_L2_NETWORK) === 'true',
L1BaseUrl: getEnvValue(process.env.NEXT_PUBLIC_L1_BASE_URL),
withdrawalUrl: getEnvValue(process.env.NEXT_PUBLIC_L2_WITHDRAWAL_URL) || '',
},
statsApi: {
endpoint: getEnvValue(process.env.NEXT_PUBLIC_STATS_API_HOST),
......
export const data = {
items: [
{
challenge_period_end: null,
from: '0x67aab90c548b284be30b05c376001b4db90b87ba',
l1_tx_hash: null,
l2_timestamp: '2023-02-15T12:50:02.000000Z',
l2_tx_hash: '0x918cd8c5c24c17e06cd02b0379510c4ad56324bf153578fb9caaaa2fe4e7dc35',
msg_nonce: 396,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620172',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: '0x89e73303049ee32919903c09e8de5629b84f59eb',
l1_tx_hash: '0xf652ce024516713af6047771cd9a44f43a3edb364dfc0605cf151582ad6704c8',
l2_timestamp: '2023-02-15T08:31:44.000000Z',
l2_tx_hash: '0xc6377fde82ab495b397ee60ab94001df044a9e519662813688d7de8ade9fb3df',
msg_nonce: 395,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620171',
msg_nonce_version: 1,
status: 'Relayed',
},
{
challenge_period_end: null,
from: '0xa490856fcb168b2a555a237dc86c4166199b1115',
l1_tx_hash: '0x392e521ec9519e37434e215720816443c39bfeee871f1f9969c897c649759ee4',
l2_timestamp: '2023-02-15T05:08:56.000000Z',
l2_tx_hash: '0x65b8db3f2b2cc88d61d18bcf8771101b1ad3bd643d4fd556a97ed05fc545a70c',
msg_nonce: 394,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620170',
msg_nonce_version: 1,
status: 'Relayed',
},
{
challenge_period_end: null,
from: '0xa490856fcb168b2a555a237dc86c4166199b1115',
l1_tx_hash: '0x41048f9e52f6320a82488acec0f82c35191d8fe683fcc945aa02f3646372d9a1',
l2_timestamp: '2023-02-15T04:59:32.000000Z',
l2_tx_hash: '0xdaf9231cd6fe8ec06bec233e9db0010ccd6e2a2004c9ccb5093f532d47d77854',
msg_nonce: 393,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620169',
msg_nonce_version: 1,
status: 'Relayed',
},
{
challenge_period_end: null,
from: '0xa490856fcb168b2a555a237dc86c4166199b1115',
l1_tx_hash: null,
l2_timestamp: '2023-02-15T04:33:08.000000Z',
l2_tx_hash: '0x5a72f0361777bebb0b7866f4a030aaa070b0abf625d9b96ea895d9bfa22de73c',
msg_nonce: 392,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620168',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0x2f117bee32ac10cb7efdad98415737484ca66386e491cde9e17d42b136def593',
msg_nonce: 391,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620167',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0xe14b1f46838176702244a5343629bcecf728ca2d9881d47b4ce46e00c387d7e3',
msg_nonce: 390,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620166',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0xb41a4416f287f84667f26576d36bc78b898e738384e9e50a8f3fc6ae611466e8',
msg_nonce: 389,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620165',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0x42c6194e8c4ce60ad7c47b25ca61fdad2fce83a53924d67fae1a9d2893e4eb98',
msg_nonce: 388,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620164',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0x1dca78f32e22433018c6815894fd40af1852e308081f2349932ee4e58e023dac',
msg_nonce: 387,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620163',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0xc01ad8e7caad7e60c09d04fdc9d1f748c8b074260b5e4f5dcee06022b12a4266',
msg_nonce: 386,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620162',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0x43390e2e46a649c128882bff6178c60ad4a1c53a346e0b450a4e133181a5f403',
msg_nonce: 385,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620161',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0x7e613e000698889bfbfb352b3649a4266d536b1d88de6de1f58b7b104a34c718',
msg_nonce: 384,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620160',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0xadf35de98ecd1f4182e37a581608747ffc77010b21e512b13e4dd69e67eaf410',
msg_nonce: 383,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620159',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0x4e973d347a2957374144fa72d91d92cb0cfed54d74b44e4b1e5138f075080123',
msg_nonce: 382,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620158',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0x850db25c1b83dc08b90348af7d24c4bc6046f112507be9b2d0505864e8861471',
msg_nonce: 381,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620157',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0xb9af10da74f5eef4d6c694047c8b22a46db8419dfeef13b94b8dd572c30f6dfe',
msg_nonce: 380,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620156',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0xa72108217eaac2e45c2c2988abc7574b2580f12bbf0ab7258124993183d97227',
msg_nonce: 379,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620155',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0xdf272d655a4fdfc83ef2db7d60e10b3088607d7a8331e12a341f48fa14ad626d',
msg_nonce: 378,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620154',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0xf1713fc5c348f7d5e1cdb6c45bd58f1c188270b38074cd2f273b8a55b08e8e2b',
msg_nonce: 377,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620153',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0x8de673aed048faf5ef33c3a0b7d44d4dfb9c479661a5e234a92f05c562d06601',
msg_nonce: 376,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620152',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0x09cab1f70b0d25a3db376edaf4fd8d6f7de81c037ed98ac09c0e07554e6159ce',
msg_nonce: 375,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620151',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0x790b6cc0e7cf319671c7b65e92486ca3bb69cc9d72de508cf6d0194055bf9a83',
msg_nonce: 374,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620150',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0x9243dabff0b9a22f82fd5ffa92259dea006350759d4cbcd8c857502c4d573b16',
msg_nonce: 373,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620149',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0x09dc449f1d1a48dd4154347ea1801cdc8ed95d3faeb93f48003d7a63ef34a7d3',
msg_nonce: 372,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620148',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0x87d9089ea048c012c5318df64023ec3700057b5435768255919a650a64f91da4',
msg_nonce: 371,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620147',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0xfe3b10140419f025f5d0885fcfc204d3d7916d0ee61ae6a4eece2750183d831a',
msg_nonce: 370,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620146',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0xcf04507316ad20eb0aaed976cd68a5ae7b63313ca7240379200f51a46fd19c3d',
msg_nonce: 369,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620145',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0x7119863c6dff546a45878b41c082cf403d3896d27ce8fe71ca061a7dfbf0fd3f',
msg_nonce: 368,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620144',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0xa95bd36d140780424f59576c08f0af28de41ff31429d646292e41991ca94574a',
msg_nonce: 367,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620143',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0x3a4de7658567a66a1c0907f25b9107592e1e519e3782cd4a8e14f2db809ad9a6',
msg_nonce: 366,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620142',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0xcf9b11ebeefeb0cd8907e98786bb5cbaf8ef8aa2341aada400ca53b4b1f06169',
msg_nonce: 365,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620141',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0x09615ff6f1a656088602d3e8270c451c2d5341fc57c6e625fa7c9e2528b5991d',
msg_nonce: 364,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620140',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0xb5e9941f3373b102f4593144b3d6abe59d5c5ddcda7ececdb03dee92bbf43e2c',
msg_nonce: 363,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620139',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0x39f075a49baa2b8b7adec15debe90542685d298030af57ee4a6ca0429e4e871c',
msg_nonce: 362,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620138',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0xe5c0f3bc14964b56e2eb79690f6fcf54d674a8c2d0769c46bd27b962b4c93e87',
msg_nonce: 361,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620137',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0x1d98390a7f47f9c18728bec41f1abf9d1de66b5525c77268d70697865f12fbb7',
msg_nonce: 360,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620136',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0xba59660fb2bd0b2819d45c89357748cd4e6ba38a2d152aff9661e3ddec562744',
msg_nonce: 359,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620135',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0x9e29edc7d7a9dd0fcddfad621dbe3ab095adb9b77f07953bba29ac5a7ab03e8a',
msg_nonce: 358,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620134',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0x55d898f9da6365a13e56c2494a148e3c650a4ae902799774cf5a5ca7afaf7504',
msg_nonce: 357,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620133',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0xddad3f73ba8675f7ae22ec9213ec6198ce4dac9a1cc7ad2ede1e89792707f2fa',
msg_nonce: 356,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620132',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0x3f16e93a6716f768ee6e4817b16bc234f2ed8000e8f197f04ed4fdd6329f62ff',
msg_nonce: 355,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620131',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0x0408ac11500ae36245ab632f36c8792a72a9e2ce05532fa130d21a999f922fc5',
msg_nonce: 354,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620130',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: '0x819b555bc1622cc289ce556b003af235b9e72fd850ab03c87baf75115d748d34',
l2_timestamp: null,
l2_tx_hash: '0x92b0107ccc740d322c4f0f3e35b54d3b29069823cba9bdbb83be25021b7ad1d9',
msg_nonce: 353,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620129',
msg_nonce_version: 1,
status: 'Relayed',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: '0xf1350d4743a3b94e14a007c207c20d61258eba882e81d5d9a385babd537f22d2',
l2_timestamp: null,
l2_tx_hash: '0xe6630f999b05b8166030d37a5b5e3be93f62f38c06bf1f552f2fbb8170354cdb',
msg_nonce: 352,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620128',
msg_nonce_version: 1,
status: 'Relayed',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: '0x1abb0e8d23a249cd330869fefb539f53c88462973dc8b1782b8c6117821446fb',
l2_timestamp: null,
l2_tx_hash: '0x06c970b2c09f680688187f3c3348eee7023d589a64fc05784a745bb282357f79',
msg_nonce: 351,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620127',
msg_nonce_version: 1,
status: 'Relayed',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: '0xe9f172dd2686ab79f7586e77f18f1bd3626fec763ca6d9e94160aa2e005bd03c',
l2_timestamp: null,
l2_tx_hash: '0xd42568cda60abda5a1e930bc672f9c568b427dcae80bf6c4a79b6562a795d82c',
msg_nonce: 350,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620126',
msg_nonce_version: 1,
status: 'Relayed',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0xab7944a44bec053c60ff33bb6808b5ed7d70e2bba07cf7c09189906e5328e98e',
msg_nonce: 349,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620125',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0x902b1d1598e05d24faaef88ecd5db3e18d16027254666d9ccc5369f9b6b85ff4',
msg_nonce: 348,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620124',
msg_nonce_version: 1,
status: 'Ready to prove',
},
{
challenge_period_end: null,
from: null,
l1_tx_hash: null,
l2_timestamp: null,
l2_tx_hash: '0x5a351c0c5783b6cac0fc7ad4b330a4c0765a3da85c099b89d1b9233ca833beef',
msg_nonce: 347,
msg_nonce_raw: '1766847064778384329583297500742918515827483896875618958121606201292620123',
msg_nonce_version: 1,
status: 'Ready to prove',
},
],
next_page_params: {
items_count: 50,
nonce: '1766847064778384329583297500742918515827483896875618958121606201292620123',
},
total: 397,
};
import type { NextPage } from 'next';
import Head from 'next/head';
import React from 'react';
import getNetworkTitle from 'lib/networks/getNetworkTitle';
import Withdrawals from 'ui/pages/Withdrawals';
const WithdrawalsPage: NextPage = () => {
const title = getNetworkTitle();
return (
<>
<Head>
<title>{ title }</title>
</Head>
<Withdrawals/>
</>
);
};
export default WithdrawalsPage;
export { getServerSideProps } from 'lib/next/getServerSidePropsL2';
export type WithdrawalsItem = {
'challenge_period_end': string | null;
'from': string | null;
'l1_tx_hash': string | null;
'l2_timestamp': string | null;
'l2_tx_hash': string;
'msg_nonce': number;
'msg_nonce_version': number;
'status': string;
}
export type WithdrawalStatus =
'In challenge period' |
'Ready for Relay' |
'Relayed' |
'Waiting for state root' |
'Ready to prove';
export type WithdrawalsResponse = {
items: Array<WithdrawalsItem>;
'next_page_params': {
'items_count': number;
'nonce': string;
};
total: number;
}
......@@ -38,7 +38,8 @@ declare module "nextjs-routes" {
| DynamicRoute<"/tx/[hash]", { "hash": string }>
| StaticRoute<"/txs">
| StaticRoute<"/verified-contracts">
| StaticRoute<"/visualize/sol2uml">;
| StaticRoute<"/visualize/sol2uml">
| StaticRoute<"/withdrawals">;
interface StaticRoute<Pathname> {
pathname: Pathname;
......
import { Flex, Hide, Show, Skeleton, Text } from '@chakra-ui/react';
import React from 'react';
import { data as dataMock } from 'data/withdrawals';
import { rightLineArrow } from 'lib/html-entities';
import isBrowser from 'lib/isBrowser';
import Page from 'ui/shared/Page/Page';
import PageTitle from 'ui/shared/Page/PageTitle';
import SkeletonList from 'ui/shared/skeletons/SkeletonList';
import SkeletonTable from 'ui/shared/skeletons/SkeletonTable';
import WithdrawalsListItem from 'ui/withdrawals/WithdrawalsListItem';
import WithdrawalsTable from 'ui/withdrawals/WithdrawalsTable';
const Withdrawals = () => {
// request!!
const [ isLoading, setIsLoading ] = React.useState(true);
React.useEffect(() => {
if (isBrowser()) {
setTimeout(() => setIsLoading(false), 2000);
}
}, []);
const data = dataMock;
const isPaginationVisible = false;
const content = (() => {
if (isLoading) {
return (
<>
<SkeletonList display={{ base: 'block', lg: 'none' }}/>
{ /* !!! */ }
<SkeletonTable display={{ base: 'none', lg: 'block' }} columns={ [ '130px', '120px', '15%', '45%', '35%' ] }/>
</>
);
}
return (
<>
<Show below="lg" ssr={ false }>{ data.items.map((item => <WithdrawalsListItem key={ item.l2_tx_hash } { ...item }/>)) }</Show>
<Hide below="lg" ssr={ false }><WithdrawalsTable items={ data.items } top={ isPaginationVisible ? 80 : 0 }/></Hide>
</>
);
})();
return (
<Page>
<PageTitle text={ `Withdrawals (L2 ${ rightLineArrow } L1)` } withTextAd/>
{ isLoading ? <Skeleton w="400px" h="26px" mb={ 7 }/> : <Text>A total of { data.total } withdrawals found</Text> }
{ /* Pagination */ }
{ content }
</Page>
);
};
export default Withdrawals;
import React from "react";
const WithdrawalsListItem = () => {
return null;
}
export default WithdrawalsListItem;
\ No newline at end of file
import { Table, Tbody, Th, Tr } from '@chakra-ui/react';
import React from 'react';
import type { WithdrawalsItem } from 'types/api/withdrawals';
import { default as Thead } from 'ui/shared/TheadSticky';
import WithdrawalsTableItem from './WithdrawalsTableItem';
type Props = {
items: Array<WithdrawalsItem>;
top: number;
}
const WithdrawalsTable = ({ items, top }: Props) => {
return (
<Table variant="simple" size="sm" style={{ tableLayout: 'auto' }}>
<Thead top={ top }>
<Tr>
<Th>Msg nonce</Th>
<Th>From</Th>
<Th>L2 txn hash</Th>
<Th>Age</Th>
<Th>Status</Th>
<Th>L1 txn hash</Th>
<Th>Time left</Th>
</Tr>
</Thead>
<Tbody>
{ items.map((item) => (
<WithdrawalsTableItem key={ item.l2_tx_hash } { ...item }/>
)) }
</Tbody>
</Table>
);
};
export default WithdrawalsTable;
/* eslint-disable @typescript-eslint/naming-convention */
import { Box, Flex, Td, Tr, Text, Icon } from '@chakra-ui/react';
import { route } from 'nextjs-routes';
import React from 'react';
import type { WithdrawalsItem } from 'types/api/withdrawals';
import appConfig from 'configs/app/config';
import txIcon from 'icons/transactions.svg';
import txBatchIcon from 'icons/txBatch.svg';
import useTimeAgoIncrement from 'lib/hooks/useTimeAgoIncrement';
import Address from 'ui/shared/address/Address';
import AddressIcon from 'ui/shared/address/AddressIcon';
import AddressLink from 'ui/shared/address/AddressLink';
import CopyToClipboard from 'ui/shared/CopyToClipboard';
import HashStringShorten from 'ui/shared/HashStringShorten';
import HashStringShortenDynamic from 'ui/shared/HashStringShortenDynamic';
import LinkExternal from 'ui/shared/LinkExternal';
import LinkInternal from 'ui/shared/LinkInternal';
type Props = WithdrawalsItem;
const OutputRootsTableItem = ({
msg_nonce,
msg_nonce_version,
l1_tx_hash,
l2_timestamp,
l2_tx_hash,
from,
status,
challenge_period_end,
}: Props) => {
const timeAgo = l2_timestamp ? useTimeAgoIncrement(l2_timestamp, false) : 'N/A';
return (
<Tr>
<Td verticalAlign="middle" fontWeight={ 600 }>
<Text>{ msg_nonce_version + '-' + msg_nonce }</Text>
</Td>
<Td verticalAlign="middle">
{ from ? (
<Address>
{ /* address info?? */ }
<AddressIcon address={{ hash: from, is_contract: false, implementation_name: null }}/>
<AddressLink hash={ from } type="address" truncation="constant" ml={ 2 }/>
</Address>
) : 'N/A' }
</Td>
<Td verticalAlign="middle">
<LinkInternal href={ route({ pathname: '/tx/[hash]', query: { hash: l2_tx_hash } }) } display="flex" alignItems="center">
<Icon as={ txIcon } boxSize={ 6 } mr={ 1 }/>
<Box w="calc(100% - 36px)" overflow="hidden" whiteSpace="nowrap"><HashStringShorten hash={ l2_tx_hash }/></Box>
</LinkInternal>
</Td>
<Td verticalAlign="middle" pr={ 12 }>
<Text variant="secondary">{ timeAgo }</Text>
</Td>
<Td verticalAlign="middle">
{ status === 'Ready for Relay' ?
<LinkExternal title={ status } href={ appConfig.l2.withdrawalUrl }/> :
<Text>{ status }</Text>
}
</Td>
<Td verticalAlign="middle">
{ l1_tx_hash ?
//!!!
<LinkExternal title='aaa' href={ appConfig.l2.withdrawalUrl }/> :
'N/A'
}
</Td>
<Td verticalAlign="middle">
{ challenge_period_end ? challenge_period_end : '-'}
</Td>
</Tr>
);
};
export default OutputRootsTableItem;
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