2019-05-15 19:09:44 +00:00
|
|
|
/*
|
|
|
|
This file is part of solidity.
|
|
|
|
|
|
|
|
solidity is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
solidity is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with solidity. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2020-07-17 14:54:12 +00:00
|
|
|
// SPDX-License-Identifier: GPL-3.0
|
2019-05-15 19:09:44 +00:00
|
|
|
|
|
|
|
syntax = "proto2";
|
|
|
|
|
2019-07-16 16:01:46 +00:00
|
|
|
// bool
|
|
|
|
message BoolType {}
|
|
|
|
|
2019-05-15 19:09:44 +00:00
|
|
|
// uint8...256, int8...256
|
|
|
|
message IntegerType {
|
|
|
|
required bool is_signed = 1;
|
|
|
|
required uint32 width = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// bytes1, bytes2,..., bytes32
|
|
|
|
message FixedByteType {
|
|
|
|
required uint32 width = 1;
|
|
|
|
}
|
|
|
|
|
2020-12-10 11:43:46 +00:00
|
|
|
// address
|
|
|
|
message AddressType {}
|
2019-05-15 19:09:44 +00:00
|
|
|
|
|
|
|
message ValueType {
|
|
|
|
oneof value_type_oneof {
|
|
|
|
IntegerType inty = 1;
|
|
|
|
FixedByteType byty = 2;
|
|
|
|
AddressType adty = 3;
|
2019-07-16 16:01:46 +00:00
|
|
|
BoolType boolty = 4;
|
2019-05-15 19:09:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// bytes/string
|
|
|
|
message DynamicByteArrayType {
|
|
|
|
enum DType {
|
|
|
|
BYTES = 0;
|
|
|
|
STRING = 1;
|
|
|
|
}
|
|
|
|
required DType type = 1;
|
|
|
|
}
|
|
|
|
|
2019-09-23 15:46:46 +00:00
|
|
|
message ArrayType {
|
|
|
|
required Type t = 1;
|
|
|
|
required uint32 length = 2;
|
|
|
|
required bool is_static = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message StructType {
|
|
|
|
repeated Type t = 1;
|
|
|
|
}
|
|
|
|
|
2019-05-15 19:09:44 +00:00
|
|
|
message NonValueType {
|
|
|
|
oneof nonvalue_type_oneof {
|
|
|
|
DynamicByteArrayType dynbytearray = 1;
|
|
|
|
ArrayType arrtype = 2;
|
|
|
|
StructType stype = 3;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-09-23 15:46:46 +00:00
|
|
|
// TODO: Add more types
|
|
|
|
// See https://github.com/ethereum/solidity/issues/6749
|
2019-05-15 19:09:44 +00:00
|
|
|
message Type {
|
|
|
|
oneof type_oneof {
|
|
|
|
ValueType vtype = 1;
|
|
|
|
NonValueType nvtype = 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message VarDecl {
|
|
|
|
required Type type = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message TestFunction {
|
|
|
|
required VarDecl local_vars = 1;
|
2019-08-05 15:05:17 +00:00
|
|
|
// Length of invalid encoding
|
|
|
|
required uint64 invalid_encoding_length = 2;
|
2019-05-15 19:09:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message Contract {
|
2019-10-08 00:09:59 +00:00
|
|
|
enum Test {
|
|
|
|
CALLDATA_CODER = 1;
|
|
|
|
RETURNDATA_CODER = 2;
|
|
|
|
}
|
2019-05-15 19:09:44 +00:00
|
|
|
required VarDecl state_vars = 1;
|
|
|
|
required TestFunction testfunction = 2;
|
2019-10-08 00:09:59 +00:00
|
|
|
required Test test = 3;
|
2019-05-15 19:09:44 +00:00
|
|
|
}
|
|
|
|
|
2019-12-23 15:50:30 +00:00
|
|
|
package solidity.test.abiv2fuzzer;
|