From c13582a020767d4aa6e43c70582da7d4b55a00de Mon Sep 17 00:00:00 2001 From: William Entriken Date: Thu, 12 Sep 2024 01:53:04 -0400 Subject: [PATCH] update to use new JSON API --- _layouts/page.html | 17 +-- all-available.html | 46 ------- all-minted.html | 66 --------- all-personalized-on-main-contract.html | 70 ---------- all-personalized.html | 70 ---------- grant.html | 15 +-- list-available.html | 41 ++++++ list-of-personalized.html | 21 +-- list-personalized-on-main-contract.html | 32 +++++ unpersonalize.html | 169 ++++++++++++------------ 10 files changed, 181 insertions(+), 366 deletions(-) delete mode 100644 all-available.html delete mode 100644 all-minted.html delete mode 100644 all-personalized-on-main-contract.html delete mode 100644 all-personalized.html create mode 100644 list-available.html create mode 100644 list-personalized-on-main-contract.html diff --git a/_layouts/page.html b/_layouts/page.html index 2f3f6e1..1ae7225 100644 --- a/_layouts/page.html +++ b/_layouts/page.html @@ -6,29 +6,20 @@ - - + + - - - - +
{{ content }}
- diff --git a/all-available.html b/all-available.html deleted file mode 100644 index 9c28016..0000000 --- a/all-available.html +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: Every available Square -layout: page ---- -

{{ page.title }}

- - -
Square
- - \ No newline at end of file diff --git a/all-minted.html b/all-minted.html deleted file mode 100644 index 897dd7b..0000000 --- a/all-minted.html +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: Latest minted Squares -layout: page ---- -

{{ page.title }}

- - - -
SquareMinted block
- - \ No newline at end of file diff --git a/all-personalized-on-main-contract.html b/all-personalized-on-main-contract.html deleted file mode 100644 index 48fd8a0..0000000 --- a/all-personalized-on-main-contract.html +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: Squares personalized on main contract -layout: page ---- -

{{ page.title }}

- - -

Unpersonalize your Squares on the main contract to take advantage of the cheaper underlay contract. Learn more about the main and underlay contracts.

- - - -
SquareTitleLinkBlock
- - \ No newline at end of file diff --git a/all-personalized.html b/all-personalized.html deleted file mode 100644 index 9a7d507..0000000 --- a/all-personalized.html +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: Latest personalized Squares -layout: page ---- -

{{ page.title }}

- - - -
SquareTitleLinkBlock
- - \ No newline at end of file diff --git a/grant.html b/grant.html index 8e67423..f76bebc 100644 --- a/grant.html +++ b/grant.html @@ -1,5 +1,5 @@ --- -title: Grant Squares +title: Grant squares layout: page ---

Grant tokens

@@ -38,20 +38,19 @@

Log

document.getElementById("grant").addEventListener("click", async function() { await ethereum.request({ method: "eth_requestAccounts" }); - const provider = new ethers.providers.Web3Provider(window.ethereum); - const signer = provider.getSigner(); - const suSquaresContract = new ethers.Contract(suSquaresAddress, suSquaresABI, provider); - const suSquaresContractWithSigner = suSquaresContract.connect(signer); + const provider = new ethers.BrowserProvider(window.ethereum); // Updated for Ethers v6 + const signer = await provider.getSigner(); // 'getSigner' now returns a Promise in Ethers v6 + const suSquaresContract = new ethers.Contract(suSquaresAddress, suSquaresABI, signer); // No need for 'connect' method in Ethers v6 const address = document.getElementById("address").value; const tokenId = parseInt(document.getElementById("tokenId").value); - const tx = await suSquaresContractWithSigner.grantToken(tokenId, address, { gasLimit: 200000 }); + const tx = await suSquaresContract.grantToken(tokenId, address, { gasLimit: 200000 }); - // You must log it + // Log the transaction document.getElementById("log").innerText += tokenId + " https://etherscan.io/tx/" + tx.hash + "\n"; }); - document.getElementById("clear").addEventListener("click", async function() { + document.getElementById("clear").addEventListener("click", function() { document.getElementById("log").innerText = ""; }); diff --git a/list-available.html b/list-available.html new file mode 100644 index 0000000..071fb51 --- /dev/null +++ b/list-available.html @@ -0,0 +1,41 @@ +--- +title: Every available Square +layout: page +--- +

{{ page.title }}

+ + +
Square
+ + \ No newline at end of file diff --git a/list-of-personalized.html b/list-of-personalized.html index 721c2b3..1fc83c5 100644 --- a/list-of-personalized.html +++ b/list-of-personalized.html @@ -1,22 +1,23 @@ --- -title: List of personalized Squares +title: Every personalized Square layout: page --- -

Our Discord bot needs a list of personalized Squares for role permissions checking. Here is that list.

+

{{ page.title }}

+

Our Discord bot needs this list of personalized Squares to give roles.

\ No newline at end of file diff --git a/list-personalized-on-main-contract.html b/list-personalized-on-main-contract.html new file mode 100644 index 0000000..a1f65b8 --- /dev/null +++ b/list-personalized-on-main-contract.html @@ -0,0 +1,32 @@ +--- +title: Every Square personalized on main contract +layout: page +--- +

{{ page.title }}

+ + +

Unpersonalize your Squares on the main contract to take advantage of the cheaper underlay contract. Learn more about the main and underlay contracts.

+ +

The following Squares are still personalized on the main contract:

+ +

+ \ No newline at end of file diff --git a/unpersonalize.html b/unpersonalize.html index 2d53707..73e65e7 100644 --- a/unpersonalize.html +++ b/unpersonalize.html @@ -87,131 +87,134 @@

Step 3: Unpersonalize

- \ No newline at end of file +