Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Solidity is a contract-oriented, high-level language whose syntax is similar to that of JavaScript and it is designed for writing smart contracts in Ethereum to run on the EVM. Solidity is statically typed, supports inheritance, libraries and complex user-defined types among other features.
2
votes
How can I perform float type division in solidity?
Solidity does not support floating point values there are many reasons but the most important is that solidity deals with real money and as we all know while division we lose some minor point values when … we convert the value back to an integer due to that solidity does not support it. …
0
votes
Solidity code testing
All the unit tests we perform on the local blockchain, like if you are using hardhat then on hardhat node (also Ganache is an option), and see the test coverage report (test 100%).
After that, we perf …
0
votes
To check transferred ethers with variable value
1 ether is equivalent to 1e18(Wei) in solidity so you can check like this:
require(msg.value > 1 * 1e18, "Please contribute at least 1 ETH."); …
1
vote
Forge-std/Test.sol imported and working but VSCode marks an error
Actually, forge-std Test.sol or Script.sol files are placed inside lib/forge-std/src and foundry by default remap it like this forge-std/=lib/forge-std/src/. This configuration is understandable by fo …
0
votes
Accepted
Pls how do I create a nested array in solidity
Follow NESTED_ARRAYS_NOT_IMPLEMENTED, you will valuable information.
1
vote
Question about whitelist with mapping(solidity)
You cannot initialize like this at the state level, but you can perform the same functionality inside the constructor.
And please make sure to post your code, not upload the images.
1
vote
Converting Chainlink oracle response (int256) to uint256
The returned price from chainlink data feeds contains 8 additional digits along with the price for example 1716 17306235
If you only want to price and not the additional digits then
uint256 price = ui …
0
votes
i have been trying to deploy mocks for my hardhat-raffle , but i encountered this problem
Specify the base fee like this:
const BASE_FEE = "250000000000000000";
1
vote
how to call a rest api into smart caontract
Blockchains can't interact with the outside world, as they are intentionally isolated and deterministic by nature, which means they cannot make API calls generate random numbers, or for any reason com …