New answers tagged

0

You can try this: // SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.7.0 <0.9.0; contract Credentials { uint256 _numberOfProviders; mapping(address => bool) public _owners; uint256 _numberOfOwners; constructor(address[] memory owners) payable{ _owners[msg.sender] = true; _numberOfOwners = 1; for (uint ...


1

Just increase the allocated gas from 5000 to 10000 in the call inside the testCallBar function and it will work. In fact, setVal is more expensive than foo as it updates a state variable (bar).


1

There are a number of things you need to change: Your pragma statement needs a space in it between the versions. Change it to pragma solidity >=0.4.21 <0.6.0; The OpenZeppelin contracts you are importing require Solidity 0.8.0 or greater. You will need to change your pragma statement to reflect this You have a closing bracket on line 13 after the ...


0

The problem was the abi - it was incorrect, and web3 silently fails. I obtained my ABI by just doing a console.log(abi) - which is incorrect. If you are doing it this way, rather do console.log(JSON.stringify(abi)).


0

You cannot make two swaps in a single transaction without going through a smart contract. Uniswap and Sushiswap are 2 different contracts and the only way to interact with both in a single transaction is through a smart contract.


0

m_pendingIndex[_operation] . length ++ That variable is bytes32 as defined here: bytes32 [] m_pendingIndex ; As such, it is 32 bytes long and the length cannot the adjusted. You seem to be trying to increase it but that is not possible. Hope it helps.


2

There is no bug. This address holds exactly 0 liquidity token for the wOxen-USDT pair. Accordingly, Uniswap info shows 0$ as liquidity provided. How come, you may ask, since $30K+ were provided as liquidity to that pair? Well, the liquidity tokens were staked! Staking involves transferring the uniswap liquidity tokens to another address: this one, as a ...


0

This is most likely an Impermanent Loss issue. I'll try to give a brief description, but you should really read up on it - it's critical to understanding the risks of being a liquidity provider. Basically, if the price of an asset in a LP changes outside the pool (like the exchange price), then an arbitrage situation occurs. This can cause the ratio of ...


0

Hmm, I think crypto is safe but there is some bug when displaying it, try a refresh or manually check it with solidity or etherscan.


Top 50 recent answers are included