Skip to content

Commit

Permalink
cd.yml: change chain to ethereum
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Geihs committed Mar 31, 2024
1 parent f865b61 commit 24deb25
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install and Build 🔧
run: |
npm ci
npm run build-select-network --chain=sepolia
npm run build-select-network --chain=ethereum
npm run build-webpack
touch dist/.nojekyll
echo earthtiles.org > dist/CNAME
Expand Down
5 changes: 5 additions & 0 deletions config/contracts_ethereum.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"ChainId": 1,
"ChainName": "Ethereum",
"EARTH": "0x8FCF8BB7080C19f91Ebe6E1F901155e00d208E9D"
}
6 changes: 3 additions & 3 deletions src/contracts.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ChainId": 11155111,
"ChainName": "sepolia",
"EARTH": "0x689ccA9CcD739275069fb7FC0Ad4c08Dd66f9E70"
"ChainId": 1,
"ChainName": "Ethereum",
"EARTH": "0x8FCF8BB7080C19f91Ebe6E1F901155e00d208E9D"
}
3 changes: 3 additions & 0 deletions src/deploy/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<meta charset="utf-8">
</head>
<body>
<p>
<button id="connect-button">Connect</button>
</p>
<p>
<button id="deploy-button">Deploy</button>
</p>
Expand Down
13 changes: 13 additions & 0 deletions src/deploy/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,16 @@ async function main() {
}

document.getElementById("deploy-button").onclick = e => main();

document.getElementById("connect-button").onclick = async e => {
const ethereum = (window as any).ethereum;
if (ethereum === undefined) {
const msg = "Could not find Web3 extension. Please install and reload.";
throw new Error(msg);
}
const provider = new ethers.providers.Web3Provider(ethereum);

// Connect to Web3.
const accounts = await provider.send("eth_requestAccounts", []);
log(`Connected to Web3 with account: ${accounts[0]}`);
}

0 comments on commit 24deb25

Please sign in to comment.