1 efe607792635c/ElrondDevelopers 2years ago I am testing in devnet... maybe that is the issue: they are not using 0.33.0 in devnet?
2 efe607792635c/ElrondDevelopers 2years ago hi everybody! I just want to store a BigUint constant that will be used in many functions of my Smart Contract. There are two ways of doing this: - define a Rust constant of type u64 named RAY and in each function where it is needed declare let ray = BigUint::from(RAY) - declare the BigUint once ... Read more
1 efe607792635c/ElrondNetwork 2years ago hi everybody! I just want to store a BigUint constant that will be used in many functions of my Smart Contract. There are two ways of doing this: - define a Rust constant of type u64 named RAY and in each function where it is needed declare let ray = BigUint::from(RAY) - declare the BigUint once (... Read more
1 efe607792635c/ElrondDevelopers 2years ago Great! Why I cannot find any contract with such logic for known tokens? Such as for RIDE or MEX?
1 efe607792635c/ElrondDevelopers 2years ago hi everybody, quick question! I am aware that we can issue fungible ESDT tokens easily via a request to the Metachain. Then, since I am the manager, I could increase the total supply by sending to the Metachain a mint transaction (I am not sure if this still works or if this is the global mint fun... Read more
1 efe607792635c/ElrondDevelopers 2years ago Hi guys, quick question. I have a function that does not modify any storage but requires making sync calls to other SCs to compute a result. If I want to call the function from erdpy, should I use erdpy contract query or erdpy contract call? Also, if I need to use contract call, how can I check t... Read more
1 efe607792635c/ElrondDevelopers 2years ago Makes total sense. Ideally that sentence should be documented. Do you know the meaning of --metadata-not-readable?
1 efe607792635c/ElrondDevelopers 2years ago Also: --metadata-payable ‼️ mark the contract as payable (default: not payable) If I mark a SC as not payable but it has [payable("*)] functions, they will still work, right? What does not payable mean then?
1 efe607792635c/ElrondDevelopers 2years ago Can a SC be upgraded by another SC? For example, can a Governance (DAO) smart contract upgrade another SC owned by the Governance SC?
2 efe607792635c/ElrondDevelopers 2years ago I see. But sometimes it is not recommended updating a smart contract as it can mess up everything. In Elrond, is it safe to do it? The common approach is to update the SC? Or the common approach is using a Proxy?
1 efe607792635c/ElrondDevelopers 2years ago Hi guys, quick question. Is there a default way to configure a Proxy smart contract that delegates calls to another smart contract with the logic? This proxy smart contract should have the storage and token balances for example, while calling functions (logic) to another smart contract that could be... Read more
2 efe607792635c/ElrondDevelopers 2years ago Hi guys! I noticed the following. I am working with 18 decimals so I sometimes need to define numbers like: managed_biguint!(1_000_000_000_000_000_000) This works as expected. However, if I use one more zero: managed_biguint!(10_000_000_000_000_000_000) it yields the incorrect number... even thoug... Read more
1 efe607792635c/ElrondDevelopers 2years ago hi guys, quick question just to be sure. the self.blockchain().get_block_timestamp() returns the same timestamp during the whole execution of a transaction, right?
1 efe607792635c/ElrondDevelopers 2years ago hi guys! I need the number of decimals given a token identifier. The method self.blockchain().get_esdt_token_data(...) is available, but it needs both the token identifier and the address of the creator. How can I get the address of the creator? I can search it at the Elrond Explorer and provide it ... Read more
1 efe607792635c/ElrondDevelopers 2years ago I believe 2. cannot be used. In that case, how can I capture the error message from B and display it in the transaction at A?
1 efe607792635c/ElrondDevelopers 2years ago hi everybody, quick question: what would happen if I call a smart contract function that internally performs a call to another smart contract function which panics? Would all the transaction be reverted if I do not handle such case with a callback?
1 efe607792635c/ElrondDevelopers 2years ago and one more question: once I get the address of a pair, is it possible to call that smart contract from my smart contract to get the price of the pair, i.e. the exchange rate?
1 efe607792635c/ElrondDevelopers 2years ago and the price must come from a reliable source, this is why it needs an oracle or something. Maybe we can get prices from Maiar Exchange?
1 efe607792635c/ElrondDevelopers 2years ago so, I should make calls from my smart contracts to one of the smart contracts you just share with me, right? will Chainlink price oracle this work in mainnet as well?
1 efe607792635c/ElrondDevelopers 2years ago @iancudorinmarian do you have any examples for a whitelistmapper? or maybe I can write something and you can help me check it is ok?
1 efe607792635c/ElrondDevelopers 2years ago hi guys I have a storage mapper given by: #[view(getMarkets)] #[storage_mapper("markets")] fn markets(&self, token_id: &TokenIdentifier) -> SingleValueMapper; and I would like to check if an element has already been defined, such that: require!( !self.markets(&token_id).is_... Read more