mirror of
https://github.com/autistic-symposium/web3-starter-sol.git
synced 2025-07-12 09:49:28 -04:00
Create README.md
This commit is contained in:
parent
c63676e800
commit
b01ee98f86
1 changed files with 22 additions and 0 deletions
22
calldata/README.md
Normal file
22
calldata/README.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
## calldata
|
||||
|
||||
<br>
|
||||
|
||||
### tl; dr
|
||||
|
||||
<br>
|
||||
|
||||
* calldata is the encoded parameter(s) sent on functions by smart contracts to the evm (for example, through `abi.econde()`,`abi.econcdeWithSelector() for a particular interfaced function, or `abi.encodePacked()` for efficient dynamic variables).
|
||||
* `selector()` generates the 4-bytes representing the method in the interface: this is how the evm knows which function is being interacted.
|
||||
|
||||
* each piece of calldata is 32 bytes long (64 chars), where 20 hex == 32-bytes
|
||||
* types:
|
||||
- static variables: the encoded representation of `uint`, `address`, `bool`, `bytes`, `tuples`
|
||||
- dynamics variables: non-fixed-size types: `bytes`, `string`, dynamic and fixed arrays `<T>[]`
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
---
|
||||
|
||||
### resources
|
Loading…
Add table
Add a link
Reference in a new issue