forked from a1ex-kaufmann/metamask-to-bsc
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
185 lines (172 loc) · 23.2 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en-US">
<head profile="http://www.w3.org/2005/10/profile">
<link rel="icon" type="image/png" href="./favicon.png">
<title>Ubiq - Add to MetaMask</title>
<style>
* {
margin: 0;
padding: 0;
text-decoration: none;
list-style-type: none;
}
h2,
div {
text-align: center;
margin: 1em 0 1em 0;
}
button {
width: 120px;
height: 40px;
background-color: -internal-light-dark(rgb(239, 239, 239), rgb(74, 74, 74));
outline: none;
border: none;
color: blacks;
font-weight: 700;
border-radius: 3px;
}
.button.black {
background: #303030;
background: -webkit-gradient(linear, 0 0, 0 bottom, from(#656565), to(#444));
background: -moz-linear-gradient(#656565, #444);
background: linear-gradient(#656565, #444);
border: solid 1px #535353;
border-bottom: solid 3px #414141;
box-shadow: inset 0 0 0 1px #939393;
color: #fff;
text-shadow: 0 1px 0 #2f2f2f; }
.button.black:hover {
background: #4c4c4c;
background: -webkit-gradient(linear, 0 0, 0 bottom, from(#4c4c4c), to(#565656));
background: -moz-linear-gradient(#4c4c4c, #565656);
background: linear-gradient(#4c4c4c, #565656);
border: solid 1px #464646;
border-bottom: solid 3px #414141;
box-shadow: inset 0 0 0 1px #818181; }
.button.black:active {
background: #474747;
background: -webkit-gradient(linear, 0 0, 0 bottom, from(#474747), to(#444));
background: -moz-linear-gradient(#474747, #444);
background: linear-gradient(#474747, #444);
border: solid 1px #2f2f2f;
box-shadow: inset 0 10px 15px 0 #3e3e3e; }
</style>
</head>
<body>
<script>
function connectToUBQ() {
if (typeof window.ethereum == 'undefined') {
alert('MetaMask is not installed!');
} else if (window.ethereum.chainId == "0x8") {
alert("You are already connected to the Ubiq network")
} else {
const chain = {
chainId: "0x8",
chainName: "Ubiq",
nativeCurrency: {
name: "Ubiq Ether",
symbol: "UBQ",
decimals: 18,
},
rpcUrls: ["https://rpc.octano.dev/"],
blockExplorerUrls: ["https://ubiqscan.io/"]
};
window.ethereum.request({
method: "wallet_addEthereumChain",
params: [chain],
}).catch((error) => {
console.log(error);
alert("An error has occurred. Please make sure MetaMask is ready to go. See error in log");
});
}
}
const wubq64x64Base64Image = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAB2HAAAdhwGP5fFlAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAACUJJREFUeJzVm3twVNUZwH/f3bub1wZCTAKoiCMiKKhYpYqWiKi1Y8epWnXEClit2MGaQItFp+M01ul0BAxJqG0pUwvSgmO17XRsO2oVeWip1SryMGG0Ti0iyYZswuaxye7er38sSTbJ7ubu3bvR/v7anHu+x/ly7neeV8g1x9ZWYJiViDEL1ZnAOcAEoATwn6zVCbQDQZQmDBqxOIhGdjPpwZZcuic50dpaN5cYixCuBWZlYUeBg6i8hBHbTvl333LPyTjuBeB4wziiugzRu4FzXdObiHII5NcY4Y2Urw65oTL7AHTUlhI2qhEeIN61x4Igqg3k5dVTsjyYjSLnAVAVWuoXI6wDyrNxwrkPtCHyI8qDG5Aay4kKZwFoqT0bjC3A5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4FZquvYSdjDsjkDlQUof6kgsGjmNUxUC9buBK7K3mJqtxddxZ/7MpM/ejQao7tzJrsgnbprcRXn1AkSGZMyRfVJEUWMpSMeIZzkmqL2s6NzJJcHtbje+HdVvDm88pLolNrHqQ7C+5aYH6bBQtoYbmdG2xdmwNhqq9zBx5b+TPUqdlSpWPodKrbuejGRn5BMuCm5jSehFAk6GtdEQXcPElb9P9Th9Wq6oWgVsdtklAD62Qtx24i8saH+O97IZ1tKhbKOs4+F0VWxclt7oJdDzR/7vLkvzAuUFN2d3WRpA7otQ3v41kKdccy3XCL+x0/h4VbuoCq11a1BZlZVzuUURXUvZioeSZfxkZL4Z1rz+RkSeYuy+ELPLCZB7qah+NhMhZ7uBzevPQozNoPMdybvPLizPXUx64KNMBd34bG4tUOFYTzYobRjyMGVVm+x2+eFkfxgTXF9CVKqwqI5fQhwTjiNSj6enYfjcPlPcO41qedKP9C0DuRtllmt6h3IA4SnUu4mK+zvdUJib47iWhouQ2B0o14Kcj5PvE+NYwHsIL6O6rX8by01yfx55dF0ZHk8lIuehnItwDlCKDvt8XmgH2lBpQrQRlYPEIrs5dVWOpolx/gfi9xA7+7cjXQAAAABJRU5ErkJggg==';
function addPolygonWUBQToMetamask() {
if (typeof window.ethereum == 'undefined') {
alert('MetaMask is not installed!');
} else if (window.ethereum.chainId != "0x89") {
alert("Please connect to the Polygon network to add this asset")
} else {
const polygonWUBQ = {
type: "ERC20",
options: {
address: "0xb1c5c9b97b35592777091cd34ffff141ae866abd",
symbol: "WUBQ",
decimals: 18,
image: wubq64x64Base64Image
}
};
window.ethereum.request({
method: "wallet_watchAsset",
params: polygonWUBQ
}).catch((error) => {
console.log(error);
alert("An error has occurred. Please make sure MetaMask is ready to go. See error in log");
});
}
}
function addAvalancheWUBQToMetamask() {
if (typeof window.ethereum == 'undefined') {
alert('MetaMask is not installed!');
} else if (window.ethereum.chainId != "0xa86a") {
alert("Please connect to the Avalanche network to add this asset")
} else {
const avalancheWUBQ = {
type: "ERC20",
options: {
address: "0x954C3140FEF98D725eC988D1d75E686c595D62FD",
symbol: "WUBQ",
decimals: 18,
image: wubq64x64Base64Image
}
};
window.ethereum.request({
method: "wallet_watchAsset",
params: avalancheWUBQ
}).catch((error) => {
console.log(error);
alert("An error has occurred. Please make sure MetaMask is ready to go. See error in log");
});
}
}
const grans128x128Base64Image = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAABS2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDIgNzkuMTYwOTI0LCAyMDE3LzA3LzEzLTAxOjA2OjM5ICAgICAgICAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIi8+CiA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgo8P3hwYWNrZXQgZW5kPSJyIj8+nhxg7wAAI+NJREFUeNrtXQl4FFW2DklIgCzd6SydRZw385aZ92Ycx+eb1RGdRR3cF3AddwQGBHFBBIZFZA+QEEJIgIQAWdjCpixGVEBWEQQBQQQUF5J0Z+v0NjPfm3ffOVVd3fdW3eqq7q5OANPf939AgOrq+s89+zkdE9P96n51v7pfV9Rr8I9jzYDfAp4DTAfUAHYDPgU0AVwAIoPb93ef+v4t/p+ZgMGAfnjN7id7aZLdA3AtYBRgNeBLDrlG4YLvPV4CXAeI7Waga0jvA3gAUAWwRZFwLdgB1YCBgORuZqJLehygP2AVwBsuacN+FktG/zqOTLk1nky5JQD8Gf5dBMKA97QGcCcgvpsx44jPAkwAfKuXjAl/iCOVQ+LJ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hcAAAAASUVORK5CYII=';
function addUbiqGRANSToMetamask() {
if (typeof window.ethereum == 'undefined') {
alert('MetaMask is not installed!');
} else if (window.ethereum.chainId != "0x8") {
alert("Please connect to the Ubiq network to add this asset")
} else {
const ubiqGRANS = {
type: "ERC20",
options: {
address: "0x0826180A4c981d5095Cb5c48BB2A098A44cf6f73",
symbol: "GRANS",
decimals: 18,
image: grans128x128Base64Image
}
};
window.ethereum.request({
method: "wallet_watchAsset",
params: ubiqGRANS
}).catch((error) => {
console.log(error);
alert("An error has occurred. Please make sure MetaMask is ready to go. See error in log");
});
}
}
</script>
<h2>Add Ubiq to MetaMask in one click (via <a href="https://eips.ethereum.org/EIPS/eip-3085">EIP-3085</a>)</h2>
<div><button class="button black" onclick="connectToUBQ()">Add!</button></div>
<h2>Add 10grans (GRANS) to MetaMask in one click (via <a href="https://eips.ethereum.org/EIPS/eip-747">EIP-747</a>)</h2>
<div><button class="button black" onclick="addUbiqGRANSToMetamask()">Add!</button></div>
<hr>
<h1>Polygon</h1>
<h2>Add Polygon WUBQ to MetaMask in one click (via <a href="https://eips.ethereum.org/EIPS/eip-747">EIP-747</a>)</h2>
<div><button class="button black" onclick="addPolygonWUBQToMetamask()">Add!</button></div>
<h2><a href="https://info.quickswap.exchange/pair/0x8dccc1251f93fc4eb71dc7a686b58d3e718a5949#/pair/0x8dccc1251f93fc4eb71dc7a686b58d3e718a5949">Polygon WUBQ on Quickswap</a></h2>
<hr>
<h1>Avalanche</h1>
<h2>Add Avalanche WUBQ to MetaMask in one click (via <a href="https://eips.ethereum.org/EIPS/eip-747">EIP-747</a>)</h2>
<div><button class="button black" onclick="addAvalancheWUBQToMetamask()">Add!</button></div>
</body>
</html>