current position:Home>Solid contract execution

Solid contract execution

2022-02-03 20:56:04 Q & A of Denglian community

pragma solidity 0.4.21;contract SetHash{    mapping(string => string) hashMap;    function setHash(string key,string value) returns(string){        hashMap[key] = value;        return (value);    }}

This setHash Why function execution calls sload Instructions , I think we should only execute sstore Instructions are right ? Ask for an answer

Take the answer 1:

sload In contrast, it is a process of finding a position .
sstore Is to write data .

If you can locate , It can be used directly in inline assembly sstore

copyright notice
author[Q & A of Denglian community],Please bring the original link to reprint, thank you.

Random recommended