Andromeda
ADO LibraryBuild AppsDevelop ADOsCLIWeb Application Docs
Andromeda Beta ADOs
Andromeda Beta ADOs
  • Platform and Framework
    • Introduction to AndromedaOS
    • ADO Classes
    • Andromeda Messaging Protocol
      • Kernel
      • ADO Database
      • Economics Engine
      • Virtual File System
    • ADO Base
      • AndromedaMsg
      • AndromedaQuery
    • Common Types
    • Deployed Contracts
  • Andromeda Digital Objects
    • Introduction to ADOs
    • Address List
    • Auction
    • App
    • Conditional Splitter
    • Crowdfund
    • Curve
    • CW20
    • CW20 Staking
    • CW721
    • CW20 Exchange
    • Graph
    • Lockdrop
    • Marketplace
    • Merkle-Airdrop
    • Point
    • Primitive
    • Rates
    • Rate Limiting Withdrawals
    • Fixed Amount Splitter
    • Splitter
    • Timelock
    • Validator Staking
    • Vesting
    • Weighted Distribution Splitter
  • Andromeda Apps
    • Introduction to Apps
    • Crowdfunding App
    • Auctioning App
    • Cw20 Staking App
    • Marketplace App
  • Developing an ADO
    • Getting Started
      • Instantiation
      • Execution
      • Queries
      • Testing
    • ADO Example
    • ADO Submissions
  • Andromeda CLI
    • Introduction
    • Help and Shortcuts
    • ADO
    • Bank
    • Chain
    • Gql
    • Tx
    • OS
    • Wallet
    • Wasm
    • Clearing CLI Data
    • Clear and Exit
  • Chain
    • Running a Node
    • Staking and Rewards
  • Andromeda Dashboard
    • Tokenomics Dashboard
    • Dashboard API
  • Andromeda Changelog
    • Newest Releases
  • Additional Resources
    • GitHub
    • Website
    • White Paper
Powered by GitBook

Additional Resources

  • Github
  • Website

Community

  • Discord
  • Telegram

Socials

  • Twitter
  • Medium
  • Youtube
On this page
  • Introduction
  • InstantiateMsg
  • ExecuteMsg
  • SetPoint
  • DeletePoint
  • UpdateRestriction
  • Base Executes
  • QueryMsg
  • GetPoint
  • GetDataOwner
  • Base Queries

Was this helpful?

  1. Andromeda Digital Objects

Point

PreviousMerkle-AirdropNextPrimitive

Last updated 3 months ago

Was this helpful?

Introduction

The Point ADO allows users to store the coordinates for one point. This ADO can then be referenced in the to save this coordinate for the user.

The Point ADO can be set to one of the following:

  • Private: Only accessible by the contract owner of the ADO.

  • Public: Accessible by anyone.

  • Restricted: Only accessible to the address that set the point the first time.

Ado_type: point

Version: 0.1.0-beta

InstantiateMsg

pub struct InstantiateMsg {
    pub restriction:PointRestriction,
    pub kernel_address: String,
    pub owner: Option<String>
}
{
"restriction":"public",
"kernel_address":"andr1..."
}
Name
Type
Description

restriction

Specifies who has access specify the point coordiantes

kernel_address

String

owner

Option<String>

Optional address to specify as the owner of the ADO being created. Defaults to the sender if not specified.

PointRestriction

An enum defining the different types of restrictions that can be set.

pub enum PointRestriction {
    Private,
    Public,
    Restricted,
}
  • Private: Only accessible by the contract owner of the ADO.

  • Public: Accessible by anyone.

  • Restricted: Only accessible to the key owner (The address that first set the point).

ExecuteMsg

SetPoint

Sets the point coordinates.

pub enum ExecuteMsg {
SetPoint {
   point: PointCoordinate 
    },
  }
{
"set_point":{
    "point":{
        "x_coordinate": 25.66,
        "y_coordinate": 40.33,
        "z_coordinate": 17.9
          }
        },
Name
Type
Description

point

The coordinates of the point to save.

PointCoordinate

pub struct PointCoordinate {
    pub x_coordinate: SignedDecimal,
    pub y_coordinate: SignedDecimal,
    pub z_coordinate: Option<SignedDecimal>,
}

/// A signed fixed-point decimal value with 18 fractional digits.
/// The greatest possible value that can be represented is 
/// 170141183460469231731.687303715884105727 (which is (2^127 - 1) / 10^18)
/// and the smallest is
/// -170141183460469231731.687303715884105728 (which is -2^127 / 10^18).
pub struct SignedDecimal(#[schemars(with = "String")] Int128);
Name
Type
Description

x_coordinate

String

The x coordinate for the point.

y_coordinate

String

The y coordinate for the point.

z_coordinate

Option<String>

The z coordinate for the point. Do not specify in case the graph is 2D.

DeletePoint

Deletes the data attached to set point.

pub enum ExecuteMsg{
   DeletePoint {},
}
{
"delete_point":{}
}

UpdateRestriction

Changes the restriction set on the Point ADO.

Only available to the contract owner.

pub enum ExecuteMsg {
 UpdateRestriction {
        restriction: PointRestriction,
    },
}
{
"update_restriction":{
    "restriction":"private"
    }
}
Name
Type
Description

restriction

The new restriction type to use for the Point ADO.

Base Executes

QueryMsg

GetPoint

Gets the coordinates of the stored point.

pub enum QueryMsg { 
    #[returns(PointCoordinate)]
    GetPoint {},
    }
{
"get_point":{}
}

GetValueResponse

#[cw_serde]
pub struct PointCoordinate {
    pub x_coordinate: String,
    pub y_coordinate: String,
    pub z_coordinate: Option<String>,
}
{
 "x_coordinate": 3,
 "y_coordinate": 6,
 "z_coordinate": 15
}
Name
Type
Description

x_coordinate

String

The x coordinate for the point.

y_coordinate

String

The y coordinate for the point.

z_coordinate

Option<String>

The z coordinate for the point.

GetDataOwner

Queries the address of the user who set the point coordinates.

pub enum QueryMsg {
#[returns(GetDataOwnerResponse)]
    GetDataOwner {},
    }
{
"get_data_owner":{}
}

GetDataOwnerResponse

#[cw_serde]
pub struct GetDataOwnerResponse {
    pub owner: AndrAddr,
}
Name
Type
Description

owner

AndrAddr

The address that set the point coordinates.

Base Queries

Contract address of the to be used for messaging. Kernel contract address can be found in our .

Authorization for this message depends on the set .

Authorization for this message depends on the set .

The rest of the execute messages can be found in the section.

The rest of the query messages can be found in the section.

Graph ADO
ADO Base
ADO Base
PointRestriction
PointRestriction
kernel contract
AMP
deployed contracts
PointRestriction
PointCoordinate
PointRestriction