@web3-onboard/core
Version:
Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardized spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, mul
393 lines (365 loc) • 368 kB
JavaScript
import { BehaviorSubject, Subject, defer, fromEvent, takeUntil as takeUntil$1, firstValueFrom, fromEventPattern, startWith, shareReplay as shareReplay$1, distinctUntilChanged, filter as filter$1, mapTo, take as take$1 } from 'rxjs';
import { distinctUntilKeyChanged, pluck, filter, shareReplay, withLatestFrom, take, takeUntil, share, switchMap, map, startWith as startWith$1 } from 'rxjs/operators';
import bowser from 'bowser';
import { locale as locale$1, addMessages, init as init$2, getLocaleFromNavigator, _ } from 'svelte-i18n';
import { nanoid } from 'nanoid';
import Joi from 'joi';
import { chainNamespaceValidation, chainIdValidation, chainValidation, validate, chainIdToViemImport, weiToEth, weiHexToEth, isAddress, ProviderRpcErrorCode } from '@web3-onboard/common';
import partition from 'lodash.partition';
import { isHex, toHex } from 'viem';
import merge from 'lodash.merge';
import EventEmitter from 'eventemitter3';
/******************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
function __rest(s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
}
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
var e = new Error(message);
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
};
var defaultBnIcon = `<svg width="756" height="756" viewBox="0 0 756 756" fill="none" xmlns="http://www.w3.org/2000/svg">
<g filter="url(#filter0_d_210_16)">
<rect x="22" y="22" width="712.081" height="712.081" rx="100" fill="white"/>
<rect x="21.5" y="21.5" width="713.081" height="713.081" rx="100.5" stroke="#CCCCCC" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M388.846 243.497C391.572 244.066 394.144 245.216 396.391 246.871C398.905 248.87 400.831 251.522 401.963 254.539C409.105 272.488 416.247 290.426 423.39 308.352C431.294 328.289 439.237 348.23 447.22 368.174C451.381 378.631 455.52 389.098 459.744 399.533C460.643 401.668 461.107 403.962 461.107 406.28C461.107 408.598 460.643 410.893 459.744 413.027L423.444 503.98C421.04 510 416.686 513.743 410.284 514.719C402.319 515.923 395.194 511.974 392.316 504.956C385.505 488.132 378.844 471.255 372.129 454.387L337.984 368.586C327.874 343.124 317.749 317.67 307.611 292.222C304.248 283.772 300.993 275.279 297.479 266.894C296.512 264.614 296.054 262.148 296.139 259.671C296.223 257.193 296.848 254.764 297.969 252.557C299.09 250.349 300.68 248.417 302.625 246.896C304.571 245.376 306.825 244.304 309.228 243.757C309.518 243.692 309.799 243.584 310.079 243.497H388.846Z" fill="url(#paint0_linear_210_16)"/>
<path d="M247.379 243.497C248.273 243.747 249.168 243.963 250.041 244.267C252.313 244.981 254.399 246.198 256.143 247.829C257.887 249.46 259.245 251.464 260.118 253.693C267.915 273.131 275.675 292.584 283.399 312.051C291.217 331.677 299.035 351.307 306.852 370.94C310.675 380.565 314.516 390.187 318.374 399.804C319.238 401.864 319.683 404.077 319.683 406.312C319.683 408.548 319.238 410.761 318.374 412.821C314.063 423.625 309.752 434.425 305.44 445.221C297.536 464.985 289.632 484.748 281.728 504.512C280.487 507.589 278.366 510.226 275.633 512.087C272.901 513.949 269.68 514.952 266.38 514.968C262.884 515.03 259.455 514.004 256.561 512.029C253.667 510.055 251.45 507.228 250.213 503.937C242.906 485.312 235.447 466.742 228.053 448.15C218.144 422.977 208.185 397.823 198.176 372.686C187.987 347.102 177.802 321.513 167.62 295.921C163.761 286.235 159.935 276.527 156.023 266.851C154.313 262.819 154.23 258.277 155.791 254.185C157.353 250.093 160.435 246.773 164.386 244.929C165.82 244.346 167.293 243.867 168.795 243.497H247.379Z" fill="url(#paint1_linear_210_16)"/>
<path d="M599.828 408.922C597.67 416.244 594.438 423.154 591.69 430.215C583.736 450.304 575.738 470.382 567.695 490.449C565.852 495.049 563.976 499.637 562.188 504.258C560.928 507.415 558.759 510.12 555.952 512.021C553.15 513.923 549.845 514.934 546.463 514.923C543.081 514.913 539.784 513.881 536.992 511.963C534.2 510.043 532.042 507.325 530.803 504.16L495.904 416.494L465.724 340.77C455.873 316.046 446.029 291.325 436.192 266.608C435.257 264.348 434.826 261.909 434.929 259.463C435.032 257.017 435.667 254.623 436.79 252.451C437.912 250.279 439.494 248.381 441.424 246.892C443.355 245.402 445.587 244.356 447.962 243.829C448.286 243.753 448.598 243.645 448.921 243.547H527.689C527.934 243.623 528.173 243.72 528.422 243.775C531.184 244.355 533.756 245.627 535.9 247.474C538.043 249.321 539.692 251.682 540.689 254.34C545.272 265.91 549.863 277.448 554.461 288.953C566.497 319.166 578.522 349.379 590.536 379.592C593.695 387.553 597.208 395.374 599.795 403.553L599.828 408.922Z" fill="url(#paint2_linear_210_16)"/>
</g>
<defs>
<filter id="filter0_d_210_16" x="0.348907" y="0.348907" width="755.384" height="755.383" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="10.3255"/>
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
<feBlend mode="overlay" in2="BackgroundImageFix" result="effect1_dropShadow_210_16"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_210_16" result="shape"/>
</filter>
<linearGradient id="paint0_linear_210_16" x1="283.92" y1="265.538" x2="474.49" y2="454.896" gradientUnits="userSpaceOnUse">
<stop stop-color="#FF00A8"/>
<stop offset="1" stop-color="#6200C6"/>
</linearGradient>
<linearGradient id="paint1_linear_210_16" x1="142.528" y1="265.473" x2="333.054" y2="454.788" gradientUnits="userSpaceOnUse">
<stop stop-color="#FF00A8"/>
<stop offset="1" stop-color="#6200C6"/>
</linearGradient>
<linearGradient id="paint2_linear_210_16" x1="422.73" y1="265.469" x2="613.268" y2="454.794" gradientUnits="userSpaceOnUse">
<stop stop-color="#FF00A8"/>
<stop offset="1" stop-color="#6200C6"/>
</linearGradient>
</defs>
</svg>
`;
var poweredByThirdweb = `
<svg width="170" height="17" viewBox="0 0 170 17" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_208_15)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M122.262 1.76074C121.506 1.76074 120.886 2.37313 120.886 3.15393C120.886 3.91942 121.506 4.53181 122.262 4.53181C123.019 4.53181 123.639 3.91942 123.639 3.15393C123.639 2.37313 123.019 1.76074 122.262 1.76074ZM123.472 5.23601H121.068V13.4879H123.472V5.23601ZM107.034 2.06696H109.378V5.23607H111.178V7.44068H109.378V10.3495C109.378 10.7782 109.711 11.115 110.119 11.115H111.162V13.4574H110.119C108.425 13.4574 107.034 12.0642 107.034 10.3342V7.42536H105.945V5.22076H107.034V2.06696ZM116.909 5.05236C115.82 5.05236 114.958 5.51164 114.626 6.23121V2.06696H112.221V13.4727H114.626V8.84917C114.626 7.88466 115.246 7.21103 116.123 7.21103C117.015 7.21103 117.514 7.79281 117.514 8.77262V13.488H119.919V8.46642C119.919 6.32307 118.83 5.05236 116.909 5.05236ZM126.905 5.22072V6.35364C127.268 5.52691 128.145 5.05232 129.249 5.03701C129.415 5.03701 129.627 5.05232 129.884 5.08293V7.3794C129.642 7.33346 129.37 7.30285 129.083 7.30285C127.707 7.30285 126.905 8.08364 126.905 9.44619V13.4727H124.501V5.22072H126.905ZM136.644 6.30776C136.402 5.58819 135.449 5.08299 134.224 5.08299C133.075 5.08299 132.107 5.49634 131.336 6.32307C130.58 7.13448 130.187 8.16023 130.187 9.3544C130.187 10.5486 130.58 11.559 131.336 12.401C132.107 13.2124 133.075 13.6258 134.224 13.6258C135.449 13.6258 136.402 13.1206 136.644 12.401V13.488H139.048V2.06696H136.644V6.30776ZM136.16 10.8241C135.752 11.2222 135.253 11.4059 134.663 11.4059C134.088 11.4059 133.589 11.2069 133.196 10.8241C132.788 10.4108 132.591 9.92085 132.591 9.3544C132.591 8.78793 132.788 8.29803 133.196 7.89997C133.604 7.4866 134.088 7.28758 134.663 7.28758C135.268 7.28758 135.767 7.4866 136.16 7.89997C136.583 8.29803 136.795 8.78793 136.795 9.3544C136.795 9.92085 136.583 10.4108 136.16 10.8241ZM145.99 5.26662L148.168 9.18591L149.634 5.23601H151.994L148.636 13.9625L145.99 9.21654L143.343 13.9625L140.001 5.23601H142.361L143.812 9.18591L145.99 5.26662ZM155.956 5.03701C154.716 5.03701 153.672 5.43505 152.855 6.23115C152.054 7.01195 151.646 8.05301 151.646 9.33903V9.41558C151.646 10.7016 152.054 11.7427 152.855 12.5235C153.687 13.2889 154.746 13.687 156.077 13.687C157.317 13.687 158.33 13.442 159.101 12.9368V10.8088C158.345 11.3446 157.377 11.6049 156.213 11.6049C154.942 11.6049 154.111 10.9772 154.065 9.99736H160.039C160.069 9.7524 160.084 9.47683 160.084 9.20125C160.084 8.0224 159.691 7.04258 158.935 6.24648C158.179 5.43505 157.165 5.03701 155.956 5.03701ZM154.065 8.42046C154.08 8.0377 154.277 7.71619 154.64 7.45593C155.018 7.19566 155.441 7.05789 155.956 7.05789C156.908 7.05789 157.649 7.68558 157.649 8.42046H154.065ZM165.816 5.08297C166.965 5.08297 167.933 5.49634 168.689 6.32307C169.46 7.14979 169.853 8.14493 169.853 9.33907C169.853 10.5332 169.46 11.5437 168.689 12.3857C167.933 13.1971 166.965 13.6105 165.816 13.6105C164.591 13.6105 163.638 13.1053 163.396 12.3857V13.4727H160.991V2.06696H163.396V6.30776C163.638 5.58819 164.591 5.08297 165.816 5.08297ZM165.377 11.4059C165.952 11.4059 166.436 11.2222 166.844 10.8241C167.252 10.4108 167.449 9.92085 167.449 9.3544C167.449 8.78793 167.252 8.29801 166.844 7.89997C166.451 7.4866 165.952 7.28758 165.377 7.28758C164.787 7.28758 164.288 7.4866 163.865 7.89997C163.456 8.29801 163.245 8.78793 163.245 9.3544C163.245 9.92085 163.456 10.4108 163.865 10.8241C164.273 11.2069 164.772 11.4059 165.377 11.4059Z" fill="currentColor"/>
<path d="M89.8362 0.333008C89.988 0.364561 90.1313 0.428355 90.2565 0.520089C90.3966 0.630998 90.5038 0.778018 90.5669 0.945385C90.9647 1.94075 91.3625 2.9355 91.7603 3.92966C92.2006 5.03532 92.6431 6.14117 93.0877 7.24722C93.3194 7.82711 93.55 8.4076 93.7853 8.9863C93.8354 9.10466 93.8612 9.23191 93.8612 9.36046C93.8612 9.48901 93.8354 9.61626 93.7853 9.73462L91.7633 14.7786C91.6295 15.1125 91.3869 15.32 91.0303 15.3741C90.5867 15.4409 90.1898 15.222 90.0296 14.8327C89.6501 13.8997 89.2791 12.9637 88.9051 12.0283L87.0032 7.27007C86.4401 5.85803 85.8762 4.4464 85.3114 3.03517C85.1241 2.56656 84.9428 2.09555 84.7471 1.63055C84.6932 1.50411 84.6677 1.36735 84.6724 1.22995C84.6772 1.09255 84.712 0.957863 84.7744 0.835438C84.8368 0.713012 84.9254 0.605838 85.0337 0.52151C85.1421 0.437179 85.2677 0.377755 85.4015 0.347445C85.4177 0.343836 85.4333 0.33782 85.4489 0.333008H89.8362Z" fill="url(#paint0_linear_208_15)"/>
<path d="M81.9564 0.333008C82.0062 0.346844 82.0561 0.358875 82.1047 0.375718C82.2313 0.415281 82.3474 0.482777 82.4446 0.57324C82.5417 0.663706 82.6174 0.774838 82.666 0.898465C83.1003 1.97644 83.5325 3.05522 83.9628 4.13481C84.3982 5.2232 84.8337 6.31181 85.2691 7.4006C85.482 7.93438 85.696 8.46795 85.9109 9.00134C85.959 9.11556 85.9838 9.23828 85.9838 9.36226C85.9838 9.48624 85.959 9.60897 85.9109 9.7232C85.6707 10.3223 85.4306 10.9213 85.1905 11.52C84.7502 12.616 84.31 13.7121 83.8697 14.8081C83.8006 14.9787 83.6824 15.125 83.5302 15.2282C83.378 15.3315 83.1986 15.3871 83.0148 15.388C82.8201 15.3914 82.6291 15.3345 82.4679 15.225C82.3067 15.1155 82.1832 14.9587 82.1143 14.7762C81.7073 13.7433 81.2918 12.7135 80.88 11.6824C80.3281 10.2864 79.7734 8.89144 79.2158 7.49746C78.6483 6.0786 78.081 4.65954 77.5139 3.2403C77.2989 2.70311 77.0858 2.16473 76.8679 1.62814C76.7727 1.40457 76.768 1.15263 76.855 0.925706C76.942 0.698779 77.1137 0.514681 77.3337 0.412412C77.4136 0.380081 77.4956 0.353544 77.5793 0.333008H81.9564Z" fill="url(#paint1_linear_208_15)"/>
<path d="M101.588 9.50617C101.468 9.91224 101.288 10.2954 101.135 10.687C100.692 11.8011 100.246 12.9146 99.7983 14.0274C99.6956 14.2825 99.5912 14.5369 99.4916 14.7932C99.4214 14.9683 99.3003 15.1183 99.1442 15.2237C98.9881 15.3292 98.804 15.3853 98.6156 15.3847C98.4273 15.3841 98.2436 15.3269 98.0881 15.2205C97.9326 15.1141 97.8124 14.9633 97.7434 14.7878L95.7994 9.92605L94.1185 5.72664C93.5698 4.35552 93.0215 2.98458 92.4735 1.61385C92.4214 1.48852 92.3974 1.35326 92.4032 1.21761C92.4089 1.08196 92.4443 0.949232 92.5068 0.828775C92.5693 0.708318 92.6574 0.603069 92.765 0.520448C92.8725 0.437828 92.9968 0.37985 93.1291 0.350601C93.1471 0.346391 93.1645 0.340375 93.1825 0.334961H97.5699C97.5836 0.339172 97.5969 0.344586 97.6108 0.347594C97.7646 0.379769 97.9079 0.450334 98.0273 0.552752C98.1467 0.655171 98.2385 0.78613 98.2938 0.933503C98.5493 1.57515 98.805 2.215 99.0612 2.85305C99.7316 4.52856 100.401 6.20407 101.071 7.87958C101.246 8.32113 101.442 8.75485 101.586 9.20842L101.588 9.50617Z" fill="url(#paint2_linear_208_15)"/>
</g>
<path d="M0.788497 15.9577V6.16183H2.73655V7.35849H2.82468C2.91126 7.16678 3.03649 6.97197 3.20037 6.77407C3.36735 6.57308 3.5838 6.40611 3.84972 6.27315C4.11874 6.13709 4.45269 6.06906 4.85158 6.06906C5.37106 6.06906 5.85034 6.20512 6.28942 6.47723C6.72851 6.74624 7.07947 7.15286 7.3423 7.69708C7.60513 8.2382 7.73655 8.91693 7.73655 9.73326C7.73655 10.5279 7.60823 11.1989 7.35158 11.7462C7.09802 12.2905 6.7517 12.7033 6.31262 12.9846C5.87662 13.2629 5.38806 13.4021 4.84694 13.4021C4.46351 13.4021 4.13729 13.3387 3.86827 13.2119C3.60235 13.0851 3.38435 12.9259 3.21429 12.7342C3.04422 12.5394 2.91435 12.343 2.82468 12.1451H2.76438V15.9577H0.788497ZM2.72263 9.72398C2.72263 10.1476 2.78139 10.5171 2.89889 10.8325C3.01639 11.1479 3.18646 11.3937 3.40909 11.57C3.63173 11.7432 3.90229 11.8297 4.22078 11.8297C4.54236 11.8297 4.81447 11.7416 5.03711 11.5654C5.25974 11.386 5.42826 11.1386 5.54267 10.8232C5.66017 10.5047 5.71892 10.1383 5.71892 9.72398C5.71892 9.31273 5.66172 8.95094 5.54731 8.63864C5.4329 8.32633 5.26438 8.08205 5.04174 7.9058C4.81911 7.72955 4.54545 7.64142 4.22078 7.64142C3.8992 7.64142 3.62709 7.72645 3.40445 7.89652C3.18491 8.06659 3.01639 8.30778 2.89889 8.62008C2.78139 8.93239 2.72263 9.30036 2.72263 9.72398ZM11.8809 13.4253C11.1604 13.4253 10.5374 13.2722 10.0117 12.9661C9.48912 12.6569 9.08559 12.2271 8.80111 11.6767C8.51664 11.1232 8.3744 10.4816 8.3744 9.75181C8.3744 9.01588 8.51664 8.37271 8.80111 7.82231C9.08559 7.26882 9.48912 6.83901 10.0117 6.53289C10.5374 6.22367 11.1604 6.06906 11.8809 6.06906C12.6014 6.06906 13.2229 6.22367 13.7455 6.53289C14.2711 6.83901 14.6762 7.26882 14.9607 7.82231C15.2451 8.37271 15.3874 9.01588 15.3874 9.75181C15.3874 10.4816 15.2451 11.1232 14.9607 11.6767C14.6762 12.2271 14.2711 12.6569 13.7455 12.9661C13.2229 13.2722 12.6014 13.4253 11.8809 13.4253ZM11.8902 11.8947C12.2179 11.8947 12.4916 11.8019 12.7111 11.6164C12.9307 11.4278 13.0961 11.1711 13.2074 10.8464C13.3218 10.5218 13.379 10.1522 13.379 9.7379C13.379 9.32355 13.3218 8.95404 13.2074 8.62936C13.0961 8.30469 12.9307 8.04804 12.7111 7.85942C12.4916 7.6708 12.2179 7.57649 11.8902 7.57649C11.5593 7.57649 11.281 7.6708 11.0553 7.85942C10.8327 8.04804 10.6641 8.30469 10.5497 8.62936C10.4384 8.95404 10.3827 9.32355 10.3827 9.7379C10.3827 10.1522 10.4384 10.5218 10.5497 10.8464C10.6641 11.1711 10.8327 11.4278 11.0553 11.6164C11.281 11.8019 11.5593 11.8947 11.8902 11.8947ZM17.5071 13.2861L15.5684 6.16183H17.5674L18.6713 10.9485H18.7363L19.8865 6.16183H21.8485L23.0173 10.9206H23.0776L24.163 6.16183H26.1574L24.2233 13.2861H22.1314L20.907 8.80561H20.8188L19.5943 13.2861H17.5071ZM29.8878 13.4253C29.155 13.4253 28.5242 13.2769 27.9954 12.98C27.4697 12.6801 27.0647 12.2564 26.7802 11.7091C26.4957 11.1587 26.3535 10.5078 26.3535 9.75645C26.3535 9.02361 26.4957 8.38044 26.7802 7.82695C27.0647 7.27346 27.4651 6.8421 27.9815 6.53289C28.501 6.22367 29.1101 6.06906 29.8089 6.06906C30.279 6.06906 30.7165 6.14482 31.1216 6.29634C31.5297 6.44476 31.8853 6.66894 32.1884 6.96888C32.4945 7.26882 32.7326 7.64606 32.9026 8.1006C33.0727 8.55206 33.1577 9.08081 33.1577 9.68687V10.2295H27.142V9.00506H31.2978C31.2978 8.72058 31.236 8.46857 31.1123 8.24903C30.9886 8.02948 30.817 7.85787 30.5974 7.73418C30.381 7.60741 30.129 7.54402 29.8414 7.54402C29.5415 7.54402 29.2756 7.61359 29.0436 7.75274C28.8148 7.88879 28.6355 8.07277 28.5056 8.30469C28.3757 8.5335 28.3093 8.78861 28.3062 9.06999V10.2342C28.3062 10.5867 28.3711 10.8913 28.501 11.1479C28.6339 11.4046 28.821 11.6025 29.0622 11.7416C29.3034 11.8808 29.5894 11.9503 29.9203 11.9503C30.1398 11.9503 30.3408 11.9194 30.5232 11.8576C30.7057 11.7957 30.8618 11.703 30.9917 11.5793C31.1216 11.4556 31.2205 11.3041 31.2885 11.1247L33.116 11.2453C33.0232 11.6844 32.8331 12.0678 32.5455 12.3956C32.261 12.7203 31.8931 12.9738 31.4416 13.1563C30.9932 13.3356 30.4753 13.4253 29.8878 13.4253ZM34.0553 13.2861V6.16183H35.9709V7.40487H36.0451C36.175 6.96269 36.393 6.62874 36.6991 6.40302C37.0052 6.1742 37.3577 6.05979 37.7566 6.05979C37.8556 6.05979 37.9623 6.06597 38.0767 6.07834C38.1911 6.09071 38.2916 6.10772 38.3782 6.12936V7.88261C38.2854 7.85478 38.1571 7.83004 37.9932 7.8084C37.8293 7.78675 37.6793 7.77593 37.5433 7.77593C37.2526 7.77593 36.9929 7.83932 36.7641 7.9661C36.5383 8.08978 36.359 8.26294 36.226 8.48558C36.0961 8.70821 36.0312 8.96486 36.0312 9.25552V13.2861H34.0553ZM41.923 13.4253C41.1902 13.4253 40.5594 13.2769 40.0306 12.98C39.5049 12.6801 39.0999 12.2564 38.8154 11.7091C38.5309 11.1587 38.3887 10.5078 38.3887 9.75645C38.3887 9.02361 38.5309 8.38044 38.8154 7.82695C39.0999 7.27346 39.5003 6.8421 40.0167 6.53289C40.5362 6.22367 41.1453 6.06906 41.8442 6.06906C42.3142 6.06906 42.7517 6.14482 43.1568 6.29634C43.5649 6.44476 43.9205 6.66894 44.2236 6.96888C44.5297 7.26882 44.7678 7.64606 44.9378 8.1006C45.1079 8.55206 45.1929 9.08081 45.1929 9.68687V10.2295H39.1772V9.00506H43.333C43.333 8.72058 43.2712 8.46857 43.1475 8.24903C43.0238 8.02948 42.8522 7.85787 42.6327 7.73418C42.4162 7.60741 42.1642 7.54402 41.8766 7.54402C41.5767 7.54402 41.3108 7.61359 41.0788 7.75274C40.85 7.88879 40.6707 8.07277 40.5408 8.30469C40.4109 8.5335 40.3445 8.78861 40.3414 9.06999V10.2342C40.3414 10.5867 40.4063 10.8913 40.5362 11.1479C40.6691 11.4046 40.8562 11.6025 41.0974 11.7416C41.3386 11.8808 41.6246 11.9503 41.9555 11.9503C42.175 11.9503 42.376 11.9194 42.5584 11.8576C42.7409 11.7957 42.897 11.703 43.0269 11.5793C43.1568 11.4556 43.2557 11.3041 43.3237 11.1247L45.1512 11.2453C45.0584 11.6844 44.8683 12.0678 44.5807 12.3956C44.2962 12.7203 43.9283 12.9738 43.4768 13.1563C43.0284 13.3356 42.5105 13.4253 41.923 13.4253ZM48.7158 13.4021C48.1746 13.4021 47.6845 13.2629 47.2455 12.9846C46.8095 12.7033 46.4631 12.2905 46.2065 11.7462C45.9529 11.1989 45.8262 10.5279 45.8262 9.73326C45.8262 8.91693 45.9576 8.2382 46.2204 7.69708C46.4832 7.15286 46.8327 6.74624 47.2686 6.47723C47.7077 6.20512 48.1886 6.06906 48.7111 6.06906C49.11 6.06906 49.4424 6.13709 49.7083 6.27315C49.9774 6.40611 50.1938 6.57308 50.3577 6.77407C50.5247 6.97197 50.6515 7.16678 50.738 7.35849H50.7983V3.78706H52.7696V13.2861H50.8215V12.1451H50.738C50.6453 12.343 50.5139 12.5394 50.3438 12.7342C50.1768 12.9259 49.9588 13.0851 49.6898 13.2119C49.4239 13.3387 49.0992 13.4021 48.7158 13.4021ZM49.3419 11.8297C49.6604 11.8297 49.9294 11.7432 50.149 11.57C50.3716 11.3937 50.5417 11.1479 50.6592 10.8325C50.7798 10.5171 50.8401 10.1476 50.8401 9.72398C50.8401 9.30036 50.7813 8.93239 50.6638 8.62008C50.5463 8.30778 50.3763 8.06659 50.1536 7.89652C49.931 7.72645 49.6604 7.64142 49.3419 7.64142C49.0173 7.64142 48.7436 7.72955 48.521 7.9058C48.2983 8.08205 48.1298 8.32633 48.0154 8.63864C47.901 8.95094 47.8438 9.31273 47.8438 9.72398C47.8438 10.1383 47.901 10.5047 48.0154 10.8232C48.1329 11.1386 48.3014 11.386 48.521 11.5654C48.7436 11.7416 49.0173 11.8297 49.3419 11.8297ZM56.6705 13.2861V3.78706H58.6464V7.35849H58.7067C58.7933 7.16678 58.9185 6.97197 59.0824 6.77407C59.2493 6.57308 59.4658 6.40611 59.7317 6.27315C60.0007 6.13709 60.3347 6.06906 60.7336 6.06906C61.2531 6.06906 61.7323 6.20512 62.1714 6.47723C62.6105 6.74624 62.9615 7.15286 63.2243 7.69708C63.4871 8.2382 63.6185 8.91693 63.6185 9.73326C63.6185 10.5279 63.4902 11.1989 63.2336 11.7462C62.98 12.2905 62.6337 12.7033 62.1946 12.9846C61.7586 13.2629 61.2701 13.4021 60.7289 13.4021C60.3455 13.4021 60.0193 13.3387 59.7503 13.2119C59.4844 13.0851 59.2664 12.9259 59.0963 12.7342C58.9262 12.5394 58.7963 12.343 58.7067 12.1451H58.6185V13.2861H56.6705ZM58.6046 9.72398C58.6046 10.1476 58.6634 10.5171 58.7809 10.8325C58.8984 11.1479 59.0685 11.3937 59.2911 11.57C59.5137 11.7432 59.7843 11.8297 60.1028 11.8297C60.4244 11.8297 60.6965 11.7416 60.9191 11.5654C61.1417 11.386 61.3103 11.1386 61.4247 10.8232C61.5422 10.5047 61.6009 10.1383 61.6009 9.72398C61.6009 9.31273 61.5437 8.95094 61.4293 8.63864C61.3149 8.32633 61.1464 8.08205 60.9237 7.9058C60.7011 7.72955 60.4275 7.64142 60.1028 7.64142C59.7812 7.64142 59.5091 7.72645 59.2865 7.89652C59.0669 8.06659 58.8984 8.30778 58.7809 8.62008C58.6634 8.93239 58.6046 9.30036 58.6046 9.72398ZM65.5354 15.9577C65.2849 15.9577 65.0499 15.9376 64.8304 15.8975C64.6139 15.8603 64.4346 15.8124 64.2923 15.7537L64.7376 14.2787C64.9695 14.3498 65.1782 14.3885 65.3638 14.3947C65.5524 14.4009 65.7147 14.3576 65.8508 14.2648C65.9899 14.172 66.1028 14.0143 66.1894 13.7917L66.3053 13.4902L63.7497 6.16183H65.8276L67.3025 11.3937H67.3768L68.8656 6.16183H70.9575L68.1884 14.0561C68.0555 14.4395 67.8746 14.7735 67.6458 15.0579C67.4201 15.3455 67.134 15.5666 66.7877 15.7212C66.4414 15.8789 66.0239 15.9577 65.5354 15.9577Z" fill="currentColor"/>
<defs>
<linearGradient id="paint0_linear_208_15" x1="83.9919" y1="1.55536" x2="94.5605" y2="12.1028" gradientUnits="userSpaceOnUse">
<stop stop-color="#FF00A8"/>
<stop offset="1" stop-color="#6200C6"/>
</linearGradient>
<linearGradient id="paint1_linear_208_15" x1="76.1162" y1="1.55175" x2="86.6824" y2="12.0968" gradientUnits="userSpaceOnUse">
<stop stop-color="#FF00A8"/>
<stop offset="1" stop-color="#6200C6"/>
</linearGradient>
<linearGradient id="paint2_linear_208_15" x1="91.7237" y1="1.55069" x2="102.291" y2="12.0963" gradientUnits="userSpaceOnUse">
<stop stop-color="#FF00A8"/>
<stop offset="1" stop-color="#6200C6"/>
</linearGradient>
<clipPath id="clip0_208_15">
<rect width="93.2653" height="15.102" fill="white" transform="translate(76.7344 0.286133)"/>
</clipPath>
</defs>
</svg>
`;
var ethereumIcon = `
<svg height="100%" viewBox="0 0 10 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4.99902 0.12619V5.20805L9.58065 7.12736L4.99902 0.12619Z" fill="white" fill-opacity="0.602"/>
<path d="M4.99923 0.12619L0.416992 7.12736L4.99923 5.20805V0.12619Z" fill="white"/>
<path d="M4.99902 10.4207V13.8737L9.58371 7.92728L4.99902 10.4207Z" fill="white" fill-opacity="0.602"/>
<path d="M4.99923 13.8737V10.4201L0.416992 7.92728L4.99923 13.8737Z" fill="white"/>
<path d="M4.99902 9.62134L9.58065 7.12739L4.99902 5.20923V9.62134Z" fill="white" fill-opacity="0.2"/>
<path d="M0.416992 7.12739L4.99923 9.62134V5.20923L0.416992 7.12739Z" fill="white" fill-opacity="0.602"/>
</svg>
`;
var polygonIcon = `
<svg width="100%" viewBox="0 0 14 13" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10.5091 4.05856C10.2585 3.91901 9.9362 3.91901 9.64974 4.05856L7.64453 5.20986L6.28385 5.94251L4.31445 7.09382C4.0638 7.23337 3.74154 7.23337 3.45508 7.09382L1.91536 6.18673C1.66471 6.04718 1.48568 5.76807 1.48568 5.45408V3.70968C1.48568 3.43057 1.62891 3.15147 1.91536 2.97703L3.45508 2.10483C3.70573 1.96527 4.02799 1.96527 4.31445 2.10483L5.85417 3.01192C6.10482 3.15147 6.28385 3.43057 6.28385 3.74457V4.89587L7.64453 4.12833V2.94214C7.64453 2.66304 7.5013 2.38393 7.21484 2.20949L4.35026 0.569752C4.09961 0.4302 3.77734 0.4302 3.49089 0.569752L0.554687 2.24438C0.268229 2.38393 0.125 2.66304 0.125 2.94214V6.22162C0.125 6.50072 0.268229 6.77983 0.554687 6.95427L3.45508 8.59401C3.70573 8.73356 4.02799 8.73356 4.31445 8.59401L6.28385 7.47759L7.64453 6.71005L9.61393 5.59363C9.86458 5.45408 10.1868 5.45408 10.4733 5.59363L12.013 6.46583C12.2637 6.60539 12.4427 6.88449 12.4427 7.19848V8.94289C12.4427 9.22199 12.2995 9.50109 12.013 9.67553L10.5091 10.5477C10.2585 10.6873 9.9362 10.6873 9.64974 10.5477L8.11002 9.67553C7.85937 9.53598 7.68034 9.25688 7.68034 8.94289V7.82647L6.31966 8.59401V9.74531C6.31966 10.0244 6.46289 10.3035 6.74935 10.478L9.64974 12.1177C9.90039 12.2572 10.2227 12.2572 10.5091 12.1177L13.4095 10.478C13.6602 10.3384 13.8392 10.0593 13.8392 9.74531V6.43095C13.8392 6.15184 13.696 5.87274 13.4095 5.6983L10.5091 4.05856Z" fill="white"/>
</svg>
`;
var binanceIcon = `
<svg width="100%" height="100%" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4.32975 5.90275L7 3.2325L9.67163 5.90413L11.2254 4.35038L7 0.125L2.776 4.349L4.32975 5.90275ZM0.125 7L1.67875 5.44625L3.2325 7L1.67875 8.55375L0.125 7ZM4.32975 8.09725L7 10.7675L9.67163 8.09587L11.2254 9.64894L7 13.875L2.776 9.651L2.77394 9.64894L4.32975 8.09725ZM10.7675 7L12.3212 5.44625L13.875 7L12.3212 8.55375L10.7675 7ZM8.57575 6.99863H8.57713V7L7 8.57713L5.42494 7.00275L5.42219 7L5.42494 6.99794L5.70062 6.72156L5.83469 6.5875L7 5.42288L8.57644 6.99931L8.57575 6.99863Z" fill="white"/>
</svg>
`;
var fantomIcon = `
<svg height="100%" viewBox="0 0 12 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5.26613 0.133876C5.46683 0.0457135 5.68592 0 5.90775 0C6.12958 0 6.34867 0.0457135 6.54938 0.133876L10.2679 1.9598C10.3617 1.99893 10.4437 2.05898 10.5068 2.13465C10.5699 2.21033 10.6121 2.29932 10.6298 2.3938H10.6335V11.5637C10.6245 11.6667 10.5857 11.7654 10.5213 11.8495C10.457 11.9336 10.3694 11.9998 10.2679 12.0411L6.54938 13.8656C6.34867 13.9538 6.12958 13.9995 5.90775 13.9995C5.68592 13.9995 5.46683 13.9538 5.26613 13.8656L1.54762 12.0397C1.44724 11.9979 1.36095 11.9313 1.29799 11.8472C1.23504 11.7631 1.19779 11.6646 1.19025 11.5623C1.19025 11.5465 1.19025 11.5332 1.19025 11.522V2.39205C1.20579 2.29767 1.24673 2.20852 1.30923 2.13292C1.37173 2.05733 1.45375 1.99776 1.54762 1.9598L5.26613 0.133876ZM10.0478 7.50898L6.54938 9.22396C6.34872 9.31229 6.12961 9.35809 5.90775 9.35809C5.68589 9.35809 5.46678 9.31229 5.26613 9.22396L1.77525 7.51283V11.5455L5.26613 13.2493C5.43937 13.3471 5.62982 13.4154 5.82863 13.4512L5.9085 13.4558C6.12668 13.4357 6.3373 13.3704 6.525 13.2647L10.05 11.5301V7.50898H10.0478ZM0.585375 11.3642C0.568078 11.6186 0.612957 11.8734 0.716625 12.1093C0.805331 12.2602 0.936232 12.3857 1.09538 12.4726L1.10662 12.4796C1.1505 12.5069 1.1985 12.5356 1.25663 12.5692L1.32563 12.6081L1.53675 12.7267L1.23375 13.1922L0.9975 13.0592L0.95775 13.0365C0.889125 12.9973 0.8325 12.9637 0.779625 12.9315C0.214875 12.5769 0.004125 12.1912 0 11.3887V11.3642H0.585H0.585375ZM5.61412 5.05096C5.58845 5.05933 5.5634 5.06926 5.53912 5.08071L1.82137 6.90524L1.81013 6.91119H1.80675L1.81275 6.91469L1.82137 6.91889L5.53988 8.74341C5.56405 8.75505 5.58912 8.76499 5.61487 8.77316L5.61412 5.05096ZM6.201 5.05096V8.77456C6.22675 8.76639 6.25182 8.75645 6.276 8.74481L9.9945 6.92029L10.0057 6.91434H10.0091L10.0031 6.91154L9.9945 6.90699L6.276 5.08246C6.25182 5.07083 6.22675 5.06088 6.201 5.05271V5.05096ZM10.0478 3.04479L6.71025 4.68137L10.0478 6.31795V3.04304V3.04479ZM1.77525 3.04864V6.3141L5.103 4.68137L1.77525 3.04864ZM6.27525 0.61617C6.15894 0.569406 6.03364 0.545286 5.907 0.545286C5.78036 0.545286 5.65506 0.569406 5.53875 0.61617L1.821 2.4393L1.80975 2.4449L1.80638 2.44665L1.81238 2.4498L1.821 2.45365L5.5395 4.27817C5.65571 4.32526 5.78106 4.34956 5.90775 4.34956C6.03444 4.34956 6.15979 4.32526 6.276 4.27817L9.9945 2.45365L10.0057 2.4498L10.0091 2.44805L10.0031 2.4449L9.9945 2.4407L6.27525 0.61617ZM10.5968 0.816717L10.833 0.949365L10.875 0.970015C10.9432 1.00921 10.9999 1.04316 11.0528 1.07501C11.6179 1.42851 11.8282 1.81455 11.8328 2.61709V2.64159H11.2459C11.2632 2.38703 11.2183 2.13212 11.1146 1.8961C11.0258 1.74528 10.8948 1.61983 10.7355 1.53316L10.7242 1.52616C10.6807 1.49851 10.6327 1.47016 10.5743 1.43656L10.5056 1.39981L10.2945 1.28151L10.5975 0.816017L10.5968 0.816717Z" fill="white"/>
</svg>
`;
var optimismIcon = `
<svg width="100%" viewBox="0 0 17 10" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3.33611 9.25254C2.38341 9.25254 1.60287 9.02834 0.99442 8.58002C0.393974 8.1237 0.09375 7.47526 0.09375 6.63462C0.09375 6.45849 0.113782 6.2423 0.153782 5.9861C0.257909 5.40972 0.406006 4.71718 0.598133 3.9086C1.14252 1.707 2.54757 0.606201 4.81323 0.606201C5.42967 0.606201 5.98206 0.710266 6.47044 0.918394C6.95882 1.11852 7.34308 1.42278 7.62327 1.8311C7.90346 2.23135 8.04362 2.71174 8.04362 3.27212C8.04362 3.44025 8.02359 3.65241 7.98352 3.9086C7.86346 4.62111 7.71933 5.31366 7.55121 5.9861C7.27101 7.08294 6.78666 7.90354 6.09815 8.44793C5.40964 8.98431 4.489 9.25254 3.33611 9.25254ZM3.50424 7.52326C3.95262 7.52326 4.33284 7.39116 4.6451 7.12697C4.96535 6.86278 5.19351 6.45849 5.32958 5.9141C5.51371 5.16153 5.65387 4.50502 5.74993 3.94463C5.78193 3.7765 5.79793 3.60441 5.79793 3.42822C5.79793 2.6997 5.41764 2.33542 4.65713 2.33542C4.20875 2.33542 3.82449 2.46751 3.50424 2.7317C3.19205 2.99596 2.96786 3.40025 2.83179 3.94463C2.68766 4.48102 2.54354 5.13753 2.39947 5.9141C2.36741 6.07417 2.35141 6.2423 2.35141 6.41842C2.35141 7.155 2.73573 7.52326 3.50424 7.52326Z" fill="white"/>
<path d="M8.59569 9.13247C8.50762 9.13247 8.43953 9.10443 8.39153 9.04837C8.35146 8.98431 8.33949 8.9123 8.35549 8.83224L10.0127 1.02648C10.0287 0.938417 10.0727 0.866353 10.1448 0.810289C10.2169 0.754289 10.2929 0.726257 10.373 0.726257H13.5673C14.456 0.726257 15.1685 0.910385 15.7049 1.27864C16.2493 1.64696 16.5215 2.17931 16.5215 2.87582C16.5215 3.07595 16.4975 3.28415 16.4495 3.50027C16.2493 4.42098 15.845 5.10149 15.2366 5.54181C14.6361 5.98213 13.8115 6.20229 12.7627 6.20229H11.1415L10.5892 8.83224C10.5731 8.92031 10.5291 8.99231 10.4571 9.04837C10.385 9.10443 10.3089 9.13247 10.2289 9.13247H8.59569ZM12.8468 4.54507C13.183 4.54507 13.4752 4.45298 13.7234 4.26885C13.9796 4.08472 14.1478 3.82053 14.2278 3.47627C14.2518 3.34015 14.2639 3.22008 14.2639 3.11602C14.2639 2.88383 14.1958 2.7077 14.0597 2.58763C13.9236 2.45951 13.6914 2.3955 13.3632 2.3955H11.9221L11.4658 4.54507H12.8468Z" fill="white"/>
</svg>
`;
var avalancheIcon = `
<svg width="100%" viewBox="0 0 20 19" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M19.8682 0.489349H0.110352V18.4468H19.8682V0.489349Z" fill="white"/>
</svg>
`;
var celoIcon = `
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 26.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Symbol" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 384 383" style="enable-background:new 0 0 384 383;" xml:space="preserve">
<style type="text/css">
.st0{fill:#FCFF52;}
</style>
<path class="st0" d="M383.5,0H0.5v383h383V249.3h-63.6C298,298.1,248.7,332,192.3,332c-77.8,0-140.8-63.6-140.8-140.8
C51.4,114,114.5,51,192.3,51c57.5,0,106.8,35,128.7,84.9h62.5V0z"/>
</svg>
`;
var gnosisIcon = `
<svg width="100%" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M32 16C32 7.16344 24.8366 0 16 0C7.16344 0 0 7.16344 0 16C0 24.8366 7.16344 32 16 32C24.8366 32 32 24.8366 32 16Z" fill="#04795B"/>
<path d="M11.6529 17.4492C12.2831 17.4492 12.8648 17.2392 13.3334 16.8758L9.4877 13.0316C9.12413 13.4919 8.9141 14.0734 8.9141 14.7114C8.906 16.2216 10.134 17.4492 11.6529 17.4492Z" fill="#EFEFEF"/>
<path d="M23.0931 14.7033C23.0931 14.0734 22.8831 13.4919 22.5195 13.0234L18.6738 16.8677C19.1343 17.2311 19.716 17.4411 20.3543 17.4411C21.8651 17.4492 23.0931 16.2216 23.0931 14.7033Z" fill="#EFEFEF"/>
<path d="M25.0322 10.528L23.3275 12.2321C23.8931 12.9105 24.2324 13.7666 24.2324 14.7195C24.2324 16.8597 22.4954 18.5961 20.3544 18.5961C19.4092 18.5961 18.5447 18.2569 17.866 17.6915L15.9998 19.5571L14.1335 17.6915C13.4549 18.2569 12.5985 18.5961 11.6451 18.5961C9.50416 18.5961 7.7672 16.8597 7.7672 14.7195C7.7672 13.7746 8.10651 12.9105 8.67206 12.2321L7.79947 11.3599L6.96736 10.528C5.99787 12.1271 5.44043 13.9927 5.44043 15.9956C5.44043 21.8265 10.1667 26.543 15.9917 26.543C21.8167 26.543 26.543 21.8185 26.543 15.9956C26.5591 13.9846 26.0017 12.119 25.0322 10.528Z" fill="#EFEFEF"/>
<path d="M23.6338 8.71084C21.7191 6.6999 19.0045 5.44 15.9991 5.44C12.9937 5.44 10.2872 6.6999 8.36435 8.71084C8.10584 8.98545 7.85539 9.27617 7.62109 9.575L15.991 17.9419L24.361 9.56695C24.1509 9.27617 23.9005 8.97734 23.6338 8.71084ZM15.9991 6.81297C18.4713 6.81297 20.7658 7.76593 22.4866 9.50231L15.9991 15.9874L9.5116 9.50231C11.2405 7.76593 13.5269 6.81297 15.9991 6.81297Z" fill="#EFEFEF"/>
</svg>
`;
var harmonyOneIcon = `
<svg width="100%" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.5484 1.04102e-06C11.6346 -0.000708404 10.7578 0.361217 10.1105 1.00633C9.46322 1.65145 9.09835 2.52703 9.096 3.44089V7.256C8.74045 7.28 8.37689 7.29511 8 7.29511C7.62311 7.29511 7.26133 7.31022 6.904 7.33156V3.44089C6.88946 2.53496 6.51938 1.67105 5.87358 1.03553C5.22779 0.400017 4.35805 0.0438409 3.452 0.0438409C2.54595 0.0438409 1.67621 0.400017 1.03042 1.03553C0.384623 1.67105 0.0145378 2.53496 0 3.44089V12.5591C0.0145378 13.465 0.384623 14.329 1.03042 14.9645C1.67621 15.6 2.54595 15.9562 3.452 15.9562C4.35805 15.9562 5.22779 15.6 5.87358 14.9645C6.51938 14.329 6.88946 13.465 6.904 12.5591V8.744C7.25956 8.72 7.62311 8.70489 8 8.70489C8.37689 8.70489 8.73867 8.68978 9.096 8.66845V12.5591C9.11054 13.465 9.48062 14.329 10.1264 14.9645C10.7722 15.6 11.6419 15.9562 12.548 15.9562C13.4541 15.9562 14.3238 15.6 14.9696 14.9645C15.6154 14.329 15.9855 13.465 16 12.5591V3.44089C15.9976 2.52719 15.6329 1.65173 14.9858 1.00665C14.3387 0.361557 13.4622 -0.000472854 12.5484 1.04102e-06ZM3.45156 1.40978C3.99089 1.40954 4.50828 1.62326 4.89023 2.00404C5.27218 2.38482 5.48748 2.90156 5.48889 3.44089V7.48089C4.47892 7.62724 3.49264 7.90609 2.55556 8.31023C2.14954 8.48842 1.76733 8.71655 1.41778 8.98934V3.44089C1.41919 2.90218 1.634 2.38597 2.01518 2.00529C2.39636 1.62462 2.91284 1.41048 3.45156 1.40978ZM5.48889 12.5591C5.48889 13.0994 5.27424 13.6177 4.89217 13.9997C4.51009 14.3818 3.99189 14.5964 3.45156 14.5964C2.91122 14.5964 2.39302 14.3818 2.01094 13.9997C1.62887 13.6177 1.41422 13.0994 1.41422 12.5591V11.6444C1.41422 10.8364 2.05422 10.0711 3.12711 9.59467C3.88309 9.26852 4.6763 9.03656 5.48889 8.904V12.5591ZM12.5484 14.5902C12.0091 14.5905 11.4917 14.3767 11.1098 13.996C10.7278 13.6152 10.5125 13.0984 10.5111 12.5591V8.51911C11.5211 8.37276 12.5074 8.09392 13.4444 7.68978C13.8505 7.51159 14.2327 7.28345 14.5822 7.01067V12.5591C14.5808 13.0978 14.366 13.614 13.9848 13.9947C13.6036 14.3754 13.0872 14.5895 12.5484 14.5902ZM12.8729 6.4C12.1169 6.72615 11.3237 6.95811 10.5111 7.09067V3.44089C10.5111 2.90056 10.7258 2.38235 11.1078 2.00028C11.4899 1.6182 12.0081 1.40356 12.5484 1.40356C13.0888 1.40356 13.607 1.6182 13.9891 2.00028C14.3711 2.38235 14.5858 2.90056 14.5858 3.44089V4.35556C14.5858 5.16 13.9458 5.92534 12.8729 6.4Z" fill="url(#paint0_linear_10254_2422)"/>
<defs>
<linearGradient id="paint0_linear_10254_2422" x1="1.01333" y1="14.7674" x2="14.8954" y2="0.847434" gradientUnits="userSpaceOnUse">
<stop stop-color="#00AEE9"/>
<stop offset="1" stop-color="#69FABD"/>
</linearGradient>
</defs>
</svg>
`;
var arbitrumIcon = `
<svg height="100%" viewBox="0 0 22 25" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M13.7827 11.3172L15.5966 8.23933L20.4858 15.8545L20.4881 17.3159L20.4722 7.25942C20.4606 7.0136 20.3301 6.7887 20.1218 6.6561L11.3194 1.5928C11.1135 1.49162 10.8523 1.49269 10.6468 1.59594C10.6191 1.60989 10.593 1.62499 10.568 1.64147L10.5374 1.66079L1.99318 6.6121L1.95999 6.62712C1.91737 6.64674 1.8743 6.67165 1.83382 6.70063C1.67186 6.81683 1.56424 6.98861 1.52944 7.18131C1.52423 7.21052 1.52039 7.24026 1.51855 7.27023L1.53197 15.4653L6.08607 8.40666C6.65942 7.47067 7.90869 7.1692 9.06835 7.1856L10.4295 7.22155L2.40986 20.0827L3.3552 20.627L11.4709 7.23458L15.0581 7.22155L6.96327 20.9519L10.3366 22.8921L10.7396 23.1239C10.9101 23.1932 11.111 23.1967 11.283 23.1347L20.2091 17.9618L18.5026 18.9507L13.7827 11.3172ZM14.4747 21.2849L11.0677 15.9375L13.1474 12.4083L17.622 19.461L14.4747 21.2849Z" fill="#2D374B"/>
<path d="M11.0684 15.9375L14.4754 21.2849L17.6228 19.4609L13.1482 12.4083L11.0684 15.9375Z" fill="#28A0F0"/>
<path d="M20.4887 17.3159L20.4864 15.8545L15.5972 8.23932L13.7832 11.3172L18.5031 18.9507L20.2097 17.9618C20.3771 17.8259 20.4783 17.6264 20.489 17.4111L20.4887 17.3159Z" fill="#28A0F0"/>
<path d="M7.71943e-05 18.694L2.41 20.0826L10.4296 7.22152L9.0685 7.18557C7.90883 7.16916 6.65964 7.47063 6.08621 8.40662L1.53211 15.4652L0 17.8193V18.694H7.71943e-05Z" fill="white"/>
<path d="M15.0582 7.22156L11.4712 7.23459L3.35547 20.627L6.19211 22.2603L6.96354 20.9519L15.0582 7.22156Z" fill="white"/>
<path d="M21.9999 7.20306C21.97 6.45287 21.5638 5.76608 20.9275 5.36626L12.0097 0.237888C11.3803 -0.079066 10.594 -0.0794494 9.96363 0.237658C9.88913 0.275218 1.2912 5.26171 1.2912 5.26171C1.17223 5.31874 1.05764 5.38673 0.949789 5.46384C0.381801 5.87094 0.0355663 6.50346 0 7.19846V17.8194L1.53211 15.4653L1.5187 7.27029C1.52054 7.24032 1.52429 7.21088 1.52958 7.18175C1.56415 6.9889 1.67185 6.81689 1.83397 6.70069C1.87444 6.67171 10.6192 1.60995 10.647 1.596C10.8526 1.49275 11.1137 1.49168 11.3195 1.59286L20.122 6.65616C20.3302 6.78876 20.4608 7.01366 20.4723 7.25948V17.4111C20.4617 17.6265 20.3766 17.8259 20.2092 17.9619L18.5026 18.9508L17.6221 19.461L14.4748 21.285L11.283 23.1347C11.1111 23.1968 10.9101 23.1933 10.7397 23.124L6.96334 20.952L6.19191 22.2603L9.58559 24.2142C9.6978 24.278 9.79784 24.3345 9.87985 24.3807C10.0069 24.452 10.0935 24.4996 10.1241 24.5144C10.3653 24.6315 10.7123 24.6997 11.025 24.6997C11.3118 24.6997 11.5913 24.647 11.8559 24.5434L21.1266 19.1745C21.6587 18.7623 21.9717 18.1406 21.9999 17.467V7.20306Z" fill="#96BEDC"/>
</svg>
`;
var baseIcon = `
<svg height="100%" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1607_202)">
<mask id="mask0_1607_202" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="32" height="32">
<path d="M32 0H0V32H32V0Z" fill="white"/>
</mask>
<g mask="url(#mask0_1607_202)">
<path d="M16 32C19.1645 32 22.258 31.0616 24.8892 29.3036C27.5204 27.5454 29.571 25.0466 30.782 22.123C31.993 19.1993 32.31 15.9823 31.6926 12.8786C31.0752 9.77486 29.5514 6.92394 27.3138 4.6863C25.076 2.44866 22.2252 0.924806 19.1214 0.307442C16.0177 -0.30992 12.8007 0.0069325 9.87706 1.21793C6.95344 2.42894 4.45458 4.4797 2.69648 7.11088C0.938384 9.74206 0 12.8355 0 16C0 20.2434 1.68571 24.3132 4.6863 27.3138C7.68688 30.3142 11.7565 32 16 32Z" fill="#0052FF"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.9624 27.2676C22.1852 27.2676 27.23 22.223 27.23 16C27.23 9.7771 22.1852 4.73242 15.9624 4.73242C10.0588 4.73242 5.21566 9.2726 4.7341 15.0518H21.4546V16.928H4.73242C5.20432 22.7168 10.0519 27.2676 15.9624 27.2676Z" fill="white"/>
</g>
</g>
<defs>
<clipPath id="clip0_1607_202">
<rect width="32" height="32" fill="white"/>
</clipPath>
</defs>
</svg>
`;
var hourglass = `
<svg width="100%" height="100%" viewBox="0 0 12 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0L0.0100002 6L4 10L0.0100002 14.01L0 20H12V14L8 10L12 6.01V0H0ZM10 14.5V18H2V14.5L6 10.5L10 14.5Z" fill="#929BED"/>
</svg>
`;
var questionIcon = `
<svg width="100%" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.07 12.85C11.84 11.46 13.32 10.64 14.18 9.41C15.09 8.12 14.58 5.71 12 5.71C10.31 5.71 9.48 6.99 9.13 8.05L6.54 6.96C7.25 4.83 9.18 3 11.99 3C14.34 3 15.95 4.07 16.77 5.41C17.47 6.56 17.88 8.71 16.8 10.31C15.6 12.08 14.45 12.62 13.83 13.76C13.58 14.22 13.48 14.52 13.48 16H10.59C10.58 15.22 10.46 13.95 11.07 12.85ZM14 20C14 21.1 13.1 22 12 22C10.9 22 10 21.1 10 20C10 18.9 10.9 18 12 18C13.1 18 14 18.9 14 20Z" fill="currentColor"/>
</svg>
`;
var checkmark = `
<svg width="14" height="11" viewBox="0 0 14 11" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4.48076 8.10881L1.33076 4.95881L0.280762 6.00881L4.48076 10.2088L13.4808 1.20881L12.4308 0.158813L4.48076 8.10881Z" fill="#A4F4C6"/>
</svg>
`;
var errorIcon = `<svg width="16" height="13" viewBox="0 0 16 13" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0.666992 13.0002H15.3337L8.00033 0.333496L0.666992 13.0002ZM8.66699 11.0002H7.33366V9.66683H8.66699V11.0002ZM8.66699 8.3335H7.33366V5.66683H8.66699V8.3335Z" fill="#FFB3B3"/>
</svg>
`;
var infoIcon = `
<svg width="100%" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM13 17H11V11H13V17ZM13 9H11V7H13V9Z" fill="currentColor"/>
</svg>
`;
var successIcon = `
<svg width="100%" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.74999 12.15L3.59999 9L2.54999 10.05L6.74999 14.25L15.75 5.25L14.7 4.2L6.74999 12.15Z" fill="currentColor"/>
</svg>
`;
var pendingIcon = `
<svg width="100%" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M6 2L6.01 8L10 12L6.01 16.01L6 22H18V16L14 12L18 8.01V2H6ZM16 16.5V20H8V16.5L12 12.5L16 16.5Z" fill="currenColor"/>
</svg>
`;
var degenIcon = `
<?xml version="1.0" encoding="UTF-8"?>
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 477 477">
<defs>
<style>.cls-1{fill:#a36dfe;}.cls-2{fill:#4b2895;}</style>
</defs>
<circle class="cls-1" cx="238.5" cy="238.5" r="238.5"/>
<g>
<path class="cls-2" d="M237.85,113.99c29.25,1.32,54.97,2.45,80.69,3.69,3.95,.19,7.92,.72,11.82,1.43,9.23,1.69,15.34,8.72,14.78,18.2-1.33,22.33-3.22,44.63-4.79,66.95-.81,11.47-1.49,22.96-2.12,34.44-.29,5.24-2.03,8.14-7.74,10.18-37.84,13.52-76.98,15.46-116.47,13.42-23.24-1.2-45.99-5.86-68.06-13.68-4.71-1.67-6.72-3.91-7.03-8.72-1.31-20.46-2.83-40.9-4.25-61.35-.94-13.55-2.1-27.1-2.7-40.66-.49-11.15,6.17-18.37,17.2-19.01,30.7-1.78,61.4-3.39,88.69-4.88Z"/><path class="cls-2" d="M238.34,363.01c-31.19-1.24-61.52-5.51-90.12-18.31-20.8-9.31-38.13-23.01-48.65-43.63-3.63-7.1-5.68-15.3-6.91-23.24-1.17-7.59,1.95-14.47,8.76-18.93,6.74-4.42,13.4-3.5,20.12,.38,14.24,8.24,14.6,8.18,14.39,24.44-.09,7.1,3.71,11.23,8.41,15.24,12.51,10.67,26.94,17.78,42.7,21.94,38.88,10.26,77.66,10.06,115.42-4.42,11.31-4.33,21.33-12.17,31.67-18.82,5.27-3.39,7.7-8.7,6.88-15.19-1.34-10.7,2.19-17.99,12.86-22.48,7.8-3.29,14.95-6.25,22.38-.72,7.42,5.53,9.4,13.33,7.88,22.37-4.05,24.14-19.06,40.5-38.25,53.68-18.5,12.7-39.59,19.06-61.42,22.61-15.24,2.48-30.72,3.44-46.1,5.09Z"/>
</g>
</svg>
`;
var snaxIcon = `<svg width="178" height="177" viewBox="0 0 178 177" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="89.0198" cy="88.4095" r="88.305" fill="#06061B"/>
<path d="M68.0815 75.158C67.5149 74.5153 66.8174 74.1932 65.9874 74.1932H49.0126C48.8618 74.1932 48.7384 74.1459 48.6455 74.0512C48.5511 73.9581 48.5039 73.8528 48.5039 73.7398V62.3958C48.5039 62.2828 48.5511 62.179 48.6455 62.0844C48.7384 61.9897 48.8618 61.9424 49.0126 61.9424H66.9499C71.4761 61.9424 75.381 63.7773 78.6629 67.4442L83.0201 72.7185L74.5327 82.9848L68.0815 75.158ZM99.4299 67.3877C102.712 63.7575 106.635 61.9424 111.199 61.9424H129.08C129.231 61.9424 129.344 61.9805 129.42 62.0553C129.495 62.1317 129.533 62.2446 129.533 62.3958V73.7398C129.533 73.8528 129.495 73.9581 129.42 74.0512C129.344 74.1459 129.231 74.1932 129.08 74.1932H112.105C111.275 74.1932 110.578 74.5153 110.011 75.158L97.5064 90.2452L110.068 105.445C110.634 106.051 111.312 106.354 112.105 106.354H129.08C129.231 106.354 129.344 106.401 129.42 106.496C129.495 106.59 129.533 106.714 129.533 106.864V118.208C129.533 118.321 129.495 118.426 129.42 118.519C129.344 118.614 129.231 118.661 129.08 118.661H111.199C106.635 118.661 102.73 116.828 99.4863 113.159L89.0754 100.568L78.6629 113.159C75.381 116.828 71.4578 118.661 66.8936 118.661H49.0126C48.8618 118.661 48.7476 118.614 48.673 118.519C48.5968 118.424 48.5603 118.302 48.5603 118.15V106.806C48.5603 106.693 48.5968 106.589 48.673 106.494C48.7476 106.399 48.8618 106.352 49.0126 106.352H65.9874C66.7793 106.352 67.4768 106.032 68.0815 105.387L80.3595 90.5276L99.4299 67.3877Z" fill="#00D1FF"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M1.62306 101.122C1.02459 96.9706 0.714844 92.7262 0.714844 88.4095C0.714844 85.5803 0.84789 82.7823 1.10807 80.0212L11.5198 67.3877C14.8017 63.7575 18.7248 61.9424 23.2891 61.9424H41.1701C41.3209 61.9424 41.4336 61.9805 41.5097 62.0553C41.5844 62.1317 41.6224 62.2446 41.6224 62.3958V73.7398C41.6224 73.8528 41.5844 73.9581 41.5097 74.0512C41.4336 74.1459 41.3209 74.1932 41.1701 74.1932H24.1953C23.3653 74.1932 22.6678 74.5153 22.1012 75.158L9.59627 90.2452L22.1576 105.445C22.7241 106.051 23.4018 106.354 24.1953 106.354H41.1701C41.3209 106.354 41.4336 106.401 41.5097 106.496C41.5844 106.59 41.6224 106.714 41.6224 106.864V118.208C41.6224 118.321 41.5844 118.426 41.5097 118.519C41.4336 118.614 41.3209 118.661 41.1701 118.661H23.2891C18.7248 118.661 14.82 116.828 11.5761 113.159L1.62306 101.122Z" fill="#00D1FF"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M176.393 101.284C177.007 97.0816 177.325 92.7827 177.325 88.4095C177.325 85.5791 177.192 82.7799 176.931 80.0176L168.27 90.5276L155.992 105.387C155.387 106.032 154.689 106.352 153.898 106.352H136.923C136.772 106.352 136.658 106.399 136.583 106.494C136.507 106.589 136.47 106.693 136.47 106.806V118.15C136.47 118.302 136.507 118.424 136.583 118.519C136.658 118.614 136.772 118.661 136.923 118.661H154.804C159.368 118.661 163.291 116.828 166.573 113.159L176.393 101.284ZM153.898 74.1932C154.728 74.1932 155.425 74.5153 155.992 75.158L162.443 82.9848L170.93 72.7185L166.573 67.4442C163.291 63.7773 159.386 61.9424 154.86 61.9424H136.923C136.772 61.9424 136.649 61.9897 136.556 62.0844C136.461 62.179 136.414 62.2828 136.414 62.3958V73.7398C136.414 73.8528 136.461 73.9581 136.556 74.0512C136.649 74.1459 136.772 74.1932 136.923 74.1932H153.898Z" fill="#00D1FF"/>
</svg>`;
function getDevice() {
if (typeof window !== 'undefined') {
const parsed = bowser.getParser(window.navigator.userAgent);
const os = parsed.getOS();
const browser = parsed.getBrowser();
const { type } = parsed.getPlatform();
return {
type: type,
os: os,
browser: browser
};
}
else {
return {
type: null,
os: null,
browser: null
};
}
}
const notNullish = (value) => value != null;
function isSVG(str) {
return str.includes('<svg');
}
function shortenAddress(add) {
return `${add.slice(0, 6)}…${add.slice(-4)}`;
}
function shortenDomain(domain) {
return domain.length > 11
? `${domain.slice(0, 4)}…${domain.slice(-6)}`
: domain;
}
async function copyWalletAddress(text) {
try {
const copy = await navigator.clipboard.writeText(text);
return copy;
}
catch (err) {
console.error('Failed to copy: ', err);
}
}
const toHexString = (val) => typeof val === 'number' ? `0x${val.toString(16)}` : val;
function chainIdToHex(chains) {
return chains.map((_a) => {
var { id } = _a, rest = __rest(_a, ["id"]);
const hexId = toHexString(id);
return Object.assign({ id: hexId }, rest);
});
}
function gweiToWeiHex(gwei) {
return `0x${(gwei * 1e9).toString(16)}`;
}
const chainIdToLabel = {
'0x1': 'Ethereum',
'0xaa36a7': 'Sepolia',
'0x38': 'Binance',
'0x89': 'Polygon',
'0xfa': 'Fantom',
'0xa': 'OP Mainnet',
'0x45': 'OP Kovan',
'0xa86a': 'Avalanche',
'0xa4ec': 'Celo',
'0x2105': 'Base',
'0x14a33': 'Base Goerli',
'0x64': 'Gnosis',
'0x63564C40': 'Harmony One',
'0xa4b1': 'Arbitrum One',
'0xa4ba': 'Arbitrum Nova',
'0x27bc86aa': 'Degen',
'0x890': 'SNAX'
};
function validEnsChain(chainId) {
// return L2s as Eth for ens resolution
switch (chainId) {
case '0x1':
case '0x89': // Polygon
case '0xa': //Optimism
case '0xa4b1': // Arb
case '0x144': // zksync
return '0x1';
case '0x5': // Goerli
return chainId;
case '0xaa36a7': // Sepolia
return chainId;
default:
return null;
}
}
const chainIdToViemENSImport = async (chainId) => {
switch (chainId) {
case '0x89':
case '0xa':
case '0xa4b1':
case '0x144':
case '0x1': {
const { mainnet } = await import('./index-40a497ea.js');
return mainnet;
}
case '0xaa36a7': {
const { sepolia } = await import('./index-40a497ea.js');
return sepolia;
}
default:
return null;
}
};
const networkToChainId = {
main: '0x1',
sepolia: '0xaa36a7',
xdai: '0x64',
'bsc-main': '0x38',
'matic-main': '0x89',
'fantom-main': '0xfa',
'matic-mumbai': '0x80001',
degen: '0x27bc86aa',
SNAX: '0x890'
};
const chainSty