chainlib-eth

Ethereum implementation of the chainlib interface
Info | Log | Files | Refs | README | LICENSE

TestContract.sol (547B)


      1 pragma solidity ^0.8.0;
      2 
      3 contract TestEventContract {
      4 
      5 	event TestEventOne(uint256 indexed _foo, bytes32 _bar);
      6 	event TestEventTwo(uint256 _foo);
      7 
      8 	struct Person {
      9 		string uid;
     10 		address wallet;
     11 	}
     12 
     13 	struct Mail {
     14 		Person from;
     15 		Person to;
     16 		string contents;
     17 	}
     18 
     19 	function foo(uint256 _foo, bytes32 _bar) public returns (bool) {
     20 		emit TestEventOne(_foo, _bar);
     21 		emit TestEventTwo(_foo);
     22 		return true;
     23 	}
     24 
     25 	function foo(Mail memory _mail, uint256 _nonce) public pure returns(string memory) {
     26 		_mail;
     27 		_nonce;
     28 		return _mail.from.uid;
     29 	}
     30 }