Skip to content

Latest commit

 

History

History
271 lines (245 loc) · 8.7 KB

setGet.md

File metadata and controls

271 lines (245 loc) · 8.7 KB

A simple smart contract for setting and getting values. (setGet.sol)

View Source: contracts/mockup/setGet.sol

setGet contract

This is going to be used for testing purposes.

Contract Members

Constants & Variables

uint256 public value;

Events

event valueSet(uint256 indexed _value);

Functions


get

To get the value.

function get() public nonpayable
returns(_value uint256)
Source Code
function get() public returns (uint256 _value) {
        return value;
    }

set

To set the value.

function set(uint256 _value) public nonpayable

Arguments

Name Type Description
_value uint256 The value.
Source Code
function set(uint256 _value) public {
        value = _value;
    }

Contracts