GithubHelp home page GithubHelp logo

movemate's Introduction

Movemate

A library of module building blocks for Move on Aptos and Sui.

Movemate provides an advanced standard library of common modules in the Move ecosystem (working in tandem with the native frameworks), focusing on security, efficiency, composability, and ease of implementation.

Modules

  • acl: Multi-role access control list (ACL).
  • bcd: Binary canonical DEserialization. Convert vector<u8> to u64 and u128.
  • bloom_filter: Space-efficient probabilistic data structure for checking if an element is part of a set.
  • box: On Aptos, send objects without the recipient having to set up a store for themselves beforehand. On Sui, transfer objects with the store ability but not the key ability.
  • crit_bit: Crit-bit trees data structure. (Thanks to Econia.)
  • date: Date conversion library in Move.
  • escrow (Sui only): Very basic object escrow module on Sui.
  • escrow_shared (Sui only): Basic object escrow module with refunds and arbitration on Sui.
  • governance: On-chain coinholder governance (store coins and other objects; on Aptos, retrieve a signer for special actions like upgrading packages).
  • i64: Signed 64-bit integers.
  • i128: Signed 128-bit integers.
  • linear_vesting: Linear vesting of coins for a given beneficiary.
  • math: Standard math utilities missing in the Move language (for u64).
  • math_safe_precise: mul_div for u64s while avoiding overflow and a more precise quadratic function.
  • math_u128: Standard math utilities missing in the Move language (for u128).
  • merkle_proof: Merkle proof verification utilities.
  • pseudorandom: Pseudorandom number generator.
  • to_string: u128 to String conversion utilities.
  • u256: Unsigned 256-bit integer implementation in Move. (Thanks to Pontem.) Includes bitwise operations and vector<u8> conversion.
  • vectors: Vector utilities--specifically, comparison operators and a binary search function.
  • virtual_block: Replace latency auctions with gas auctions (with control over MEV rewards) via virtual blocks.

Outside the repo

Usage

Sui

Add the following to your Move.toml:

[dependencies.Movemate]
git = "https://github.com/pentagonxyz/movemate.git"
subdir = "sui"
rev = "devnet"

Aptos

Add the following to your Move.toml:

[dependencies.Movemate]
git = "https://github.com/pentagonxyz/movemate.git"
subdir = "aptos"
rev = "devnet"

Testing

Sui

cd movemate/sui
sui move test --instructions 100000

Aptos

cd movemate/aptos
aptos move test

Publishing

Sui

sui client publish --path ./movemate/sui --gas-budget 30000

Aptos

aptos move publish --package-dir ./movemate/aptos
aptos move run --function-id 0x3953993C1D8DFB8BAC2DA2F4DBA6521BA3E705299760FBEE6695E38BCE712A82::pseudorandom::init

movemate's People

Contributors

davidlucid avatar jetjadeja avatar secretshardul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

movemate's Issues

"Unable to resolve packages for package"

I added repository into my project using below dependences config
[dependencies.Movemate]
git = "https://github.com/pentagonxyz/movemate.git"
subdir = "aptos"
rev = "devnet"

[addresses]
movemate = "0x3953993C1D8DFB8BAC2DA2F4DBA6521BA3E705299760FBEE6695E38BCE712A82"

but I will get an error of "Unable to resolve packages for package"

image

image

I added other repos using same way, they are working fine.

Entry Functions Cannot Return Values

In aptos/move/boxes, some functions marked as entry functions are returning values. However, I do not think that's possible; to my understanding, entry functions cannot return values. An external javascript process calling into an on-chain module wouldn't be able to handle receiving a Move object, for example.

Aptos Does Not Compile With Latest Release (0.2.2)

Overview

The aptos implementation of Movemate does not compile using the latest release (0.2.2) which is currently running on devnet. Additionally deprecated syntax is being used Std::Signer instead of std::signer, likely leads to compilation issues.

Error

Attempting to run aptos move compile from the aptos subdirectory returns the following error

error[E01002]: unexpected token
   ┌─ /media/solidity/DATA1/blob_dir/Code/pentagonxyz/movemate/aptos/sources/VirtualBlock.move:51:9
   │
51 │         else CritBit::insert(block, bid_value, Vector::singleton(entry));
   │         ^^^^
   │         │
   │         Unexpected 'else'
   │         Expected an expression term

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.