Last active
February 6, 2019 00:04
-
-
Save kvhnuke/020cc0f49cf34bbb41f6f54f4b1efee0 to your computer and use it in GitHub Desktop.
ABI Testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.5.0; | |
contract ABITester { | |
uint200 public const_abc; | |
bool public const_nice; | |
bool public const_nice2; | |
bytes32 public const_time; | |
bool public const_nicer; | |
uint[] public ArrUint; | |
bool[] public ArrBool; | |
bytes32[] public ArrBytes32; | |
uint168[] public ArrUint168; | |
constructor(uint200 abc, bool nice, bool nice2, bytes32 time, bool nicer) payable public { | |
const_abc = abc; | |
const_nice = nice; | |
const_nice2 = nice2; | |
const_time = time; | |
const_nicer = nicer; | |
} | |
function funcUintArray(uint[] memory arrUint) public { | |
for(uint i = 0; i< arrUint.length; i++){ | |
ArrUint[i] = arrUint[i]; | |
} | |
} | |
function funcBoolArray(bool[] memory arrBool) public { | |
for(uint i = 0; i< arrBool.length; i++){ | |
ArrBool[i] = arrBool[i]; | |
} | |
} | |
function funcBytes32Array(bytes32[] memory arrBytes32) public { | |
for(uint i = 0; i< arrBytes32.length; i++){ | |
ArrBytes32[i] = arrBytes32[i]; | |
} | |
} | |
function funcUint168Array(uint168[] memory arrUint168) public { | |
for(uint i = 0; i< arrUint168.length; i++){ | |
ArrUint168[i] = arrUint168[i]; | |
} | |
} | |
function funcSetTime(bytes32 _time) public payable { | |
const_time = _time; | |
} | |
function funcSetNicer(bool _nicer) public { | |
const_nicer = _nicer; | |
} | |
} |
Author
kvhnuke
commented
Feb 5, 2019
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment