Questions tagged [aptos]

Aptos is a community-focused Layer 1 blockchain with a public ledger. Questions should relate exclusively to programming on the Aptos blockchain. For other support, please go to the Aptos Discord: https://discord.com/invite/aptoslabs.

Aptos is an open source, public, permissionless blockchain. Aptos follows the key principles of scalability, safety, reliability, and upgradeability. Aptos supports the Move programming language for creation of easy-to-use smart contracts and enables high throughout of transactions on-chain. The Aptos blockchain is now in mainnet and handling public transactions. Find the technical docs at: https://aptos.dev/.

44 questions
4
votes
0 answers

Aptos-sdk | How to decode a hexString into a human readable string

I am currently trying to get the information of the fields network_addresses and fullnode_addresses in the validator set. (i got the info from this api resquest call, json there…
trikunai
  • 41
  • 1
4
votes
3 answers

How do you define and query a read function in a Move module on Aptos Blockchain?

In the Aptos Move docs, it explains how to interact with a smart contract which has exposed "entry functions".In the hello_blockchain example, set_message is used. Move modules expose access points, also referred as entry functions. These access…
Jolow
  • 41
  • 1
3
votes
1 answer

How do I call a function in a different Move module / smart contract?

I know there is a Move module (smart contract) on chain with a function that looks like this: public entry fun do_nothing() {} I know it is deployed at 6286dfd5e2778ec069d5906cd774efdba93ab2bec71550fa69363482fbd814e7::other::do_nothing. You can see…
Daniel Porteous
  • 5,536
  • 3
  • 25
  • 44
2
votes
0 answers

How do I call functions in Move?

I currently have this function public entry fun create_game( account: &signer, prize_pool_amount: u64, player_one_address: address, player_two_address: address ) acquires State { // TODO: Call…
2
votes
0 answers

init a aptos wallet with mnemonic by python

I only known its about bip39 to generate a mnemonic and use bip44 to get a hd wallet, the aptos derivation path is "m/44'/637'/0'/0'/0'" and privdev is "0x8000027d" thanks bip44
shawngmy
  • 31
  • 1
1
vote
1 answer

Remix IDE compilation error[E01002]: unexpected token in Aptos Move module

I'm new to Aptos Move. I'm writing a smart contract but keep getting the E01002 error on my while loop. It was a for loop initially but changed to while because of error outputs. ... let release_times = vector::create(); let…
1
vote
0 answers

AptosBridge in BSC Chain script bot problem (Node.js)

Writing script for transactions thru Aptos bridge from BSC Chain. The problem is - every time I get the same transaction revert reason. LzApp: Not enough native token. I checked everything in aptos docs. Everything seems to be right but still…
Tim Reznik
  • 11
  • 1
1
vote
0 answers

How to create multi agent transactions in Aptos blockchain?

I've written multi-agent-transaction implementation using Aptos Typescript SDK. Steps Create a new TransactionBuilderRemoteABI instance using the aptosClient and sender address const builder = new TransactionBuilderRemoteABI(aptosClient, { …
Anto
  • 153
  • 1
  • 7
1
vote
1 answer

Does @aptos-labs/wallet-adapter-core have the ability to switch wallet networks?

I want to switch aptos wallet network such as Petra, But failed. const arr = [ new PetraWallet()] const wallet = new WalletCore(arr) wallet.connect("Petra").then(() => { // How Can I switch network from Mainnet to Devnet ? // TODO…
莫海江
  • 11
  • 1
1
vote
0 answers

Install move-analyzer got "Connection to server got closed"

Hi I'm following the instruction in the move-analyzer extension to install it but it emits this error. How can I fix this?
marethyu
  • 95
  • 6
1
vote
1 answer

Aptos Blockchain Node unable to sync properly after switching to fast sync. What to do?

We've been running a testnet node for 6 days but unfortunately the node hasn't been able to sync properly. We joined the validator set on the 10th and let the node sync till the 13th after which we switched to fast…
wintertoro
  • 21
  • 4
1
vote
1 answer

Aptos Bytecode / ABI to move file?

I have an address with some deployed modules, is there a way for me to translate the Bytecode / ABI info to a file.move so it will be human readable?
Bob Sfog
  • 105
  • 8
1
vote
1 answer

How do I execute a Move script with the Aptos CLI?

Let's say I have a Move script like this: script { use std::signer; use aptos_framework::aptos_account; use aptos_framework::aptos_coin; use aptos_framework::coin; fun main(src: &signer, dest: address, desired_balance: u64) { …
Daniel Porteous
  • 5,536
  • 3
  • 25
  • 44
1
vote
3 answers

Unable to create AptosAccount using Typescript (INVALID_AUTH_KEY)

I am trying to create a token collection using the Aptos Typescript SDK. const account = new AptosAccount(Uint8Array.from(Buffer.from(PRIVATE_KEY)), ACCOUNT_ADDR); await tokenClient.createCollection( account, "A test collection 1", …
1
vote
1 answer

How do I check if an account has opted in to direct transfer?

On Aptos, the primary way to send a Token is in two phases, an offer by the sender and then an accept by the recipient. However, if users opt in to allowing direct transfer, the sender can just send that recipient an NFT in a single transaction. How…
Daniel Porteous
  • 5,536
  • 3
  • 25
  • 44
1
2 3