diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index d065df0..ba55d40 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -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 diff --git a/config/contracts_ethereum.json b/config/contracts_ethereum.json new file mode 100644 index 0000000..d624df5 --- /dev/null +++ b/config/contracts_ethereum.json @@ -0,0 +1,5 @@ +{ + "ChainId": 1, + "ChainName": "Ethereum", + "EARTH": "0x8FCF8BB7080C19f91Ebe6E1F901155e00d208E9D" +} \ No newline at end of file diff --git a/src/contracts.json b/src/contracts.json index 0e73491..d624df5 100644 --- a/src/contracts.json +++ b/src/contracts.json @@ -1,5 +1,5 @@ { - "ChainId": 11155111, - "ChainName": "sepolia", - "EARTH": "0x689ccA9CcD739275069fb7FC0Ad4c08Dd66f9E70" + "ChainId": 1, + "ChainName": "Ethereum", + "EARTH": "0x8FCF8BB7080C19f91Ebe6E1F901155e00d208E9D" } \ No newline at end of file diff --git a/src/deploy/index.html b/src/deploy/index.html index 9ed9b97..386872f 100644 --- a/src/deploy/index.html +++ b/src/deploy/index.html @@ -4,6 +4,9 @@ +

+ +

diff --git a/src/deploy/index.ts b/src/deploy/index.ts index bfb95f6..3db0981 100644 --- a/src/deploy/index.ts +++ b/src/deploy/index.ts @@ -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]}`); +}