Questions tagged [nearprotocol]
NEAR Protocol - a sharded, developer-friendly, proof-of-stake public blockchain
635
questions
0
votes
0
answers
25
views
cross contract call to ref finance on near protocol
I'm currently building a smart contract that tries swap tokens on ref finance dex but did not find a trait implementing the ref finance dex interface.
I attempted using "transfer_call" ...
1
vote
0
answers
21
views
How can i view all the state for NEAR blockchain and respectively for arbitrary smart contract and prove some value takes part in calculation root
I want to prove that some value that is stored in smart contract on Near is takes part of calcualtion in whole blockchain state root.
I have found the view-state function that odes the job of the ...
0
votes
0
answers
25
views
Get block hash from a receipt id in Near blockchain localnet
On sending the function call txn using near-api-js, I only receive receipt id (as shown in the logs) and from the docs , it looks like I cannot get the block hash just from receipt id.
How can I get ...
0
votes
0
answers
13
views
Unable to execute integration tests
Getting this error when trying to execute GuestBook tutorial project locally. When executed thru GitPod everything works fine, tho.
Rejected promise returned by test. Reason:
Error (TypedError) {
...
1
vote
1
answer
35
views
Pagoda relayer implementation throwing 422 server error
I am trying to run a simple example on the Pagoda relayer on NEAR Protocol, here is the relayer repo I cloned and I am running locally - https://github.com/near/pagoda-relayer-rs
This is my JS script ...
-3
votes
1
answer
28
views
Now i found the problem and i dont know to correct 'Incorrect syntax near '('.'
Else
conn2.Open()
Dim cmd3 As New SqlCommand("update Pr_masterItem
(item_id, item_name, inventory, subtitutes_exist, assembly_bom, satuan, cost_is_adjusted, ...
0
votes
1
answer
58
views
how can i retrieve the number of validators on NEAR blockchain using SQL query?
As you know the NEAR blockchain is based on Proof of stake protocol.the number of validators can be based on validators 'staking' or even 'not staking'. i'm new to this and i don't know which ...
3
votes
2
answers
113
views
How to get NEAR WALLET accountId from private or public key?
Im trying to get the NEAR WALLET AccountID.
I have the next vode to get only the public key but i want also to get the account ID from privatekey or from public key.
const nearApi = require('near-api-...
1
vote
1
answer
34
views
Does not get to get the balance amount for the near wallet
I want to get some sums of my wallet balance using 'near-api-py' lib on 'Account' tab of wallet profile(https://wallet.near.org/profile):
Wallet balance(NEAR, USD) - near_provider.get_account(...
2
votes
1
answer
82
views
Smart contract panicked: cannot read property 'prefix' of undefined\n
I am trying to interact with a smart contract method and getting the error -
ExecutionError: "Smart contract panicked: cannot read property 'prefix' of undefined\n" +
' at ...
1
vote
0
answers
27
views
How to fix 'TxExecutionError' for partial unstake of near coins
I am trying using the 'near-api-py' library of the function_call method of the Account class, to unstake my near coins from the staking:
from near_api.providers import JsonProvider
from near_api....
2
votes
1
answer
29
views
How to fix ActionNoPermission
I'm trying to use the near-api-py library to lock the currency on allnodes.com
def sign_and_send_tx():
_signer = Signer(my_wallet_id, key_pair)
_account = Account(account_id=my_wallet_id, ...
0
votes
1
answer
46
views
How does NEAR asynchronous actually works?
Based on the documentations, articles and ... here what i understand of NEAR asynchronous. Please correct me if i am wrong:
Due to NEAR asynchronous design and Nightshade algorithm. Transactions (or ...
2
votes
1
answer
37
views
How to get the proper deposit and stake value from Near transactions
I encountered few transactions in which the deposit and stake value is 0 but the logs in the receipts outcome contains the value like in the below curls and their outputs. And also the logs vary in ...
0
votes
3
answers
54
views
Calculating the Balance for Near Address 35b2e85e2e7add13abcd8ae62998cbfad9bad5bf.lockup.near
I tried calculating the balance for address 35b2e85e2e7add13abcd8ae62998cbfad9bad5bf.lockup.near.
As shown in the explorers the balance for the above address is 3.50036 Ⓝ. But when I see the ...
1
vote
1
answer
25
views
"gas_burnt" and "tokens_burnt" values in the refund receipt are not zero and are not the same
Based on documentation, the gas_burnt and tokens_burnt in the refund receipt is zero:
{
"block_hash": "Gm6TFS1ZxmA45itVj8a7vE8yJF8V5hXeNF1EhEVr7GVS",
"id": &...
0
votes
1
answer
80
views
How to verify ed25519 signature in NEAR Smart contract?
As we know that near_sdk provides ecrecover method to verify ECDSA signature in near smart contract.
Is there any way to verify ed25519 signature in smart contract ?
I have used ed25519-dalek crate ...
0
votes
2
answers
65
views
How named accounts works in NEAR
It appears that named accounts in NEAR are being managed by the near and register smart contracts. However, this raises the question of whether NEAR natively supports named accounts. it's unclear if ...
2
votes
2
answers
38
views
Register and Near smart contracts
In NEAR, there are two smart contracts created in genesis: near and register smart contracts. These contracts handle account IDs, but I can't seem to locate their source code. Could someone please ...
1
vote
0
answers
58
views
How FastAuth save the private keys
I use FastAuth to create a new NEAR account. Then I find that when created, two full access keys are added, when recover, one new full access key is added
when I first create account via FastAuth, ...
1
vote
1
answer
33
views
Missing blocks in Near Mainnet [duplicate]
I see there are few blocks missing in Near when I try to query through the archival node. Even I am unable to find them in the explorer as well. Is there any particular reason that the blocks are ...
2
votes
1
answer
17
views
How can I query FTs with a specified account name using RPC call on NEAR protocol?
Could anyone can help me slove this proble
m. I want to quey FTs with specify account_name. I find the doc「https://docs.near.org/zh-CN/tutorials/fts/simple-fts%E3%80%8D, and query by rpc call, from ...
2
votes
1
answer
23
views
How to get the Balance transferred by System to Near Address
When tried to get the balance for one of Address of Near could see that there is some balance transferred from System to the address but could get this data from the mainnet node also in the ...
2
votes
1
answer
32
views
Get block height of transaction create account with account id NEAR Protocol
I already deploy a contract in Near protocol for a long time. Now we need to get the block height, when the first time contract deployed.
Is there any api can get that information with the account id?
...
-1
votes
1
answer
90
views
How can I know which functions call a certain TypeScript function, I cannot find an instance where it is called
I have a TypeScript function called signMessage which is called when I send a transaction (a smart contract call).
https://github.com/fireblocks/fireblocks_matic_near_staking_sdk/blob/main/src/NEAR/...
1
vote
1
answer
69
views
Near Lake Framework Raw Data Processing
I am considering using the Near Lake framework to extract raw data, such as blocks, transactions, and receipts. I'm curious if any data cleaning or transformation occurs on the raw data before it gets ...
-1
votes
1
answer
59
views
How to store API keys in dApp NEAR
For example, my application uses IPFS, access to which I get through web3.storage. But for the web3.storage to work, you need an API token, for which I paid.
Where to store this token if everything is ...
-2
votes
1
answer
144
views
how to use U256 in near smart contract in rust language
I am trying to use U256 in rust smart contract for near protocol with a library called ethnum. But it always give errors like:
the trait `JsonSchema` is not implemented for `U256`
│ |
│ = ...
2
votes
1
answer
29
views
Near address checksum
is there a way to check if address is a valid near address? Currently I've implemented the rules from their docs (https://docs.near.org/concepts/basics/accounts/account-id)
Is there a checksum check I ...
1
vote
0
answers
53
views
How to verify the list of Block Producers and Validators of Nth epoch in Near
https://github.com/near/nearcore/blob/master/docs/architecture/how/epoch.md#how-do-we-pick-the-next-validators
How do we pick the next validators?
in the last block of the epoch T, we look at the ...
0
votes
0
answers
50
views
How to setup NEAR blockchain project in vs code
Now I want to create a project in NEAR blockchain using javascript. I'm following with this code
npm init
npm install
npm install npx
npx create-near-app@latest
when I'm executing last "npx ...
0
votes
0
answers
43
views
Not able to run a NEAR RPC node
I'm trying to run a NEAR RPC node following this documentation https://near-nodes.io/rpc/run-rpc-node-without-nearup on testnet.
But at step 6, Run the node, the process is killed.
$ ./target/release/...
2
votes
3
answers
55
views
NEAR-sdk #[near_bindgen] colliding with other macros
I've put together a minimum working example, and you can see it here: https://github.com/synthesis-labs/near-mwe. In summary: I have a simple macro that checks that the owner (an arbitrary definition ...
1
vote
1
answer
56
views
how do I verify NEAR login was successful?
Once user logs in with their NEAR account from app, I want to save the wallet address to their account document.
The successurl is one of my API endpoint. It gets populated with account_id and ...
1
vote
1
answer
56
views
How to get list of validators which delegator delegated in Near protocol
I want to get list of validators which delegator delegated in Near protocol.
I can get delegations list for validator.
How can I get validators list from delegator in Near?
0
votes
1
answer
21
views
Incorrect work documentation example. Near protocol
I created a smart contract on a testnet and everything worked great. But when I uploaded the hosting build I ran into an error.
Uncaught (in promise) Error: [-32700] Parse error: Failed parsing args: ...
0
votes
1
answer
32
views
launch-local-near-cluster.sh script launch problem
I'm trying to configure local.test network and I'm getting error with after this ~/launch-local-near-cluster.sh. In attached you will see more details about this error. Link where I'm following ...
0
votes
0
answers
17
views
Near Staking details for an account
How can I get all the staking details for the address. As I am not getting them from the near archival node. Also they are not available in the transaction details of the address as well. I need the ...
0
votes
1
answer
40
views
How to transfer non-native token on NEAR blockchain
I'm struggling to transfer token with tokenAddress "meta-token.near" from wallet A to wallet B. I can't provide you with one of my solutions, cause the all don't work. Any help is ...
0
votes
1
answer
19
views
Is there anyway to see all the functions provided by a contract that has been deployed on Near protocol?
I am trying to use make function calls against a deployed contract on Near. Documentation is non-existent as is so often the case.
Is there anyway to see all the functions provided by a contract that ...
1
vote
1
answer
122
views
Handling exception for invalid json format for `assemblyscript-json` in `JSON.parse`
The following works:
let jsonObj: JSON.Obj = <JSON.Obj>(JSON.parse('{"hello": "world", "value": 24}'));
but if jsonString has an invalid json format, it breaks my ...
1
vote
2
answers
43
views
What is the maximum account name length in NEAR blockchain?
I'm using account name as a key in various places, and would like to know them maximum account name length to compute storage cost bound.
1
vote
1
answer
23
views
UnorderedMap returns Out of Bounds error when inserting in NEAR
I'm currently having an issue with inserting a key-value pair in NEAR Protocol for Unorderedmap.
Here's my pseudocode:
let mut new_list: UnorderedMap<String, Struct> = UnorderedMap::new(b"m&...
1
vote
0
answers
39
views
block timestamp in near-workspace.js
Please help me. I am testing near smart contracts using near-workspace.js and ava. I could not find how to get last block timestamp or current block timestamp. And how to move time in near-sandbox. I ...
0
votes
1
answer
51
views
Calculating the balance for near address 77yen.near
When I try calculating the balance for one of the address of Near 77yen.near that does not match to the balance shown in the explorer. Can anyone please help me out here where I am missing the amount ...
1
vote
1
answer
70
views
Javascript functioncall on Near Protocol
I want to do a functioncall on Nearprotocol with javascript, but there is always this error:
Account.viewFunction(contractId, methodName, args, options) deprecated use Account.viewFunction(...
0
votes
0
answers
36
views
ERC721 on near deploy using rust (ink!), i'm stuck in callinf the function and pass the argument
After the deploy on near and when i was try to live test for mint function the error occurs.
reference code:- docs.rs/erc721/latest/src/erc721/lib.rs.html#1-644 [link on cmt.]
when I was putting the ...
0
votes
0
answers
48
views
Java Near Protocol API
I want to call a function on my Smart Contract to retrieve Data from the Blockchain. I use the https://github.com/syntifi/near-java-api.
There are 3 different Methods on how I can call a function:
By ...
0
votes
0
answers
30
views
How can you go from a local keypair to a seed phrase that allows an account to be imported into a NEAR wallet?
An account is created locally using near-cli toolkit, which creates a local keypair. How can you import this account such that it is usable via a wallet on NEAR, for example by using a seed phrase ...
1
vote
1
answer
28
views
Test which public keys were generated by a specific private key
Let's say I've used near keys foo.near to identify all the keys for a given account and I want to understand which of those public keys were generated by a particular private key. How would I do that ...