-
Notifications
You must be signed in to change notification settings - Fork 0
fix(docs): correct EAS variable naming and attestation UID access #652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -302,7 +302,7 @@ const config = { | |
| // Connect to the blockchain | ||
| const provider = new ethers.JsonRpcProvider(config.rpcUrl); | ||
| const signer = new ethers.Wallet(config.privateKey, provider); | ||
| const EAS = new EAS(config.easAddress); | ||
| const eas = new EAS(config.easAddress); | ||
| eas.connect(signer); | ||
|
|
||
| // Create an encoder that matches our schema structure | ||
|
|
@@ -333,11 +333,12 @@ async function createAttestation() { | |
| }, | ||
| }); | ||
|
|
||
| // Wait for confirmation and get the result | ||
| const receipt = await tx.wait(); | ||
| // Wait for confirmation and get the full transaction receipt | ||
| const newAttestationUID = await tx.wait(); | ||
|
Comment on lines
+336
to
+337
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The comment on line 336 is slightly misleading. In the context of the EAS SDK, |
||
|
|
||
| console.log( | ||
| "✅ Attestation created successfully! UID:", | ||
| receipt.attestationUID | ||
| newAttestationUID | ||
| ); | ||
| } catch (error) { | ||
| console.error("❌ Error creating attestation:", error.message); | ||
|
|
@@ -382,7 +383,7 @@ const config = { | |
| async function verifyAttestation(attestationUID) { | ||
| // Setup our blockchain connection | ||
| const provider = new ethers.JsonRpcProvider(config.rpcUrl); | ||
| const EAS = new EAS(config.easAddress); | ||
| const eas = new EAS(config.easAddress); | ||
| eas.connect(provider); | ||
|
|
||
| console.log("🔍 Verifying attestation:", attestationUID); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -334,7 +334,7 @@ const config = { | |
| // Connect to the blockchain | ||
| const provider = new ethers.JsonRpcProvider(config.rpcUrl); | ||
| const signer = new ethers.Wallet(config.privateKey, provider); | ||
| const EAS = new EAS(config.easAddress); | ||
| const eas = new EAS(config.easAddress); | ||
| eas.connect(signer); | ||
|
|
||
| // Create an encoder that matches our schema structure | ||
|
|
@@ -365,11 +365,12 @@ async function createAttestation() { | |
| }, | ||
| }); | ||
|
|
||
| // Wait for confirmation and get the result | ||
| const receipt = await tx.wait(); | ||
| // Wait for confirmation and get the full transaction receipt | ||
| const newAttestationUID = await tx.wait(); | ||
|
Comment on lines
+368
to
+369
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The comment on line 368 is slightly misleading. In the context of the EAS SDK, |
||
|
|
||
| console.log( | ||
| "✅ Attestation created successfully! UID:", | ||
| receipt.attestationUID | ||
| newAttestationUID | ||
| ); | ||
| } catch (error) { | ||
| console.error("❌ Error creating attestation:", error.message); | ||
|
|
@@ -414,7 +415,7 @@ const config = { | |
| async function verifyAttestation(attestationUID) { | ||
| // Setup our blockchain connection | ||
| const provider = new ethers.JsonRpcProvider(config.rpcUrl); | ||
| const EAS = new EAS(config.easAddress); | ||
| const eas = new EAS(config.easAddress); | ||
| eas.connect(provider); | ||
|
|
||
| console.log("🔍 Verifying attestation:", attestationUID); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -299,7 +299,7 @@ const config = { | |
| // Connect to the blockchain | ||
| const provider = new ethers.JsonRpcProvider(config.rpcUrl); | ||
| const signer = new ethers.Wallet(config.privateKey, provider); | ||
| const EAS = new EAS(config.easAddress); | ||
| const eas = new EAS(config.easAddress); | ||
| eas.connect(signer); | ||
|
|
||
| // Create an encoder that matches our schema structure | ||
|
|
@@ -330,11 +330,12 @@ async function createAttestation() { | |
| }, | ||
| }); | ||
|
|
||
| // Wait for confirmation and get the result | ||
| const receipt = await tx.wait(); | ||
| // Wait for confirmation and get the full transaction receipt | ||
| const newAttestationUID = await tx.wait(); | ||
|
Comment on lines
+333
to
+334
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The comment on line 333 is slightly misleading. In the context of the EAS SDK, |
||
|
|
||
| console.log( | ||
| "✅ Attestation created successfully! UID:", | ||
| receipt.attestationUID | ||
| newAttestationUID | ||
| ); | ||
| } catch (error) { | ||
| console.error("❌ Error creating attestation:", error.message); | ||
|
|
@@ -379,7 +380,7 @@ const config = { | |
| async function verifyAttestation(attestationUID) { | ||
| // Setup our blockchain connection | ||
| const provider = new ethers.JsonRpcProvider(config.rpcUrl); | ||
| const EAS = new EAS(config.easAddress); | ||
| const eas = new EAS(config.easAddress); | ||
| eas.connect(provider); | ||
|
|
||
| console.log("🔍 Verifying attestation:", attestationUID); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment on line 336 is slightly misleading. In the context of the EAS SDK,
tx.wait()on a transaction fromeas.attest()is overridden to return the UID of the new attestation directly, not the full transaction receipt. A more accurate comment would clarify this for developers using this example.