Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // compiled with version Version: 0.1.2-5c3bfd4b*/.-/clang/int
- // https://chriseth.github.io/browser-solidity/
- contract EventTest {
- enum TestEnum { Enum1, Enum2, Enum3}
- struct TestStruct {
- uint s1;
- int s2;
- }
- event BooleanTestEvent(bool input);
- event IntTestEvent(int signedInput, uint unsignedInput);
- event Int8TestEvent(int8 signedInput, uint8 unsignedInput);
- event Int32TestEvent(int32 signedInput, uint32 unsignedInput);
- event Int40TestEvent(int40 signedInput, uint40 unsignedInput);
- event AddressTestEvent(address input);
- event Bytes1TestEvent(bytes1 input);
- event Bytes2TestEvent(bytes2 input);
- event Bytes32TestEvent(bytes32 input);
- event BytesTestEvent(bytes input);
- event StringTestEvent(string input);
- event EnumTestEvent(TestEnum input);
- //event StructTestEvent(StructTest str); // Type error: Internal type is not allowed as event parameter type.
- //event MappingTestEvent1(mapping(uint => uint)); // Type error: Type is required to live outside storage.
- event BooleanArrayTestEvent(bool[] input);
- event IntArrayTestEvent(int[] signedInput, uint[] unsignedInput);
- event Int8ArrayTestEvent(int8[] signedInput, uint8[] unsignedInput);
- event Int32ArrayTestEvent(int32[] signedInput, uint32[] unsignedInput);
- event Int40ArrayTestEvent(int40[] signedInput, uint40[] unsignedInput);
- event AddressArrayTestEvent(address[] input);
- event Bytes1ArrayTestEvent(bytes1[] input);
- event Bytes2ArrayTestEvent(bytes2[] input);
- event Bytes32ArrayTestEvent(bytes32[] input);
- //event BytesArrayTestEvent(bytes[] byt); // Type error: Internal type is not allowed as event parameter type.
- //event StringArrayTestEvent(string[] str); // Type error: Internal type is not allowed as event parameter type.
- event EnumArrayTestEvent(TestEnum[] input);
- //event StructArrayTestEvent(StructTest[] arr); // Type error: Internal type is not allowed as event parameter type.
- //event MappingArrayTestEvent1(mapping(uint => uint)[]); // Type error: Type is required to live outside storage.
- function booleanTest(bool test) {
- BooleanTestEvent(test);
- }
- function intTest(int signedInput, uint unsignedInput) {
- IntTestEvent(signedInput, unsignedInput);
- }
- function Int8Test(int8 signedInput, uint8 unsignedInput) {
- Int8TestEvent(signedInput, unsignedInput);
- }
- function Int32Test(int32 signedInput, uint32 unsignedInput) {
- Int32TestEvent(signedInput, unsignedInput);
- }
- function Int40Test(int40 signedInput, uint40 unsignedInput) {
- Int40TestEvent(signedInput, unsignedInput);
- }
- function AddressTest(address addr) {
- AddressTestEvent(addr);
- }
- function Bytes1Test(bytes1 byt) {
- Bytes1TestEvent(byt);
- }
- function Bytes2Test(bytes2 byt) {
- Bytes2TestEvent(byt);
- }
- function Bytes32Test(bytes32 byt) {
- Bytes32TestEvent(byt);
- }
- function BytesTest(bytes byt) {
- BytesTestEvent(byt);
- }
- function StringTest(string str) {
- StringTestEvent(str);
- }
- function EnumTest(TestEnum enu) {
- EnumTestEvent(enu);
- }
- function BooleanArrayTest(bool[] input) {
- BooleanArrayTestEvent(input);
- }
- function IntArrayTest(int[] signedInput, uint[] unsignedInput) {
- IntArrayTestEvent(signedInput, unsignedInput);
- }
- function Int8ArrayTest(int8[] signedInput, uint8[] unsignedInput) {
- Int8ArrayTestEvent(signedInput, unsignedInput);
- }
- function Int32ArrayTest(int32[] signedInput, uint32[] unsignedInput) {
- Int32ArrayTestEvent(signedInput, unsignedInput);
- }
- function Int40ArrayTest(int40[] signedInput, uint40[] unsignedInput) {
- Int40ArrayTestEvent(signedInput, unsignedInput);
- }
- function AddressArrayTest(address[] addr) {
- AddressArrayTestEvent(addr);
- }
- function Bytes1ArrayTest(bytes1[] byt) {
- Bytes1ArrayTestEvent(byt);
- }
- function Bytes2ArrayTest(bytes2[] byt) {
- Bytes2ArrayTestEvent(byt);
- }
- function Bytes32ArrayTest(bytes32[] byt) {
- Bytes32ArrayTestEvent(byt);
- }
- function EnumArrayTest(TestEnum[] arr) {
- EnumArrayTestEvent(arr);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement