solidity/test/tools/ossfuzz/solProto.proto

112 lines
2.5 KiB
Protocol Buffer
Raw Normal View History

/*
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/>.
*/
syntax = "proto2";
message InterfaceFunction {
enum StateMutability {
PURE = 0;
VIEW = 1;
PAYABLE = 2;
NONPAYABLE = 3;
}
required StateMutability mut = 1;
}
message LibraryFunction {
// Library functions cannot be payable
enum StateMutability {
PURE = 0;
VIEW = 1;
NONPAYABLE = 2;
}
enum Visibility {
PUBLIC = 0;
EXTERNAL = 1;
INTERNAL = 2;
PRIVATE = 3;
}
required Visibility vis = 1;
required StateMutability mut = 2;
}
message ContractFunction {
enum StateMutability {
PURE = 0;
VIEW = 1;
PAYABLE = 2;
NONPAYABLE = 3;
}
enum Visibility {
PUBLIC = 0;
EXTERNAL = 1;
INTERNAL = 2;
PRIVATE = 3;
}
required Visibility vis = 1;
required StateMutability mut = 2;
required bool virtualfunc = 3;
}
message Library {
repeated LibraryFunction funcdef = 1;
}
message Interface {
repeated InterfaceFunction funcdef = 1;
repeated Interface bases = 2;
}
message Contract {
repeated ContractFunction funcdef = 1;
required bool abstract = 2;
repeated ContractOrInterface bases = 3;
}
message ContractOrInterface {
oneof contract_or_interface_oneof {
Contract c = 1;
Interface i = 2;
}
}
message ContractType {
oneof contract_type_oneof {
Contract c = 1;
Library l = 2;
Interface i = 3;
}
}
message TestContract {
enum Type {
LIBRARY = 0;
CONTRACT = 1;
}
required Type type = 1;
}
message Program {
repeated ContractType contracts = 1;
required TestContract test = 2;
// Seed is an unsigned integer that initializes
// a pseudo random number generator.
required uint64 seed = 3;
}
package solidity.test.solprotofuzzer;