pragma solidity >=0.7.0 <0.9.0;
/**
* @title Storage
* @dev Store & retrieve value in a variable
*/
contract Storage {
uint256 number;
/**
* @dev Store value in variable
* @param num value to store
*/
function store(uint256 num) public {
number = num;
}
/**
* @dev Return value
* @return value of 'number'
*/
function retrieve() public view returns (uint256){
return number;
}
}
metadata.json
{
"compiler": { "version": "0.8.4+commit.c7e474f2" },
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [],
"name": "retrieve",
"outputs": [
{ "internalType": "uint256", "name": "", "type": "uint256" }
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{ "internalType": "uint256", "name": "num", "type": "uint256" }
],
"name": "store",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"devdoc": {
"details": "Store & retrieve value in a variable",
"kind": "dev",
"methods": {
"retrieve()": {
"details": "Return value ",
"returns": { "_0": "value of 'number'" }
},
"store(uint256)": {
"details": "Store value in variable",
"params": { "num": "value to store" }
}
},
"title": "Storage",
"version": 1
},
"userdoc": { "kind": "user", "methods": {}, "version": 1 }
},
Sourcify's code is fully open-sourced. The repository of verified contracts is completely public and decentralized by being served over IPFS.
Full matches on Sourcify cryptographically guarantee the verified source code is identical to the original deployed contract. Our monitoring service observes contract creations and verifies the source codes automatically if published to IPFS.
Goodbye YOLO signing 👋. Decode contract interactions with the verified contract's ABI and NatSpec comments . Show wallet users meaningful information instead of hex strings.
Join our community using the platform you prefer
Sourcify is multi-chain and works on all EVM based networks.