Questions tagged [near]

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

94 questions
2
votes
1 answer

near login command failed to verify accountId. [-32700] Parse error: Failed parsing args: missing field 'account_id'

When I tried to use near CLI command near login. I got the following msg (showing in the attached picture) before I can approve access from wallet.testnet.near.org near login failed msg
czhu.eth
  • 21
  • 2
2
votes
1 answer

SyntaxError: Unexpected token ‘ in JSON at position 0

I was trying to claim the staked $Aurora rewards with NEAR-CLI by following this medium article but when I run the command: NEAR_ENV=mainnet near call aaaaaa20d9e0e2461697782ef11675f668207961.factory.bridge.near storage_deposit ‘’ --accountId…
Bailey_xii
  • 79
  • 5
2
votes
1 answer

How do i get all transactions in an account without going through all the blocks?

How do i fetch all the transactions in a specific NEAR accounts without going through all the blocks like the example here : https://docs.near.org/docs/api/naj-cookbook#recent-transaction-details I'm trying to show the transactions in react and…
Amine
  • 31
  • 4
2
votes
1 answer

Are chunk receipts reliable?

I am writing a block explorer in order to find deposits. I found out that there are two way for getting receipts. Receipts you get from chunk rpc call which have no status. Receipts you get from EXPERIMENTAL_tx_status which have status. Can I end…
Amin Talebi
  • 363
  • 1
  • 7
2
votes
2 answers

Meme Museum tutorial - 'exceed prepaid gas'

Im getting this error. It seems to happen no matter how much gas I give it. Can someone help or advise what I am doing wrong? Thanks Scheduling a call: museum.testnet.add_meme({"meme" : "andrew", "title" : "sweats", "data" :…
Matt
  • 23
  • 4
2
votes
2 answers

Function getAccountBalance() doesn't work

I am creating examples to share with another developers but i try to keep for now very simple the code, all the basic functions are working: I am using the oficial…
josedlujan
  • 5,357
  • 2
  • 27
  • 49
2
votes
2 answers

what is ContractPromise? near-sdk-as to near-sdk-rs comparison

I've found this function in an assemblyscript project for a NEAR contract: export function assert_single_promise_success(): void { const x = ContractPromise.getResults() assert(x.length == 1, "Expected exactly one promise result") …
2
votes
1 answer

error[E0277]: the trait bound `Project: Serialize` is not satisfied, note: required by a bound in `near_sdk::serde_json::to_vec`

#[derive(BorshDeserialize, BorshSerialize, Debug)] pub struct Project { pub name: String, pub description: String, pub image: String, pub owner: AccountId, pub supporters: UnorderedMap, pub balance:…
Amir Šaran
  • 406
  • 1
  • 4
  • 14
2
votes
1 answer

What's the Difference between ETH 2.0 and NEAR?

Etherium 2.0 and NEAR seem to be very similar in a lot of ways. Can someone detail out what the difference between the two?
Dorian Crutcher
  • 381
  • 2
  • 7
2
votes
2 answers

Failed to call view method of NEAR contract

Deployed simple contract #[near_bindgen] impl Contract { pub fn hello() -> String { String::from("hello") } pub fn num() -> u8 { 8 } } trying to call view method by near view crossword.hilonom.testnet num and have…
2
votes
1 answer

Moving NearProtocol Node IP

When moving a node (non validator) to a new IP: A) is it ok to use the same chain data with a new node key? B) would peers seeing the same node key on a new IP cause any issues with inbound connections to the node on a new IP? c) how/when do peers…
Gaia
  • 2,872
  • 1
  • 41
  • 59
2
votes
2 answers

NEAR FunctionCall `args` field

In the near_primitives::views, the args field on the FunctionCall is represented as a String type. From the chain data model, which is transaction::Action::FunctionCall, its args field there is a `Vec. The question is, does this args field will…
Matt
  • 10,633
  • 3
  • 46
  • 49
2
votes
2 answers

Error when running near indexer localnet, fail to generate config.json

So I'm trying to run the indexer on localnet following the official tutorial https://docs.near.org/docs/tutorials/near-indexer However when I run cargo run -- init to generate the localnet json config I get this error Finished dev [unoptimized +…
François Richard
  • 6,817
  • 10
  • 43
  • 78
1
vote
0 answers

How do you hand off and rename a custodial NEAR account to a user?

A toy example: The application NFTApp created a new account throwaway.near for a new user and minted some NFTs into it. NFTApp has the only full access key to throwaway.near. The user doesn't even know what a seed phrase is. At a later time, the…
Erik Trautman
  • 5,883
  • 2
  • 27
  • 35
1
vote
1 answer

Error while depolying contract in near ECONNREFUSED

So I'm fairly new to Near protocol. I created a near app using npx create-near-app@latest hello-near was the default name of the near app and folder so i just pressed enter. npm install -g near-cli cd hello-near npm run build:contract So,…
Gerioch
  • 13
  • 4