Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The comment on line 336 is slightly misleading. In the context of the EAS SDK, tx.wait() on a transaction from eas.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.

    // Wait for confirmation and get the new attestation's UID
    const newAttestationUID = await tx.wait();


console.log(
"✅ Attestation created successfully! UID:",
receipt.attestationUID
newAttestationUID
);
} catch (error) {
console.error("❌ Error creating attestation:", error.message);
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The comment on line 336 is slightly misleading. In the context of the EAS SDK, tx.wait() on a transaction from eas.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.

    // Wait for confirmation and get the new attestation's UID
    const newAttestationUID = await tx.wait();


console.log(
"✅ Attestation created successfully! UID:",
receipt.attestationUID
newAttestationUID
);
} catch (error) {
console.error("❌ Error creating attestation:", error.message);
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The comment on line 368 is slightly misleading. In the context of the EAS SDK, tx.wait() on a transaction from eas.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.

    // Wait for confirmation and get the new attestation's UID
    const newAttestationUID = await tx.wait();


console.log(
"✅ Attestation created successfully! UID:",
receipt.attestationUID
newAttestationUID
);
} catch (error) {
console.error("❌ Error creating attestation:", error.message);
Expand Down Expand Up @@ -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);
Expand Down
11 changes: 6 additions & 5 deletions content/docs/use-case-guides/attestation-service.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The comment on line 333 is slightly misleading. In the context of the EAS SDK, tx.wait() on a transaction from eas.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.

    // Wait for confirmation and get the new attestation's UID
    const newAttestationUID = await tx.wait();


console.log(
"✅ Attestation created successfully! UID:",
receipt.attestationUID
newAttestationUID
);
} catch (error) {
console.error("❌ Error creating attestation:", error.message);
Expand Down Expand Up @@ -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);
Expand Down