2
contract Simplestorage {
    string data;

    function store(string memory _data) public {
        data = _data;
    }

    function retrieve() public view returns (string memory) {
        return data;
    }
}

For the store function i given input as "How are you" and the transaction result is like this, how can decode raw data by using this transaction info and private key

AttributeDict({'hash': HexBytes('0x81bd6e7c3a02100cc79b96f05197f4cfab26e1dcce43b1ef3f9d6b34c494a55b'), 
'nonce': 35, 
'blockHash':HexBytes('0x0b66c58c5158cc03135ce8c866923f3110ffa1a0a17a14f1003fe123824a76ef), 'blockNumber': 36, 
'transactionIndex': 0, 
'from': '0xe67E47A0B42d20643c723E31D0dBA0cE64e5c071', 
'to': '0xdef7b161ef19A9d79d94B8244750cdddcbA41206', 
'value': 0, 
'gas': 43468, 
'gasPrice': 20000000000, 
'input': '0x131a06800000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001a686920686f772061726520796f7520686f772061726520796f75000000000000', 
'v': 2710, 
'r': HexBytes('0xd1acd5be3dad14eb0ee9e5078aa7dde1e494e31723e12e4765f475ffeddec431'), 
's': HexBytes('0x4ba1b8e2778fc2d350d866bd2876d7fdedeefebe5fd5452ac352600c4ed6f1e9')})
TylerH
  • 20,799
  • 66
  • 75
  • 101
  • 2
    You don't get the result as a direct response for the store function as it's a transaction (you only get transaction information). You need to get the value by calling the retrieve() view function – sirroger Jul 13 '22 at 12:45

0 Answers0