Skip to content

Commit

Permalink
deploy: afb5643
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherferreira9 committed Dec 10, 2024
1 parent 3614c50 commit 5a0562d
Show file tree
Hide file tree
Showing 14,516 changed files with 990,466 additions and 1 deletion.
The diff you're trying to view is too large. We only load the first 3000 changed files.
27 changes: 27 additions & 0 deletions edkek-fix-examples/packages/examples/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MetaMask SDK Deployment</title>
<style>
body { font-family: Arial, sans-serif; max-width: 800px; margin: 0 auto; padding: 20px; }
h1 { color: #f45c00; }
ul { list-style-type: none; padding: 0; }
li { margin-bottom: 10px; }
a { color: #333333; text-decoration: none; }
a:hover { text-decoration: underline; }
</style>
</head>
<body>
<h1>MetaMask SDK Dapps</h1>
<h3>edkek-fix-examples</h3>
<ul>
<li><a href="pure-javascript/index.html">pure-javascript</a></li>
<li><a href="react-demo/build/index.html">react-demo</a></li>
<li><a href="vuejs/build/index.html">vuejs</a></li>
<li><a href="wagmi-demo-react/build/index.html">wagmi-demo-react</a></li>
<li><a href="with-web3onboard/build/index.html">with-web3onboard</a></li>
</ul>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Pure JavaScript SDK example
43 changes: 43 additions & 0 deletions edkek-fix-examples/packages/examples/pure-javascript/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<script src="node_modules/@metamask/sdk/dist/browser/iife/metamask-sdk.js"></script>
<script>
const sdk = new MetaMaskSDK.MetaMaskSDK({
logging: {
developerMode: true,
},
dappMetadata: {
name: 'Pure JS example',
},
});
</script>
<script>
let provider;

function connect() {
sdk.connect()
.then((res) => {
provider = sdk.getProvider();
})
.catch((e) => console.log('request accounts ERR', e));
}

function addEthereumChain() {
provider
.request({
method: 'wallet_addEthereumChain',
params: [
{
chainId: '0x89',
chainName: 'Polygon',
blockExplorerUrls: ['https://polygonscan.com'],
nativeCurrency: { symbol: 'POL', decimals: 18 },
rpcUrls: ['https://polygon-rpc.com/'],
},
],
})
.then((res) => console.log('add', res))
.catch((e) => console.log('ADD ERR', e));
}
</script>
<button onclick="connect()">Connect</button>

<button onclick="addEthereumChain()">ADD ETHEREUM CHAIN</button>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5a0562d

Please sign in to comment.