Skip to content

crypto-unfold2024/sui-contract-attestation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Attestation Contract

Overview

This contract is a simple implementation of an attestation system on Sui. It allows users to create and manage attestations with structured data fields such as user address, geographical coordinates (latitude and longitude), and a verification status. The contract is designed to be lightweight, efficient, and easy to integrate into other systems.

Features

  • Structured Attestations:

    • User address (address)
    • Geographical coordinates (latitude and longitude as u64)
    • Verification status (bool)
  • Efficient Design:

    • Uses primitive types for simplicity and performance.
  • Getter Functions:

    • Retrieve individual fields such as user, latitude, longitude, and verified.

Deployed Contract

The attestation contract is deployed on Sui Devnet.

Deployed Contract on Sui Devnet

Usage

Creating an Attestation

You can create an attestation using the create_attestation function:

let attestation = create_attestation(
    @0x1234,      // User's address
    123456789,    // Latitude (scaled, e.g., 12.3456789 * 10^7)
    987654321,    // Longitude (scaled, e.g., 98.7654321 * 10^7)
    true,         // Verified status
    ctx
);

About

Sui move contract allows us to create attestations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages