mirror of https://github.com/crytic/slither
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
416 B
35 lines
416 B
4 years ago
|
|
||
|
// a simple contract
|
||
|
contract A {
|
||
|
|
||
|
}
|
||
|
|
||
|
// inheritance, no constructor
|
||
|
contract B is A {
|
||
|
constructor(uint a) public {
|
||
|
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// inheritance, init in inheritance
|
||
|
contract C is B(4) {
|
||
|
|
||
|
}
|
||
|
|
||
|
// inheritance, init in constructor
|
||
|
contract D is B {
|
||
|
constructor() B(2) public {
|
||
|
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// abstract contract
|
||
|
contract E is B {
|
||
|
}
|
||
|
|
||
|
// diamond inheritance
|
||
|
contract F is A {}
|
||
|
contract G is A {}
|
||
|
contract H is F, G {
|
||
|
|
||
|
}
|