NEAR Protocol - a sharded, developer-friendly, proof-of-stake public blockchain
Questions tagged [near]
94 questions
1
vote
1 answer
Call nft_transfer using contract name on NEAR blockchain?
I have a question about NFT usage in NEAR blockchain. For example I have NFT on some marketplace (let's name it contract A). I add another contract (let's name it contract B) to approvals list on my Token (using NEP-178 and Approvals). Now this…

gabbi
- 108
- 9
1
vote
3 answers
NEAR dev-deploy fails with Error: Can not sign transactions no matching key pair found
Using a freshly created create-near-app I am trying to dev-deploy and getting this error:
Starting deployment. Account id: dev-1635099366550-3101206, node: https://rpc.testnet.near.org, helper: https://helper.testnet.near.org, file: out/main.wasm
An…

Ben
- 5,079
- 2
- 20
- 26
1
vote
2 answers
Filter a vector based on approximate multiple values
Suppose I want to filter vector x based on which values appear approximately in vector y:
x <- c(1.123456789, 2.123456789, 3.123456789)
y <- c(1.12345, 2.12345)
If I didn't want approximate comparison, I'd use %in%:
x %in% y
[1] FALSE FALSE…

Giora Simchoni
- 3,487
- 3
- 34
- 72
0
votes
1 answer
how do I create a funded account to use my local nearup docker container for development
I am a bit new to this whole blockchain thing. Am successfully running nearup (https://github.com/near/nearup)(the docker version).
Using NEAR's near-cli even specifying localnet still creates wallet and accounts at their testnet. Can't seem to get…

ecorrales
- 137
- 11
0
votes
0 answers
"Sorry, assemblyscript is not supported in your system, use --contract=rust " error in NEAR
I just want to use create-near-app package from the npm registry as assemblyscript and react. But it gives that error, how can i fix that ?

samet mollaoglu
- 1
- 1
0
votes
1 answer
How can I make smart contract non-upgradeable
Is there a way to make a smart contract NON-upgradeable on Near?
By default I can always overwrite a contract at an account address. This is different from Ethereum where after deployment the contract gets a new address after which it is by default…

sgraphics
- 61
- 4
0
votes
0 answers
[Stack]: RuntimeError: memory access out of bounds error while testing a function in a NEAR protocol smart contract assemblyscript
I get this error on running the test function in my NEAR protocol:
[Stack]: RuntimeError: memory access out of bounds
Here is my test function:
describe("Main Flow", () => {
it('Tests the flow of the app', () => {
setContext('hamzatest.testnet',…

Hamza Tahir
- 21
- 4
0
votes
3 answers
Regex for validating account names for NEAR protocol
I want to have accurate form field validation for NEAR protocol account addresses.
I see at https://docs.near.org/docs/concepts/account#account-id-rules that the minimum length is 2, maximum length is 64, and the string must either be a 64-character…

Ryan
- 22,332
- 31
- 176
- 357
0
votes
0 answers
MongoDb $near incongruent result on 1 meter variation of $maxDistance
I have set a 2dSphereIndex on a field named location, performing the same $near query with the smallest (1 meter) variation on $maxDistance leads to total different results:
First query:
db.collection.find(
{
"location":{
"$near":{
…

Sergio
- 89
- 1
- 6
0
votes
1 answer
Is it possible to send near tokens from smart contract to other account iof I write smart contract in near-sdk-as ?If yes , which module I should use?
While I was exploring near-sdk-as I did not find any function / APIs in sdk to send near tokens to caller of the smart contract. I am curious if there is any function to do what I have mentioned or am I missing something ?

Deepu Kr
- 23
- 4
0
votes
0 answers
AssemblyScript Smart contract panicked: Cannot parse JSON
I am trying to implement a transaction in AssemblyScript. After checking thanks project I created same things in my project which can be found in here
I can call my methods and use them without any problem. After calling donating function, I can use…

Fatih
- 15
- 3
0
votes
1 answer
Which is the equivalent of "BLOCKCHAIN_INTERFACE 3.1.0" in the near-sdk 4.0.0-pre.4?
In the near-sdk 3.1.0 we use the BLOCKCHAIN_INTERFACE to make a Dao remote-upgrade with the next method:
#[cfg(target_arch = "wasm32")]
pub fn upgrade(self) {
// assert!(env::predecessor_account_id() == self.minter_account_id);
…

José Canales
- 11
- 2
0
votes
1 answer
How to make a cross contract view calls with two or more hops?
I am trying to call a function in a contract through another contract. So there are 3 contracts, (1) one we have which wants to get price on some action, (2) Price Provider contract which checks the exchange price and returns a uint, and (3) the…

Prasad
- 31
- 6
0
votes
1 answer
Near Protocol | RPC Contract deployment | Deserialization error
I am developing smart contracts in AssemblyScript, deploying contracts via RPC (Remote Procedural Calls), that is dynamically, while coding as and when required. Below is the code that carries out this task.
log(): void…

Kaustubh Rai
- 21
- 4
0
votes
1 answer
NEAR protocol: How to ensure that function call came from multisig contract
I have 2 contracts:
first one is multisig2 from https://github.com/near/core-contracts/tree/master/multisig2 deployed on testnet at multisig.company1.mtestaccount.testnet
second one is my custom contract with a 'privileged' method issue_new_shares…

atlantis
- 817
- 1
- 10
- 16