🔮Social Oracle™️ GIVE
Information about Coordinape GIVE on Base Chain via an EAS schema, generated from rich GIVE actions taken in CoLinks, Farcaster, and GIVE.party.
Last updated
Was this helpful?
Was this helpful?
import { EAS, SchemaEncoder } from "@ethereum-attestation-service/eas-sdk";
const easContractAddress = "0x4200000000000000000000000000000000000021";
const schemaUID = "0x82c2ec8ec89cf1d13022ff0867744f1cecf932faa4fe334aa1bb443edbfee3fa";
const eas = new EAS(easContractAddress);
// Signer must be an ethers-like signer.
await eas.connect(signer);
// Initialize SchemaEncoder with the schema string
const schemaEncoder = new SchemaEncoder("address from,uint16 amount,string platform,string url,string context,string skill,string tag,string note,uint16 weight");
const encodedData = schemaEncoder.encodeData([
{ name: "from", value: "0x0000000000000000000000000000000000000000", type: "address" }
{ name: "amount", value: "0", type: "uint16" }
{ name: "platform", value: "", type: "string" }
{ name: "url", value: "", type: "string" }
{ name: "context", value: "", type: "string" }
{ name: "skill", value: "", type: "string" }
{ name: "tag", value: "", type: "string" }
{ name: "note", value: "", type: "string" }
{ name: "weight", value: "0", type: "uint16" }
]);
const tx = await eas.attest({
schema: schemaUID,
data: {
recipient: "0x0000000000000000000000000000000000000000",
expirationTime: 0,
revocable: true, // Be aware that if your schema is not revocable, this MUST be false
data: encodedData,
},
});
const newAttestationUID = await tx.wait();
console.log("New attestation UID:", newAttestationUID);