2021-10-28 11:01:56 +00:00
|
|
|
// SPDX-License-Identifier: UNLICENSED
|
2021-09-28 06:58:43 +00:00
|
|
|
|
2021-10-28 11:01:56 +00:00
|
|
|
pragma solidity ^0.8.0;
|
|
|
|
|
|
|
|
contract Example {
|
|
|
|
uint256 private _test;
|
|
|
|
|
2021-11-23 05:53:47 +00:00
|
|
|
struct Bid {
|
|
|
|
uint128 bidAmount1;
|
|
|
|
uint128 bidAmount2;
|
|
|
|
}
|
|
|
|
|
2021-10-28 11:01:56 +00:00
|
|
|
event Test(string param1, uint8 param2);
|
2021-09-28 06:58:43 +00:00
|
|
|
|
|
|
|
function getMethod() public view virtual returns (string memory)
|
|
|
|
{
|
|
|
|
return 'test';
|
|
|
|
}
|
2021-10-28 11:01:56 +00:00
|
|
|
|
2021-11-23 05:53:47 +00:00
|
|
|
function addMethod(uint128 bidAmount1, uint128 bidAmount2) public pure returns (uint) {
|
|
|
|
return bidAmount1 + bidAmount2;
|
|
|
|
}
|
|
|
|
|
|
|
|
function structMethod(uint128 bidAmount1, uint128 bidAmount2) public pure returns (Bid memory) {
|
|
|
|
Bid memory bid;
|
|
|
|
bid.bidAmount1 = bidAmount2;
|
|
|
|
bid.bidAmount2 = bidAmount1;
|
|
|
|
|
|
|
|
return bid;
|
|
|
|
}
|
|
|
|
|
2021-10-28 11:01:56 +00:00
|
|
|
function emitEvent() public virtual returns (bool) {
|
|
|
|
emit Test('abc', 123);
|
2021-11-23 05:53:47 +00:00
|
|
|
|
2021-10-28 11:01:56 +00:00
|
|
|
return true;
|
|
|
|
}
|
2021-09-28 06:58:43 +00:00
|
|
|
}
|