Questions tagged [move-lang]

Move is a programming language for writing safe smart contracts. It was created to write contracts for the Diem blockchain. Use this tag for questions about writing or working with code in Move.

Move is a programming language for writing safe smart contracts originally developed at Facebook to power the Diem blockchain. Move is designed to be a platform-agnostic language to enable common libraries, tooling, and developer communities across diverse blockchains with vastly different data and execution models. Move's ambition is to become the "JavaScript of web3" in terms of ubiquity--when developers want to quickly write safe code involving assets, it should be written in Move.

37 questions
0
votes
1 answer

Calling Move (entry) functions using SUI CLI

I have published a module called certificates at 0x426ff70c987a00b9384b102f10a4f8bb8945141f \identities>sui client object --id 0x426ff70c987a00b9384b102f10a4f8bb8945141f ----- Move Package (0x426ff70c987a00b9384b102f10a4f8bb8945141f[1]) ----- Owner:…
Jim
  • 450
  • 2
  • 10
0
votes
1 answer

Checking if a parameter is a literal string in sui move

I want to check if a field: string::String in a struct is the exact string. struct A has key, store { id: UID, field: string::String, } public entry fun is_field_hello(a: &A): bool { a.field == 'hello' } This is the compiler error I…
Jim
  • 450
  • 2
  • 10
0
votes
0 answers

Creation of a Verification system using Sui Move

Using the key-lock pattern in Sui by Examples, I am envisioning the creation of a verification system on Sui. A central trusted authority can build the following: 3 structs Certificate: shared-object - contained within is another object and…
Jim
  • 450
  • 2
  • 10
0
votes
1 answer

Ways to test an access modifier

good morning, guys. Is there a way to test the access modifier? e.g. ensure that create_block is public(fun)? afaik that's not possible to do in a unit test (as the 'expected failure' test itself would not compile). is this something we could use…
calimoose
  • 115
  • 6
0
votes
0 answers

How can we create transferable one-time witnesses?

I'm curious if there is a way to create a transferable OTW that passes the sui::types::is_one_time_witness(witness) test. A transferable witness needs to have the ability store (in order to be wrapped into the carrier object), which is conflicting…
calimoose
  • 115
  • 6
0
votes
1 answer

(Move) push_back on nested vector

I have a data type defined as let digests: vector>; In this digests vector if I try to use push_back to insert another vector as the following let digest1: vector; let digests: vector>; digest1 = h"00"; digests =…
pariwesh
  • 341
  • 4
  • 11
-1
votes
1 answer

Creating an account fails with "Failed to get account from validator, error: Waypoint value mismatch"

the use case I am following the tutorial to create my first transaction: https://developers.diem.com/docs/tutorials/my-first-transaction I run Ubuntu 20.04 I executed those commands successfully: git clone https://github.com/diem/diem.git && cd…
Abdelkrim
  • 2,048
  • 5
  • 30
  • 44
1 2
3