testnet
GitHub

Query/GetAttestation

GetAttestation(EasContract, Uid) -> AttestationResponse

Retrieves a specific attestation by its UID from the EAS contract. This performs a view call to the EVM.

Parameters

Name Type Required Description
eas_contract string The address of the EAS contract (0x hex or bech32 'maroo1...').
uid string The 32-byte unique identifier of the attestation (hex string).

Returns

Type: AttestationResponse

The decoded attestation object containing schema, recipient, expiration, and data payload.

Errors

Code Name Description
ErrEVMCall EVM Call Failed The contract call reverted or failed execution.
ErrDecodeResponse Decode Error The returned data could not be decoded into the Attestation struct.

Examples

gRPC Client

Querying an attestation using the Go gRPC client.

client := types.NewQueryClient(grpcConn)
resp, err := client.GetAttestation(ctx, &types.QueryGetAttestationRequest{
    EasContract: "0x4200000000000000000000000000000000000021",
    Uid: "0x1234...abcd", // 32 bytes hex
})
if err != nil {
    log.Fatal(err)
}
fmt.Printf("Attester: %s\n", resp.Attestation.Attester)

CLI Command

Using the CLI to fetch an attestation.

marood query eas get-attestation 0x4200...0021 0x1234...abcd
ESC
Type to search