Questions tagged [near]

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

94 questions
0
votes
1 answer

Access value of account ID after passing it as parameter to Promise::new()

The following code generates an error: let account_id = env::signer_account_id(); let amount = 10 * 1_000_000_000_000_000_000_000_000; Promise::new(account_id).transfer(amount); env::log(format!("Sent {} NEAR to {}", amount,…
atlantis
  • 817
  • 1
  • 10
  • 16
0
votes
1 answer

Calling a second contract from within a NEAR contract (rust)

On NEARprotocol, I want to call another contract from within a contract (Rust). I tried env::Promise but could not retrieve the call answer. What is the right approach here? Also, the near-sdk crate docs give the example &"bob_near".to_string(), is…
3lLobo
  • 1
  • 1
0
votes
1 answer

Understanding fee payments and assets flow

Consider the following example transaction 24AVRBgWnEWQK1yPnfgfzkSugsWbLNxhnHeDQr9tG7Mf. Receipt Ef93JLMy6aeAKDQA4p74dLxEQEPPJpLjfwPz6bJE3tBy burned 21027712500000000000 tokens as a fee. As one could see, this receipt is a sub-receipt of…
Adam R
  • 61
  • 5
0
votes
0 answers

Using near-api-js in React Native

has anyone had luck using the near-api-js on react native / expo? I'm trying to import the library & I'm running into the following error: Failed building JavaScript bundle. Unable to resolve module ../../App from…
zorrooo
  • 65
  • 7
0
votes
1 answer

Import WASM file into react app to deploy it on the NEAR Blockchain

I am working on a front end of an app what interacts with the NEAR protocol. The workflow I am creating is: User signs in Creates sub account Deploys a smart contract to the sub account. Parts 1 and 2 are working fine. for part 3 I have the…
Joby Ingram-Dodd
  • 730
  • 5
  • 23
0
votes
1 answer

Can't connect near-cli with near in local mode

I ran indexer in local mode as a docker container and also had a container with near-cli. sudo docker run -it --name indexer --rm -v indexer_data:/near indexer run sudo docker run --name near-cli --rm -it --volumes-from indexer:ro near-cli…
ChzChz
  • 57
  • 3
0
votes
1 answer

Write an NFT Contract & mint your NFT [Figment.io Learning]

Working through the learning document on figment.io and am wondering what I'm missing. My thought is that the doc here is in need of some updating, but I could be wrong. First, The GitHub repo that we download in this lesson does not have the path…
0
votes
1 answer

Migrating critical info to the blockchain

We have a website with a traditional database (mongodb), which is the user voting system. Each user can create many votes and we want to migrate that votes to be stored in the blockchain in a secure way, so they can't be changed or deleted once…
0
votes
1 answer

NEAR PROTOCOL FunctionCallError(HostError(GasLimitExceeded)) Error when I recover more than 150 tokens

I'm developing a pagination method, but when the number of tokens pass over the 150, return this error: FunctionCallError(HostError(GasLimitExceeded)) The command that I used: near view nativodeploy.testnet get_ids_onsale '{"tokens":30}' --accountId…
0
votes
0 answers

Github actions: I want to cache a repo after running the make command

I want to reduce the testing time in github actions when I push changes to the github repository. I need to run the sandbox in nearcore but for that I need to run the make command which takes more than 10 minutes. To reduce time, I tried to cache…
0
votes
2 answers

calculate and Verify Block Hash from Light Client Block in Near Protocol

I tried the steps mentioned in the link to verify the hash of a block. But it turned out the hash generated from the steps is not the same as the hash of the block. And also generated hash is of a different block. Is there any way to calculate and…
0
votes
1 answer

How to request full access when sign in using near-js

I've got a problem with signing in using near-js. I just call wallet.requestSignIn and it works but always I see that application request Limited access. There is nothing about Limited and Full access in documentation so I just guess that I should…
0
votes
1 answer

ReactJS not call method from Smart Contract (NEAR) on product (testnet does not exist while viewing)

I deployed successfully my first app (AssemblyScript + Reactjs), but when i test on github-pages, i got this error. errors.js:18 Uncaught (in promise) Error: [-32000] Server error: account xxx.testnet does not exist while viewing at…
0
votes
1 answer

(NEAR protocol) How to get the Validator Node up

I am trying to run a validator node using the https://docs.near.org/docs/develop/node/validator/deploy-on-mainnet instruction. I have successfully deployed mainnet Staking Pool with the following command (2nd step of the instruction): near call…
Aleksandr
  • 36
  • 5
0
votes
1 answer

NEAR, How to implement withdraw (assembly script)

Transfer money to a smart-contract first. How to withdraw money from smart-contract to a sender ? "near-sdk-as": "^3.2.1"