Questions tagged [nearprotocol]

NEAR Protocol - a sharded, developer-friendly, proof-of-stake public blockchain

636 questions
23
votes
0 answers

Exceeded Prepaid Gas Common Solutions

This post will outline the most common source of the famed "Exceeded the prepaid gas." error and how you can try and debug the problem. With that being said, I'm quickly going to outline some common misconceptions about GAS as well as some things…
Benjamin Kurrek
  • 1,044
  • 3
  • 14
17
votes
6 answers

error[E0463]: can't find crate for `core` / note: the `wasm32-unknown-unknown` target may not be installed [NEAR Protocol]

I see this error in the Terminal while building a Rust application (which happens to be about NEAR Protocol, if you're curious): error[E0463]: can't find crate for core note: the "wasm32-unknown-unknown" target may not be installed How can I fix…
Dorian Crutcher
  • 381
  • 2
  • 7
12
votes
3 answers

Getting "Cannot deserialize the contract state" when calling Rust init function

I've been able to run near dev-deploy using near-shell for a Rust contract, and then call a function "new" with near call my-account new '{"param1": "foo"}' However, this does not work when I deploy the same contract to my preferred account created…
Mike Purvis
  • 251
  • 1
  • 6
11
votes
5 answers

Where do you get NEAR Protocol testnet tokens (faucet)?

Where can someone increase the number of tokens on their TestNet account on NEAR Protocol if they run out?
Erik Trautman
  • 5,883
  • 2
  • 27
  • 35
10
votes
3 answers

Could we consider non-plugins web-based crypto wallets as safe?

I know a bunch of crypto wallets which works in IFRAMEs and similar technologies right inside a web browser without needing to install any plugins: https://authereum.org https://www.portis.io https://tor.us https://fortmatic.com But are they…
k06a
  • 17,755
  • 10
  • 70
  • 110
9
votes
1 answer

How to import an account into the NEAR wallet using only the private key (no seedphrase)

In this post, I'll run through how you can import an account into the NEAR Wallet using only your private key. This is useful when you've created accounts (or sub-accounts) using the CLI or near-api-js and only have access to the private key. To…
Benjamin Kurrek
  • 1,044
  • 3
  • 14
9
votes
1 answer

Why Blocks are Missing or Skipped on NEAR

I was wondering how come some blocks exist but some don't? It seems like they get skipped and I'm unsure as to why. For example: 87868936 exists and so does 87868938 but 87868938 does not. Thanks!
Benjamin Kurrek
  • 1,044
  • 3
  • 14
9
votes
1 answer

Not All Bytes Read Common Solutions

In this post, I'll go through what causes the cryptic error message "Smart contract panicked: panicked at 'Cannot deserialize the contract state.: Custom { kind: InvalidData, error: "Not all bytes read" }". When you deploy smart contracts and store…
Benjamin Kurrek
  • 1,044
  • 3
  • 14
7
votes
2 answers

How to get the seed phrase of near sub accounts?

I am creating a subaccount using command: near create-account 123.xyz.testnet --masterAccount xyz.testnet But it only generates the public key and private key, how to get the seed phrase of the account so that I can login with near web wallet. Near…
Amiya Behera
  • 2,210
  • 19
  • 32
7
votes
3 answers

How accurate is this picture of how transactions are processed on the NEAR platform?

After reading more about how transactions are processed by NEAR I came up with this picture of how a few key parts are related. I am seeking some pointers on how to correct this. First a few key points I'm currently aware of, only some of which are…
amgando
  • 1,563
  • 8
  • 12
7
votes
1 answer

How to print the length of an array in AssemblyScript / Near?

I'm experimenting with simple assembly scripts on near and cannot seem to find a way to print the length of an array. Here's the smallest repro: let a = new Array(); logging.log(a.length.toString()); Doesn't compile with ERROR TS2339:…
Ishamael
  • 12,583
  • 4
  • 34
  • 52
6
votes
1 answer

How to verify SECP256K1 signed message in smart contract?

I have signed the message, using ed25519 const msg = Buffer.from("hi"); const signerKeyPair = await keyStore.getKey(config.networkId, signerAccount); const { signature } = signerKeyPair.sign(msg); How to verify the signature in the smart contract…
Tony Ra
  • 128
  • 5
6
votes
1 answer

How to get near balance of an account using cli?

Is it possible to get near balance of an account using near cli.?
Amiya Behera
  • 2,210
  • 19
  • 32
6
votes
2 answers

In NearProtocol, how to migrate contract state

Assume there's a contract written in near-sdk-rs, deployed, has state defined as: #[near_bindgen] #[derive(BorshDeserialize, BorshSerialize)] pub struct NFT { pub tokens: UnorderedMap, } #[derive(BorshDeserialize,…
Bo Yao
  • 136
  • 4
6
votes
1 answer

How to query history of the balances

For various use cases it's valuable to display historical data of the balance on some account. What is the best way to query this data from NEAR protocol?
ilblackdragon
  • 1,834
  • 12
  • 12
1
2 3
42 43