Questions tagged [storage-pointer]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
14 views

Mappings with (multiple) pointers to structs

I need to store some datasets as structs in mappings, that should be accessible via multiple keys. Obviously, I dont want to store the same dataset multiple times, so I want to have one copy in memory ...
0
votes
0answers
14 views

Initializing a storage variable to point to a bytes32 slot

How can we initialize a storage variable to point to a specific storage slot? Example: pragma solidity ^0.6.9; contract SomeContract { struct SomeStruct { uint someUint; } ...
3
votes
1answer
293 views

Bytes variables are connected

Why are these variables confounding? The returned result shows that both loops are effecting both bytes variables (second returns the same result). function mix() public returns (bytes) { ...
1
vote
1answer
875 views

What is cheapest way of creating clone of existing smart contract's

I do need to deploy a lot of similar smart contracts. With Solidity it's quite easy, but expensive :( I'm doing: contract One { ... } contract Builder { function create(uint8 amount) public ...
3
votes
2answers
1k views

Declaring a memory array of storage pointers in Solidity

I would like to declare a variable as a memory array of pointers to storage arrays of uint256. For example: pragma solidity ^0.4.24; contract A { uint256[] public array0; uint256[] public ...