Questions tagged [multiversx]
The multiversx tag has no usage guidance.
99
questions
0
votes
1
answer
42
views
xExchange API: the price of a LP token is 0
I'm querying the xExchange's GraphQL API, but when I'm requesting the price of an LP token the field price is 0 (but it shouldn't). Does anyone know how to fetch the price of an LP token through this ...
0
votes
0
answers
15
views
Consensus Mechanism Comparison
Hypothetically, if you had to create a way to objectively review, rate and compare consensus algorithms, what properties would you look at? What properties would you evaluate? Would you give the ...
0
votes
2
answers
44
views
Herotag script and how can a script can go over herotags and resolves them automatically to addresses
Does anyone have a script that goes over herotags and resolves them automatically to addresses?
I don't want to manually enter a herotag to elrondscan.com everytime to get the address - and the ...
1
vote
1
answer
68
views
Using the MultiversX SDK for JavaScript (TypeScript), how to sign (and verify) an arbitrary message?
How to sign an arbitrary message (arbitrary sequence of bytes) using the MultiversX SDK for JavaScript / TypeScript?
Then, how to verify the signature?
1
vote
1
answer
120
views
MultiversX bulding smart contract with mxpy error [E0554]
a bit new in MultiversX building.
Using WSL2 on Windows, and rustc version is:
:~/multiversx/smart_contracts/crowdfunding$ rustc -V rustc 1.70.0 (90c541806 2023-05-31)
All this tools are new for me. ...
2
votes
0
answers
65
views
How to implement USDT to EGLD token exchange in Rust on MultiversX blockchain?
I am trying to fetch price of USDT in EGLD. I am using this: https://github.com/multiversx/mx-exchange-sc/blob/main/dex/pair/src/lib.rs#L604 endpoint to fetch the price. But not sure that it is right ...
-5
votes
1
answer
67
views
What is the most applicable way to set ESDT price?
I am making a dapp on MultiversX blockchain. It has a function where user can buy my ESDT by paying with EGLD.
#[endpoint]
#[payable("EGLD")]
fn purchase(&self, amount: BigUint){
...
1
vote
0
answers
66
views
Transaction hash is not showing in devent-explorer
I am creating a fungible ESDT token. This is my code:
// import {TokenOperationsFactory} from "@multiversx/sdk-core";
const {
TokenOperationsFactory,
TokenOperationsFactoryConfig
} = ...
1
vote
0
answers
77
views
How to create an ESDT token
I try to create a fungible ESDT token. I am very new in MultiversX, so my understanding on creating token is: we will have to use TokenOperationsFactory class from this script.
First we have to use ...
0
votes
1
answer
98
views
How do I limit the max supply of a MultiversX NFT collection?
I'm currently working with the MultiversX blockchain, and I've successfully registered a new NFT collection & created an NFT following the documentation example here.
However, I need to limit the ...
1
vote
1
answer
130
views
Elrond Smart Contract call via JavaScript SDK returns a user error
I am trying to call a function from a Elrond Smart Contract to create a NFT, I am using their JavaScript SDK.
This is the error I get:
TransactionCompletionStrategy.isCompleted(), found event: ...
0
votes
1
answer
43
views
Getting 500 error in MultiversX/Elrond official API
I am wondering why this endpoint sometime returns a 500 error and sometime no ?
https://devnet-api.elrond.com/accounts/erd1rvl2daxdch2xgwd7n6sewjnxg7zu57y0yv82qg6794d4f4qtvqhsxnqfmj/nfts?size=1000&...
0
votes
1
answer
64
views
MultiversX: Access to read function of a smart contract [closed]
I search a way to find and interact with the view functions of a smart contract on MultiversX blockchain.
I have many questions:
How to reverse a wasm smart contract file ?
How to get the abi.json of ...
0
votes
1
answer
19
views
How to check if a BiDiMapper contains an id or value in an optimized way?
I am iterating on all the elements so that I have a complexity O(n).
fn has_item(&self, item: &Item<Self::Api>) -> bool {
return self.map_items_tokens().iter().any(|i| &i.0 == ...
0
votes
1
answer
33
views
Problem fetching Smart Contract Results after issuance of SFT/NFT
As mentioned in the documentation (https://docs.elrond.com/tokens/nft-tokens/#example-flow) we must be allowed to fetch to Token Identifier but the API (endpoint https://gateway.elrond.com/transaction/...
1
vote
2
answers
174
views
invalid token index when issuing token
After deploy a NFT smart contract on Elrond Blockchain, I'm trying to issueToken using snippets:
erdpy --verbose contract call ${ADDRESS} --recall-nonce --pem=${ALICE} --gas-limit=${GAS_LIMIT} \
...
1
vote
1
answer
115
views
Can't get smart contract address and can't run issueToken function
I'm following this MultiversX NFTs smart contracts (from scratch part 2) tutorial: https://www.youtube.com/watch?v=jpJQ-YB4NnQ
I successfully compile the smart contract but when I use . interaction/...
0
votes
1
answer
257
views
transaction generation failed: invalid chain ID (ERDPY)
I'm trying to send a bulk transaction on the elrond devnet but i still have an error :
I'm following this doc -> Click here to see it
The script is working but he give me a log talking about an ...
0
votes
1
answer
94
views
Why does a MultiversX rust contract require a main.rs, and why a certain function call in it?
New to MultiversX contracts.
I am trying to figure what is the absolute minimum to get a MultiversX rust contract to successfully build when doing mxpy contract build.
To me, the contract would only ...
1
vote
2
answers
73
views
Get operations from transaction with smart-contract for swap
What I am trying to achieve?
There is a smart-contract for swap between WEGLD and USDC. Address: erd1qqqqqqqqqqqqqpgqeel2kumf0r8ffyhth7pqdujjat9nx0862jpsg2pqaq
To find out the real amount of WEGLD and ...
1
vote
1
answer
108
views
How to get the current earnings of the farms via MultiversX REST API?
How I could obtain the current earnings of a farm from xExchange via MultiversX REST API? For example, for the LKMEX farm I want to determine the current earnings (My Earned MEX) in MEX and/or USDT ...
2
votes
2
answers
135
views
Converting from decimal to hexadecimal for MultiversX blockchain
I am trying to do some smart contract testing for MultiversX blockchain with multiple wallets and different token amounts.
The MultiversX blockchain requires some hexadecimal encodings for the Smart ...
0
votes
1
answer
82
views
How do I use local MultiversX docker container node for local smart-contract development?
I am new to MultiversX. I (think) successfully have local node running in docker?
Both of these yield same log output in portainer:
sudo docker run -d \
--name my-elrond-testnet \
-v ${...
3
votes
0
answers
49
views
MultiversX workspace not setting up on VS code in mac
I am trying to set up the MultiversX VS Code extension in my mac.
After installing the extension from the extensions tab, as instructed to set up a Elrond project I entered cmd+shift+p and click on ...
0
votes
1
answer
42
views
View with MultiValueEncoded returns only one element
My view should return multiple elements, but I always got only one.
I am calling my view with /vm-values/query.
Should I use another gateway endpoint for the MultiValueEncoded view?
0
votes
1
answer
213
views
Elrond Verify Signature on Backend PHP
I have a dApp where you login with your Elrond wallet and you generate a signature (containing the wallet address and some more data).
While making requests to an endpoint, I pass the signature on ...
0
votes
1
answer
227
views
linking with `cc` failed: exit status: 1
I am writing integrations tests with the MultiversX Rust testing framework.
So, I am running cargo test. But it throws this error:
note: /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-...
-2
votes
1
answer
76
views
Cannot set name of NFT in Elrond Rust testing framework
I am writing tests for my smart contract using elrond-wasm 0.32.0.
My issue is that my smart contract returns the identifier of the ESDT token when I am getting the name.
Detailed steps
I am setting ...
0
votes
1
answer
152
views
MultiversX Dapp tutorial - Sender not allowed
I was following this tutorial: https://docs.elrond.com/developers/tutorials/your-first-dapp/
With the help of: https://www.youtube.com/watch?v=IdkgvlK3rb8
But I think there is some difference between ...
0
votes
1
answer
102
views
MultiversX integration into unity
I can't find anything on the official repo of MultiversX about a unity SDK. Does someone already implemented xPortal login in a unity project ?
0
votes
1
answer
138
views
Error while building with erdpy for crowdfunding
I'm doing like the tuto in elrond doc here I'm currently getting this error when I try to build:
Compiling elrond-wasm-derive v0.25.0
error[E0554]: `#![feature]` may not be used on the stable release ...
2
votes
1
answer
382
views
Post request is successful on reqbin but not in Python script
I am making a post request and it has been done successfully on reqbin but when I use the code in my script, even if I copy and paste exactly, it doesn't work. I'm getting a 500 status on these and if ...
1
vote
1
answer
69
views
Field "version" of a transaction in MultiversX
When you see the fields used in a transaction in the MultiversX blockchain, there is one called "version" and it's usually set to "1":
POST https://gateway.multiversx.com/...
1
vote
1
answer
77
views
Triggering a function when a MultiversX's transaction has status "success"
I don't find a way to trigger a function automatically when a MultiversX's transaction has status "success".
I wait some amount of time until the transaction ends (or I query the contract ...
0
votes
1
answer
68
views
Measure time of execution of a MultiversX 's transaction
I'm sending transactions using Python 3 and mxpy. When the transaction ends with status "success", I have in the transaction's data a timestamp that I think it is the time the transactions ...
0
votes
1
answer
83
views
How to view the exported functions of a smart contract in MultiversX
Is there any way to see the exported functions of a smart contract deployed by somebody else given the address of the contract?
I tried in explorer and all I was able to see was the compiled code.
1
vote
1
answer
307
views
Getting list with the MultiversX's ESDT tokens (and balances) from an address (a wallet)
I want to get a list with the MultiversX's ESDT tokens (and balances) from an address (a wallet). I don't have any example, I tried things such as:
const { address, account } = useGetAccountInfo();
...
1
vote
0
answers
161
views
Login via hooks
I'm currently developing an application where holders can see historical data of their NFT's. All code is in place, but I'm still looking for a way to securely verify their ownership of a certain NFT.
...
0
votes
1
answer
68
views
Change dapp gateway
How can I change the MultiversX dapp gateway? I want to use tatum.io in exchange of gateway.multiversx.com but with the MultiversX dapp template https://github.com/multiversx/mx-template-dapp I don't ...
0
votes
1
answer
114
views
issue_and_set_all_roles responds with "token name is not human readable"
I have a smart contract function that internally calls issue_and_set_all_roles to issue an SFT and set all the roles, but it responds with "token name is not human readable" no matter the ...
1
vote
1
answer
375
views
How can I verify a signed message(not transaction) from a dApp (elrond)?
I am trying to create backend authorization for the maiar wallet user on the backend. I am creating server-side authentication using python, but am unable to figure out to verify signed messages on ...
0
votes
1
answer
67
views
How to top encode without allocating
I am trying to read the content of the input from a TopDecode, but erdpy contract report reports has-allocator equals true.
Below is my current snippet.
impl<M: ManagedTypeApi> TopDecode for ...
3
votes
1
answer
170
views
Elrond mandos test elrond_wasm_debug::mandos_rs pass however erdpy contract test fail
I'm writing test cases for my NFT smart contract (SC). When I check the state of the SC after creating my NFT I'm expecting to see a variable (next_index_to_mint:u64, that's I increase by 1 every new ...
2
votes
1
answer
220
views
Handle JSON attributes in rust Smart Contract
I am trying to decode attributes encoded in JSON in an MultiversX rust smart contract.
I am parsing it with the serde crate. My contract compiles well but when I deploy it, I got an invalid contract ...
2
votes
1
answer
63
views
print!() is failing in execute_query whereas it works out of it
I am doing some rust tests in the elrond blockchain.
When I print a token identifier outside of execute_query, my token is well printed. Whereas, it throws an error when I try to print it in the ...
0
votes
1
answer
277
views
Creating a new ManagedBuffer in Rust tests panics "called Option::unwrap() on a None"
I'm trying to create a new ManagedBuffer in a rust test, but the tests panic. I've tried using both, the ManagedBuffer::new_from_bytes function and the managed_buffer! macro, but both of them result ...
0
votes
1
answer
275
views
Difference between the testnet and the devnet when it comes to response in NFT data
I found the difference between devnet and testnet. The NFTs minted using the same SC and endpoint:
devnet: https://devnet-explorer.multiversx.com/nfts/FFFF-364539-03
testnet: https://testnet-explorer....
1
vote
1
answer
109
views
VecMapper `extend_from_slice` - differences between testnet and devnet
I found some differences between the testnet and the devnet on how the extend_from_slice on VecMapper works. It works ok on the devnet, but the same endpoint/function in the same SC breaks on the ...
1
vote
1
answer
105
views
Do smart contract needs a SFT to call esdt_local_mint
My smart contract owns the SFT HAT-a1a1a1-01.
The SFT HAT-a1a1a1-02 also exists but isn't owned by the SC.
When I add local quantity to the SFT with the 02 nonce through a function, my transaction ...
2
votes
2
answers
482
views
How to track transaction status on MultiversX network?
Can someone help with tracking the transaction status of a value transfer on the MultiversX network?
const testTransaction = new Transaction({
value: Balance.egld(1),
data: new ...