Skip to content

Commit

Permalink
deploy: 91e1e72
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherferreira9 committed Jan 8, 2025
1 parent 5578274 commit d869eb5
Show file tree
Hide file tree
Showing 14,515 changed files with 990,462 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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>chore-improve-react-connected-hook-behavior</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
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 d869eb5

Please sign in to comment.