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
When to use abi.encode, abi.encodePacked or abi.encodeWithSignature in solidity
Let's declare a few variables:
➜ uint16 a = 2344
➜ uint16 b = 359
➜ address _addr = 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4;
2344 = 0x928 and 359 = 0x167
When using abi.encode:
➜ abi.encode(a, b, …
0
votes
Where inside smart contract storage are dynamic array values stored?
Here's a contract for demonstration.
pragma solidity 0.8;
contract Cont {
uint a = 5;
uint[2] public numbers; // Fixed array with max elements 2
uint[] public nums; // Dynamic array …
0
votes
What does add(source, 32) do in solidity?
With an example:
function myfunc(bytes[] calldata data) public view {
bytes memory _data = data[0];
bytes32 dat1;
bytes32 dat2;
assembly {
dat1 := mload(_ …
0
votes
What exactly is a proxy contract and why is there a security vulnerability involved in it?
Proxy.sol from Openzeppelin:
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/Proxy.sol)
pragma solidity ^0.8.20;
abstract contract Proxy {
function _delegate … Below is the implementation of this:
pragma solidity 0.8;
import ".. …