NEAR Protocol - a sharded, developer-friendly, proof-of-stake public blockchain
Questions tagged [near]
94 questions
1
vote
1 answer
"SyntaxError: Unexpected end of input" raised in near-vm folder during near-sdk-as yarn installment
When I tried to install near-sdk-as on my laptop (Intel-based macOS 10.13) with the command:
yarn add -D near-sdk-as
I got the following error:
❯ yarn add -D near-sdk-as
yarn add v1.22.17
info No lockfile found.
[1/4] Resolving…

PaulYoung
- 11
- 2
1
vote
1 answer
Method not found when update contract in NEAR
I have seen strange behavior when updating contracts in near(using rust)
I usually launch 1 first contract as templates, following the usual commands:
$ cargo new rust-myproject
cargo test -- --nocapture
cargo build --target wasm32-unknown-unknown…

josedlujan
- 5,357
- 2
- 27
- 49
1
vote
1 answer
Make a call function with RPC endpoints or other method
I start developing my own NEAR client because I thought that could be a nice personal project. The problem is with call function, because the near doc only mention view function in the page about rpc endpoints. I dont know if there is some special…

Sebasgr
- 71
- 3
1
vote
1 answer
I am getting error - Element type must be nullable if array is holey while running the contract
{
"error": "wasm execution failed with error: FunctionCallError(HostError(GuestPanic { panic_msg: "Element type must be nullable if array is holey, filename: \"~lib/array.ts\" line: 103 col: 40" }))",
"logs": [],
"block_height":…

Deepu Kr
- 23
- 4
1
vote
2 answers
NEAR Indexer and 2FA secured wallet transactions
In the Near, transactions signed by a 2FA-protected wallet are done in a special way (contract confirmation) and are not like regular transactions.
Signer and receiver id the same wallet.
Sample…

Koles
- 13
- 2
1
vote
1 answer
Is it possible to iterate over persistantMaps by near-sdk-as like in other programming languages?
I am storing key value using PersistentMap of near-sdk-as and Now I want to iterate over all the keys and values, is it possible ?
PS: The PersistentMap interface given in near-docs contains only get , set and other basic methods.

Deepu Kr
- 23
- 4
1
vote
1 answer
How do you send or transfer an NFT to another account on NEAR protocol?
The goal is to send another user's account the NFT from an account I control. The NFT follows the standard, but it appears that wallets do not support this feature in their UIs now so we have to execute a shell command to effect the transfer. How…

Erik Trautman
- 5,883
- 2
- 27
- 35
1
vote
0 answers
Cannot use u128 to represent money/price in smart contract model
import { context, u128, storage, logging, PersistentUnorderedMap } from "near-sdk-as";
@nearBindgen
export class MyItem{
id: u64;
type: u32;
price: u128; // This is causing the deserialization error
}
When including this fragment of code in…

sgraphics
- 61
- 4
1
vote
1 answer
Icons in near wallet
Does anyone know where in the documentation you can see what each of the icons that appear in the transactions of the near wallet and the testnet wallet mean? I attach an image.

josedlujan
- 5,357
- 2
- 27
- 49
1
vote
2 answers
Issues adding NEAR tokens in assemblyscript smart contract using u128.add() function
I have been facing issues with the use of u128.add(a, b) function. The two u128 values do not get added and I am afraid I am doing something wrong. I have checked LEARN-NEAR github page for sample projects and even changed my code to follow the…

Aishat Akinyemi
- 21
- 3
1
vote
0 answers
near-api-js getAccountBalance()?
Hello im try get account balance after signin always send the same error
if (window.walletConnection.getAccountId()) {
window.account = await near.account(walletConnection.getAccountId());
window.account.getAccountBalance().then(balance=>{
…

Josue Hernandez
- 36
- 5
1
vote
1 answer
Recover seed-phrase from private key
I've created an account using near-cli / near-sdk, thus got private keys in ~/.near-credentials.
In order to use the new account in wallet.near.org I need the seed-phrase. How I can "convert" a private key to a seed-phrase?

Ilia Belov
- 19
- 1
- 2
1
vote
2 answers
Object reinitializes each time I call a function in my NEAR Smart Contract
I have a class in an external file and I import it.
The class is instantiated into 3 objects just below the imports.
I run function call initial where I call methods to change the property of mystudent0 to absent. Then all the properties are…
1
vote
1 answer
Cannot pass parameter with near call
I'm testing the Greeting contract in "workshop--exploring-assemblyscript-contracts" and try to pass parameter to saveMyMessage function but always get error. There maybe problem with quotations marks, I tried with " or '` but nothing succeeds. I'm…

Thao Le
- 11
- 2
1
vote
1 answer
Distance matrix between ALL features in ArcGIS
I have 20 000 polygons in a dataset. I need to have the Euclidean Distance between all polygons, so a 20 000 x 20 000 distance matrix where for each of the polygons, the distance to all other polygons is stored.
I have read in some other threads the…

bram
- 47
- 6