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.
0
votes
Storage used by contract reference
They use 20 bytes since they only store the address. Because of that, the order between your two examples do not matter; both will be packed into the same 2 storage slots.
In your first example: 8 bit …
0
votes
Accepted
Pls why am I getting this error when I run a test in hardhat?
Two problems:
First, you are using assert incorrectly. The first argument to assert is the assertion itself and must evaluate to true or false, where the second parameter is an optional failure messag …
0
votes
Token holders not showing on mainnet
All block explorers are "eventually consistent", meaning the data might not be real time or up to date all of the time, but it eventually will be.
Most block explorers use Transfer events from the ERC …
4
votes
Accepted
Call smart contract function from another smart contract
You can think of the call from contractB to contractA as an additional "internal transaction", so it still has to adhere to the rules of contractA. In other words, since your mint function can only be …
0
votes
How to get baseURI for NFTs in IPFS using Fleek?
On the Storage tab of the Fleek dashboard, find the folder you want the IPFS CID for. Then click Verify on IPFS, which will open the folder up on Fleek's IPFS gateway.
Copy the IPFS CID from the link …
1
vote
type(C).creationCode who has access to this?
This language construct is compile-time (not runtime), meaning contract C would have to be imported in order for you to use type(C).creationCode, and Solidity does not allow conflicting names in the same …
0
votes
Accepted
transaction fail after calling transfer to the contract itself
The transfer function in ERC20 is for transferring tokens from the current contract address to some other account, so your line of code is trying to transfer 1 unit of the token from the contract to i …
2
votes
Accepted
Using modifiers in Foundry `test`
It is safe to use modifiers in tests, but I cannot speak to whether it is good practice or not. It definitely does not seem to be common practice.
The main reason we have not used modifiers in example …