feat: add remaining ast nodes

squash ast

test: fix ast test path

refactor: some clean up

docs: correct some docs

fix: ast serde behavior

test: add more ast tests

Pulled in from https://github.com/ethereum/solidity

test: improve ast test error messages

fix: more serde behavior

fix: more serde behavior

test: add documentation tests

feat: stronger types

fix: more type juggling

docs: fix rustdoc links

fix: type names for older compilers

docs: a bit more docs

test: remove legacy tests

chore: remove some todos

add missing ast

correct source

uncomment etherscan test

yul function call

rebase
This commit is contained in:
Oliver Nordbjerg 2022-08-05 22:59:42 +02:00 committed by franfran
parent d5ebff42e4
commit 1a0f59f64f
65 changed files with 10896 additions and 6769 deletions

12
Cargo.lock generated
View File

@ -1594,7 +1594,8 @@ dependencies = [
"semver",
"serde",
"serde_json",
"sha2 0.10.6",
"serde_path_to_error",
"sha2 0.10.2",
"solang-parser",
"svm-rs",
"svm-rs-builds",
@ -3726,6 +3727,15 @@ dependencies = [
"serde",
]
[[package]]
name = "serde_path_to_error"
version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "184c643044780f7ceb59104cef98a5a6f12cb2288a7bc701ab93a362b49fd47d"
dependencies = [
"serde",
]
[[package]]
name = "serde_urlencoded"
version = "0.7.1"

View File

@ -62,6 +62,7 @@ rand = "0.8.5"
pretty_assertions = "1.3.0"
tempfile = "3.3.0"
tokio = { version = "1.18", features = ["full"] }
serde_path_to_error = "0.1.8"
[[bench]]
name = "compile_many"

View File

@ -11,6 +11,7 @@ macro_rules! ast_node {
) => {
$(#[$struct_meta])*
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct $name {
pub id: usize,
#[serde(with = "serde_helpers::display_from_str")]
@ -37,10 +38,15 @@ macro_rules! expr_node {
ast_node!(
$(#[$struct_meta])*
struct $name {
#[serde(default, deserialize_with = "serde_helpers::default_for_null")]
argument_types: Vec<TypeDescriptions>,
#[serde(default)]
is_constant: bool,
#[serde(default)]
is_l_value: bool,
#[serde(default)]
is_pure: bool,
#[serde(default)]
l_value_requested: bool,
type_descriptions: TypeDescriptions,
$(
@ -52,5 +58,47 @@ macro_rules! expr_node {
}
}
/// A macro that expands to a struct with common statement node fields.
macro_rules! stmt_node {
(
$(#[$struct_meta:meta])*
struct $name:ident {
$(
$(#[$field_meta:meta])*
$field:ident: $ty:ty
),* $(,)*
}
) => {
ast_node!(
$(#[$struct_meta])*
struct $name {
// TODO
documentation: Option<String>,
$(
$(#[$field_meta])*
$field: $ty
),*
}
);
}
}
/// A macro that expands to an enum where each variant also contains a struct of the same name.
///
/// The inner value of each variant is boxed since AST types are inherently recursive.
macro_rules! node_group {
($group:ident; $( $name:ident ),* $(,)*) => {
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(tag = "nodeType")]
pub enum $group {
$(
$name(Box<$name>),
)*
}
};
}
pub(crate) use ast_node;
pub(crate) use expr_node;
pub(crate) use node_group;
pub(crate) use stmt_node;

View File

@ -3,10 +3,10 @@ use std::{fmt, fmt::Write, str::FromStr};
/// Represents the source location of a node: `<start byte>:<length>:<source index>`.
///
/// The `length` and `index` can be -1 which is represented as `None`
/// The `start`, `length` and `index` can be -1 which is represented as `None`
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct SourceLocation {
pub start: usize,
pub start: Option<usize>,
pub length: Option<usize>,
pub index: Option<usize>,
}
@ -21,7 +21,7 @@ impl FromStr for SourceLocation {
let start = split
.next()
.ok_or_else(invalid_location)?
.parse::<usize>()
.parse::<isize>()
.map_err(|_| invalid_location())?;
let length = split
.next()
@ -34,6 +34,7 @@ impl FromStr for SourceLocation {
.parse::<isize>()
.map_err(|_| invalid_location())?;
let start = if start < 0 { None } else { Some(start as usize) };
let length = if length < 0 { None } else { Some(length as usize) };
let index = if index < 0 { None } else { Some(index as usize) };
@ -43,7 +44,11 @@ impl FromStr for SourceLocation {
impl fmt::Display for SourceLocation {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
self.start.fmt(f)?;
if let Some(start) = self.start {
start.fmt(f)?;
} else {
f.write_str("-1")?;
}
f.write_char(':')?;
if let Some(length) = self.length {
length.fmt(f)?;
@ -60,25 +65,9 @@ impl fmt::Display for SourceLocation {
}
}
/// Function mutability specifier.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub enum Expression {
Assignment,
BinaryOperation,
Conditional,
ElementaryTypeNameExpression,
FunctionCall,
FunctionCallOptions,
Identifier,
IndexAccess,
IndexRangeAccess,
Literal,
MemberAccess,
NewExpression,
TupleExpression,
UnaryOperation,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum StateMutability {
Payable,
Pure,
@ -86,23 +75,18 @@ pub enum StateMutability {
View,
}
/// Variable mutability specifier.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub enum TypeName {
ArrayTypeName,
ElementaryTypeName,
FunctionTypeName,
Mapping,
UserDefinedTypeName,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum Mutability {
Mutable,
Immutable,
Constant,
}
/// Storage location specifier.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum StorageLocation {
Calldata,
Default,
@ -110,7 +94,9 @@ pub enum StorageLocation {
Storage,
}
/// Visibility specifier.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum Visibility {
External,
Public,
@ -118,50 +104,10 @@ pub enum Visibility {
Private,
}
/// A type description.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub enum Statement {
Block,
Break,
Continue,
DoWhileStatement,
EmitStatement,
ExpressionStatement,
ForStatement,
IfStatement,
InlineAssembly,
PlaceholderStatement,
Return,
RevertStatement,
TryStatement,
UncheckedBlock,
VariableDeclarationStatement,
WhileStatement,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub enum YulStatement {
YulAssignment,
YulBlock,
YulBreak,
YulContinue,
YulExpressionStatement,
YulLeave,
YulForLoop,
YulFunctionDefinition,
YulIf,
YulSwitch,
YulVariableDeclaration,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub enum YulExpression {
YulFunctionCall,
YulIdentifier,
YulLiteral,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub enum YulLiteral {
YulLiteralValue,
YulLiteralHexValue,
#[serde(rename_all = "camelCase")]
pub struct TypeDescriptions {
pub type_identifier: Option<String>,
pub type_string: Option<String>,
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,192 @@
use super::{macros::node_group, misc::SourceLocation};
use crate::artifacts::serde_helpers;
use serde::{Deserialize, Serialize};
node_group! {
YulStatement;
YulAssignment,
YulBlock,
YulBreak,
YulContinue,
YulExpressionStatement,
YulLeave,
YulForLoop,
YulFunctionDefinition,
YulIf,
YulSwitch,
YulVariableDeclaration,
}
node_group! {
YulExpression;
YulFunctionCall,
YulIdentifier,
YulLiteral,
}
/// A Yul block.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct YulBlock {
#[serde(with = "serde_helpers::display_from_str")]
pub src: SourceLocation,
pub statements: Vec<YulStatement>,
}
/// A Yul assignment statement.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct YulAssignment {
#[serde(with = "serde_helpers::display_from_str")]
pub src: SourceLocation,
pub value: YulExpression,
pub variable_names: Vec<YulIdentifier>,
}
/// A Yul function call.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct YulFunctionCall {
#[serde(with = "serde_helpers::display_from_str")]
pub src: SourceLocation,
pub arguments: Vec<YulExpression>,
pub function_name: YulIdentifier,
}
/// A Yul identifier.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct YulIdentifier {
#[serde(with = "serde_helpers::display_from_str")]
pub src: SourceLocation,
pub name: String,
}
/// A literal Yul value.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct YulLiteral {
#[serde(with = "serde_helpers::display_from_str")]
pub src: SourceLocation,
pub hex_value: Option<String>, // TODO
pub value: Option<String>, // TODO
pub kind: YulLiteralKind,
pub type_name: Option<String>, // TODO
}
/// Yul literal value kinds.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub enum YulLiteralKind {
/// A number literal.
Number,
/// A string literal.
String,
/// A boolean literal.
Bool,
}
/// A Yul keyword.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct YulKeyword {
#[serde(with = "serde_helpers::display_from_str")]
pub src: SourceLocation,
}
/// The Yul break keyword.
pub type YulBreak = YulKeyword;
/// The Yul continue keyword.
pub type YulContinue = YulKeyword;
/// The Yul leave keyword.
pub type YulLeave = YulKeyword;
/// A Yul expression statement.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct YulExpressionStatement {
#[serde(with = "serde_helpers::display_from_str")]
pub src: SourceLocation,
pub expression: YulExpression,
}
/// A Yul for loop.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct YulForLoop {
#[serde(with = "serde_helpers::display_from_str")]
pub src: SourceLocation,
pub body: YulBlock,
pub condition: YulExpression,
pub post: YulBlock,
pub pre: YulBlock,
}
/// A Yul function definition.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct YulFunctionDefinition {
#[serde(with = "serde_helpers::display_from_str")]
pub src: SourceLocation,
pub body: YulBlock,
pub name: String,
#[serde(default)]
pub parameters: Vec<YulTypedName>,
#[serde(default)]
pub return_variables: Vec<YulTypedName>,
}
/// A Yul type name.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct YulTypedName {
#[serde(with = "serde_helpers::display_from_str")]
pub src: SourceLocation,
pub name: String,
#[serde(rename = "type")]
pub type_name: String, // TODO
}
/// A Yul if statement.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct YulIf {
#[serde(with = "serde_helpers::display_from_str")]
pub src: SourceLocation,
pub body: YulBlock,
pub condition: YulExpression,
}
/// A Yul switch statement.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct YulSwitch {
#[serde(with = "serde_helpers::display_from_str")]
pub src: SourceLocation,
pub cases: Vec<YulCase>,
pub expression: YulExpression,
}
/// A Yul switch statement case.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct YulCase {
#[serde(with = "serde_helpers::display_from_str")]
pub src: SourceLocation,
pub body: YulBlock,
pub value: YulCaseValue,
}
/// A Yul switch case value.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(untagged)]
pub enum YulCaseValue {
/// A case defined by a literal value.
YulLiteral(YulLiteral),
/// The default case
// TODO: How do we make this only match "default"?
Default(String),
}
/// A Yul variable declaration.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct YulVariableDeclaration {
#[serde(with = "serde_helpers::display_from_str")]
pub src: SourceLocation,
pub value: Option<YulExpression>,
pub variables: Vec<YulTypedName>,
}

View File

@ -1846,7 +1846,10 @@ impl SourceFile {
pub fn contains_contract_definition(&self) -> bool {
if let Some(ref ast) = self.ast {
// contract definitions are only allowed at the source-unit level <https://docs.soliditylang.org/en/latest/grammar.html>
return ast.nodes.iter().any(|node| matches!(node, SourceUnitPart::ContractDefinition))
return ast
.nodes
.iter()
.any(|node| matches!(node, SourceUnitPart::ContractDefinition(_)))
// abstract contract, interfaces: ContractDefinition
}

View File

@ -0,0 +1,73 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
5
]
},
"id": 6,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": true,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 5,
"linearizedBaseContracts":
[
5
],
"name": "C",
"nameLocation": "18:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 3,
"nodeType": "Block",
"src": "37:4:1",
"statements": []
},
"id": 4,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "34:2:1"
},
"returnParameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "37:0:1"
},
"scope": 5,
"src": "23:18:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
}
],
"scope": 6,
"src": "0:43:1",
"usedErrors": []
}
],
"src": "0:44:1"
}

View File

@ -0,0 +1,574 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
39
]
},
"id": 40,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 39,
"linearizedBaseContracts":
[
39
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"constant": false,
"functionSelector": "97682884",
"id": 4,
"mutability": "mutable",
"name": "m",
"nameLocation": "60:1:1",
"nodeType": "VariableDeclaration",
"scope": 39,
"src": "17:44:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_mapping$_t_address_$_t_address_payable_$",
"typeString": "mapping(address => address payable)"
},
"typeName":
{
"id": 3,
"keyType":
{
"id": 1,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "25:7:1",
"typeDescriptions":
{
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "17:35:1",
"typeDescriptions":
{
"typeIdentifier": "t_mapping$_t_address_$_t_address_payable_$",
"typeString": "mapping(address => address payable)"
},
"valueType":
{
"id": 2,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "36:15:1",
"stateMutability": "payable",
"typeDescriptions":
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
}
},
"visibility": "public"
},
{
"body":
{
"id": 37,
"nodeType": "Block",
"src": "134:122:1",
"statements":
[
{
"assignments":
[
12
],
"declarations":
[
{
"constant": false,
"id": 12,
"mutability": "mutable",
"name": "a",
"nameLocation": "160:1:1",
"nodeType": "VariableDeclaration",
"scope": 37,
"src": "144:17:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
"typeName":
{
"id": 11,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "144:15:1",
"stateMutability": "payable",
"typeDescriptions":
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"visibility": "internal"
}
],
"id": 16,
"initialValue":
{
"baseExpression":
{
"id": 13,
"name": "m",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4,
"src": "164:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_mapping$_t_address_$_t_address_payable_$",
"typeString": "mapping(address => address payable)"
}
},
"id": 15,
"indexExpression":
{
"id": 14,
"name": "arg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6,
"src": "166:3:1",
"typeDescriptions":
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "164:6:1",
"typeDescriptions":
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "144:26:1"
},
{
"expression":
{
"id": 19,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide":
{
"id": 17,
"name": "r",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "180:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide":
{
"id": 18,
"name": "arg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6,
"src": "184:3:1",
"typeDescriptions":
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "180:7:1",
"typeDescriptions":
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"id": 20,
"nodeType": "ExpressionStatement",
"src": "180:7:1"
},
{
"assignments":
[
22
],
"declarations":
[
{
"constant": false,
"id": 22,
"mutability": "mutable",
"name": "c",
"nameLocation": "205:1:1",
"nodeType": "VariableDeclaration",
"scope": 37,
"src": "197:9:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName":
{
"id": 21,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "197:7:1",
"stateMutability": "nonpayable",
"typeDescriptions":
{
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"id": 27,
"initialValue":
{
"arguments":
[
{
"id": 25,
"name": "this",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -28,
"src": "217:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_contract$_C_$39",
"typeString": "contract C"
}
}
],
"expression":
{
"argumentTypes":
[
{
"typeIdentifier": "t_contract$_C_$39",
"typeString": "contract C"
}
],
"id": 24,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "209:7:1",
"typeDescriptions":
{
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName":
{
"id": 23,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "209:7:1",
"typeDescriptions": {}
}
},
"id": 26,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "209:13:1",
"tryCall": false,
"typeDescriptions":
{
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "197:25:1"
},
{
"expression":
{
"id": 35,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide":
{
"baseExpression":
{
"id": 28,
"name": "m",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4,
"src": "232:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_mapping$_t_address_$_t_address_payable_$",
"typeString": "mapping(address => address payable)"
}
},
"id": 30,
"indexExpression":
{
"id": 29,
"name": "c",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 22,
"src": "234:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "232:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide":
{
"arguments":
[
{
"hexValue": "30",
"id": 33,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "247:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression":
{
"argumentTypes":
[
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 32,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "239:8:1",
"typeDescriptions":
{
"typeIdentifier": "t_type$_t_address_payable_$",
"typeString": "type(address payable)"
},
"typeName":
{
"id": 31,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "239:8:1",
"stateMutability": "payable",
"typeDescriptions": {}
}
},
"id": 34,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "239:10:1",
"tryCall": false,
"typeDescriptions":
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "232:17:1",
"typeDescriptions":
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"id": 36,
"nodeType": "ExpressionStatement",
"src": "232:17:1"
}
]
},
"functionSelector": "fc68521a",
"id": 38,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nameLocation": "76:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 7,
"nodeType": "ParameterList",
"parameters":
[
{
"constant": false,
"id": 6,
"mutability": "mutable",
"name": "arg",
"nameLocation": "94:3:1",
"nodeType": "VariableDeclaration",
"scope": 38,
"src": "78:19:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
"typeName":
{
"id": 5,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "78:15:1",
"stateMutability": "payable",
"typeDescriptions":
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"visibility": "internal"
}
],
"src": "77:21:1"
},
"returnParameters":
{
"id": 10,
"nodeType": "ParameterList",
"parameters":
[
{
"constant": false,
"id": 9,
"mutability": "mutable",
"name": "r",
"nameLocation": "131:1:1",
"nodeType": "VariableDeclaration",
"scope": 38,
"src": "115:17:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
"typeName":
{
"id": 8,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "115:15:1",
"stateMutability": "payable",
"typeDescriptions":
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"visibility": "internal"
}
],
"src": "114:19:1"
},
"scope": 39,
"src": "67:189:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 40,
"src": "0:258:1",
"usedErrors": []
}
],
"src": "0:259:1"
}

View File

@ -0,0 +1,79 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
4
]
},
"id": 5,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 4,
"linearizedBaseContracts":
[
4
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"constant": false,
"id": 3,
"mutability": "mutable",
"name": "i",
"nameLocation": "20:1:1",
"nodeType": "VariableDeclaration",
"scope": 4,
"src": "13:8:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[]"
},
"typeName":
{
"baseType":
{
"id": 1,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "13:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2,
"nodeType": "ArrayTypeName",
"src": "13:6:1",
"typeDescriptions":
{
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"visibility": "internal"
}
],
"scope": 5,
"src": "0:24:1",
"usedErrors": []
}
],
"src": "0:25:1"
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,226 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"A":
[
7
],
"C":
[
17
]
},
"id": 18,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "A",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 7,
"linearizedBaseContracts":
[
7
],
"name": "A",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 5,
"nodeType": "Block",
"src": "31:2:1",
"statements": []
},
"id": 6,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 3,
"nodeType": "ParameterList",
"parameters":
[
{
"constant": false,
"id": 2,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6,
"src": "25:4:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 1,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "25:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "24:6:1"
},
"returnParameters":
{
"id": 4,
"nodeType": "ParameterList",
"parameters": [],
"src": "31:0:1"
},
"scope": 7,
"src": "13:20:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 18,
"src": "0:35:1",
"usedErrors": []
},
{
"abstract": false,
"baseContracts":
[
{
"baseName":
{
"id": 8,
"name": "A",
"nameLocations":
[
"50:1:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 7,
"src": "50:1:1"
},
"id": 9,
"nodeType": "InheritanceSpecifier",
"src": "50:1:1"
}
],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 17,
"linearizedBaseContracts":
[
17,
7
],
"name": "C",
"nameLocation": "45:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 15,
"nodeType": "Block",
"src": "73:2:1",
"statements": []
},
"id": 16,
"implemented": true,
"kind": "constructor",
"modifiers":
[
{
"arguments":
[
{
"hexValue": "32",
"id": 12,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "70:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
}
],
"id": 13,
"kind": "baseConstructorSpecifier",
"modifierName":
{
"id": 11,
"name": "A",
"nameLocations":
[
"68:1:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 7,
"src": "68:1:1"
},
"nodeType": "ModifierInvocation",
"src": "68:4:1"
}
],
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 10,
"nodeType": "ParameterList",
"parameters": [],
"src": "65:2:1"
},
"returnParameters":
{
"id": 14,
"nodeType": "ParameterList",
"parameters": [],
"src": "73:0:1"
},
"scope": 17,
"src": "54:21:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 18,
"src": "36:41:1",
"usedErrors": []
}
],
"src": "0:78:1"
}

View File

@ -0,0 +1,390 @@
{
"absolutePath": "Bytes.sol",
"exportedSymbols":
{
"Bytes":
[
25
]
},
"id": 26,
"license": "UNLICENSED",
"nodeType": "SourceUnit",
"nodes":
[
{
"id": 1,
"literals":
[
"solidity",
"0.8",
".13"
],
"nodeType": "PragmaDirective",
"src": "40:23:0"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "Bytes",
"contractDependencies": [],
"contractKind": "library",
"fullyImplemented": true,
"id": 25,
"linearizedBaseContracts":
[
25
],
"name": "Bytes",
"nameLocation": "73:5:0",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 23,
"nodeType": "Block",
"src": "207:164:0",
"statements":
[
{
"expression":
{
"commonType":
{
"typeIdentifier": "t_uint192",
"typeString": "uint192"
},
"id": 21,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression":
{
"id": 12,
"name": "_packedBools",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3,
"src": "314:12:0",
"typeDescriptions":
{
"typeIdentifier": "t_uint192",
"typeString": "uint192"
}
},
"nodeType": "BinaryOperation",
"operator": "&",
"rightExpression":
{
"id": 20,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "~",
"prefix": true,
"src": "329:28:0",
"subExpression":
{
"components":
[
{
"commonType":
{
"typeIdentifier": "t_uint192",
"typeString": "uint192"
},
"id": 18,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression":
{
"arguments":
[
{
"hexValue": "31",
"id": 15,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "339:1:0",
"typeDescriptions":
{
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
}
],
"expression":
{
"argumentTypes":
[
{
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
}
],
"id": 14,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "331:7:0",
"typeDescriptions":
{
"typeIdentifier": "t_type$_t_uint192_$",
"typeString": "type(uint192)"
},
"typeName":
{
"id": 13,
"name": "uint192",
"nodeType": "ElementaryTypeName",
"src": "331:7:0",
"typeDescriptions": {}
}
},
"id": 16,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "331:10:0",
"tryCall": false,
"typeDescriptions":
{
"typeIdentifier": "t_uint192",
"typeString": "uint192"
}
},
"nodeType": "BinaryOperation",
"operator": "<<",
"rightExpression":
{
"id": 17,
"name": "_boolNumber",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "345:11:0",
"typeDescriptions":
{
"typeIdentifier": "t_uint192",
"typeString": "uint192"
}
},
"src": "331:25:0",
"typeDescriptions":
{
"typeIdentifier": "t_uint192",
"typeString": "uint192"
}
}
],
"id": 19,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "330:27:0",
"typeDescriptions":
{
"typeIdentifier": "t_uint192",
"typeString": "uint192"
}
},
"typeDescriptions":
{
"typeIdentifier": "t_uint192",
"typeString": "uint192"
}
},
"src": "314:43:0",
"typeDescriptions":
{
"typeIdentifier": "t_uint192",
"typeString": "uint192"
}
},
"functionReturnParameters": 11,
"id": 22,
"nodeType": "Return",
"src": "307:50:0"
}
]
},
"id": 24,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "setBoolean",
"nameLocation": "92:10:0",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 8,
"nodeType": "ParameterList",
"parameters":
[
{
"constant": false,
"id": 3,
"mutability": "mutable",
"name": "_packedBools",
"nameLocation": "116:12:0",
"nodeType": "VariableDeclaration",
"scope": 24,
"src": "108:20:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint192",
"typeString": "uint192"
},
"typeName":
{
"id": 2,
"name": "uint192",
"nodeType": "ElementaryTypeName",
"src": "108:7:0",
"typeDescriptions":
{
"typeIdentifier": "t_uint192",
"typeString": "uint192"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 5,
"mutability": "mutable",
"name": "_boolNumber",
"nameLocation": "142:11:0",
"nodeType": "VariableDeclaration",
"scope": 24,
"src": "134:19:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint192",
"typeString": "uint192"
},
"typeName":
{
"id": 4,
"name": "uint192",
"nodeType": "ElementaryTypeName",
"src": "134:7:0",
"typeDescriptions":
{
"typeIdentifier": "t_uint192",
"typeString": "uint192"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 7,
"mutability": "mutable",
"name": "_value",
"nameLocation": "164:6:0",
"nodeType": "VariableDeclaration",
"scope": 24,
"src": "159:11:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName":
{
"id": 6,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "159:4:0",
"typeDescriptions":
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "102:72:0"
},
"returnParameters":
{
"id": 11,
"nodeType": "ParameterList",
"parameters":
[
{
"constant": false,
"id": 10,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 24,
"src": "198:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint192",
"typeString": "uint192"
},
"typeName":
{
"id": 9,
"name": "uint192",
"nodeType": "ElementaryTypeName",
"src": "198:7:0",
"typeDescriptions":
{
"typeIdentifier": "t_uint192",
"typeString": "uint192"
}
},
"visibility": "internal"
}
],
"src": "197:9:0"
},
"scope": 25,
"src": "83:288:0",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"scope": 26,
"src": "65:308:0",
"usedErrors": []
}
],
"src": "40:334:0"
}

View File

@ -0,0 +1,171 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
6
]
},
"id": 7,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 6,
"linearizedBaseContracts":
[
6
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 4,
"nodeType": "Block",
"src": "37:59:1",
"statements":
[
{
"AST":
{
"nodeType": "YulBlock",
"src": "56:34:1",
"statements":
[
{
"expression":
{
"arguments":
[
{
"arguments":
[
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "67:1:1",
"type": "",
"value": "0"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "70:1:1",
"type": "",
"value": "1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "73:1:1",
"type": "",
"value": "2"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "76:1:1",
"type": "",
"value": "3"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "79:1:1",
"type": "",
"value": "4"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "82:1:1",
"type": "",
"value": "5"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "85:1:1",
"type": "",
"value": "6"
}
],
"functionName":
{
"name": "call",
"nodeType": "YulIdentifier",
"src": "62:4:1"
},
"nodeType": "YulFunctionCall",
"src": "62:25:1"
}
],
"functionName":
{
"name": "pop",
"nodeType": "YulIdentifier",
"src": "58:3:1"
},
"nodeType": "YulFunctionCall",
"src": "58:30:1"
},
"nodeType": "YulExpressionStatement",
"src": "58:30:1"
}
]
},
"evmVersion": "london",
"externalReferences": [],
"id": 3,
"nodeType": "InlineAssembly",
"src": "47:43:1"
}
]
},
"functionSelector": "b582ec5f",
"id": 5,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "j",
"nameLocation": "26:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "27:2:1"
},
"returnParameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "37:0:1"
},
"scope": 6,
"src": "17:79:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 7,
"src": "0:98:1",
"usedErrors": []
}
],
"src": "0:99:1"
}

View File

@ -0,0 +1,73 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
5
]
},
"id": 6,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 5,
"linearizedBaseContracts":
[
5
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 3,
"nodeType": "Block",
"src": "28:4:1",
"statements": []
},
"id": 4,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "25:2:1"
},
"returnParameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "28:0:1"
},
"scope": 5,
"src": "14:18:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 6,
"src": "0:34:1",
"usedErrors": []
}
],
"src": "0:35:1"
}

View File

@ -0,0 +1,218 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"A":
[
1
],
"B":
[
4
],
"C":
[
7
],
"D":
[
10
],
"E":
[
13
]
},
"id": 14,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "A",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 1,
"linearizedBaseContracts":
[
1
],
"name": "A",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes": [],
"scope": 14,
"src": "0:14:1",
"usedErrors": []
},
{
"abstract": false,
"baseContracts":
[
{
"baseName":
{
"id": 2,
"name": "A",
"nameLocations":
[
"29:1:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 1,
"src": "29:1:1"
},
"id": 3,
"nodeType": "InheritanceSpecifier",
"src": "29:1:1"
}
],
"canonicalName": "B",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 4,
"linearizedBaseContracts":
[
4,
1
],
"name": "B",
"nameLocation": "24:1:1",
"nodeType": "ContractDefinition",
"nodes": [],
"scope": 14,
"src": "15:19:1",
"usedErrors": []
},
{
"abstract": false,
"baseContracts":
[
{
"baseName":
{
"id": 5,
"name": "B",
"nameLocations":
[
"49:1:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4,
"src": "49:1:1"
},
"id": 6,
"nodeType": "InheritanceSpecifier",
"src": "49:1:1"
}
],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 7,
"linearizedBaseContracts":
[
7,
4,
1
],
"name": "C",
"nameLocation": "44:1:1",
"nodeType": "ContractDefinition",
"nodes": [],
"scope": 14,
"src": "35:19:1",
"usedErrors": []
},
{
"abstract": false,
"baseContracts":
[
{
"baseName":
{
"id": 8,
"name": "C",
"nameLocations":
[
"69:1:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 7,
"src": "69:1:1"
},
"id": 9,
"nodeType": "InheritanceSpecifier",
"src": "69:1:1"
}
],
"canonicalName": "D",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 10,
"linearizedBaseContracts":
[
10,
7,
4,
1
],
"name": "D",
"nameLocation": "64:1:1",
"nodeType": "ContractDefinition",
"nodes": [],
"scope": 14,
"src": "55:19:1",
"usedErrors": []
},
{
"abstract": false,
"baseContracts":
[
{
"baseName":
{
"id": 11,
"name": "D",
"nameLocations":
[
"89:1:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 10,
"src": "89:1:1"
},
"id": 12,
"nodeType": "InheritanceSpecifier",
"src": "89:1:1"
}
],
"canonicalName": "E",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 13,
"linearizedBaseContracts":
[
13,
10,
7,
4,
1
],
"name": "E",
"nameLocation": "84:1:1",
"nodeType": "ContractDefinition",
"nodes": [],
"scope": 14,
"src": "75:19:1",
"usedErrors": []
}
],
"src": "0:95:1"
}

View File

@ -0,0 +1,43 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
2
]
},
"id": 3,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"documentation":
{
"id": 1,
"nodeType": "StructuredDocumentation",
"src": "0:27:1",
"text": "This contract is empty"
},
"fullyImplemented": true,
"id": 2,
"linearizedBaseContracts":
[
2
],
"name": "C",
"nameLocation": "37:1:1",
"nodeType": "ContractDefinition",
"nodes": [],
"scope": 3,
"src": "28:13:1",
"usedErrors": []
}
],
"src": "28:14:1"
}

View File

@ -0,0 +1,43 @@
{
"absolutePath": "b",
"exportedSymbols":
{
"C":
[
5
]
},
"id": 6,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"documentation":
{
"id": 4,
"nodeType": "StructuredDocumentation",
"src": "0:61:2",
"text": "This contract is empty\nand has a line-breaking comment."
},
"fullyImplemented": true,
"id": 5,
"linearizedBaseContracts":
[
5
],
"name": "C",
"nameLocation": "71:1:2",
"nodeType": "ContractDefinition",
"nodes": [],
"scope": 6,
"src": "62:13:2",
"usedErrors": []
}
],
"src": "62:14:2"
}

View File

@ -0,0 +1,179 @@
{
"absolutePath": "c",
"exportedSymbols":
{
"C":
[
23
]
},
"id": 24,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 23,
"linearizedBaseContracts":
[
23
],
"name": "C",
"nameLocation": "9:1:3",
"nodeType": "ContractDefinition",
"nodes":
[
{
"constant": false,
"documentation":
{
"id": 7,
"nodeType": "StructuredDocumentation",
"src": "15:32:3",
"text": "Some comment on state var."
},
"functionSelector": "c19d93fb",
"id": 9,
"mutability": "mutable",
"name": "state",
"nameLocation": "60:5:3",
"nodeType": "VariableDeclaration",
"scope": 23,
"src": "48:17:3",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 8,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "48:4:3",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "public"
},
{
"anonymous": false,
"documentation":
{
"id": 10,
"nodeType": "StructuredDocumentation",
"src": "69:26:3",
"text": "Some comment on Evt."
},
"eventSelector": "a69007916fc1145953e5a7032d7c3eab4b8e2f33ec59b0f71e732904eeede3a4",
"id": 12,
"name": "Evt",
"nameLocation": "102:3:3",
"nodeType": "EventDefinition",
"parameters":
{
"id": 11,
"nodeType": "ParameterList",
"parameters": [],
"src": "105:2:3"
},
"src": "96:12:3"
},
{
"body":
{
"id": 16,
"nodeType": "Block",
"src": "153:6:3",
"statements":
[
{
"id": 15,
"nodeType": "PlaceholderStatement",
"src": "155:1:3"
}
]
},
"documentation":
{
"id": 13,
"nodeType": "StructuredDocumentation",
"src": "111:26:3",
"text": "Some comment on mod."
},
"id": 17,
"name": "mod",
"nameLocation": "147:3:3",
"nodeType": "ModifierDefinition",
"parameters":
{
"id": 14,
"nodeType": "ParameterList",
"parameters": [],
"src": "150:2:3"
},
"src": "138:21:3",
"virtual": false,
"visibility": "internal"
},
{
"body":
{
"id": 21,
"nodeType": "Block",
"src": "209:2:3",
"statements": []
},
"documentation":
{
"id": 18,
"nodeType": "StructuredDocumentation",
"src": "162:25:3",
"text": "Some comment on fn."
},
"functionSelector": "a4a2c40b",
"id": 22,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "fn",
"nameLocation": "197:2:3",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 19,
"nodeType": "ParameterList",
"parameters": [],
"src": "199:2:3"
},
"returnParameters":
{
"id": 20,
"nodeType": "ParameterList",
"parameters": [],
"src": "209:0:3"
},
"scope": 23,
"src": "188:23:3",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 24,
"src": "0:213:3",
"usedErrors": []
}
],
"src": "0:214:3"
}

View File

@ -0,0 +1,491 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
41
]
},
"id": 42,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 41,
"linearizedBaseContracts":
[
41
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 26,
"nodeType": "Block",
"src": "42:330:1",
"statements":
[
{
"assignments":
[
5
],
"declarations":
[
{
"constant": false,
"id": 5,
"mutability": "mutable",
"name": "x",
"nameLocation": "114:1:1",
"nodeType": "VariableDeclaration",
"scope": 26,
"src": "109:6:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 4,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "109:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"documentation": "Documentation for x; will appear in ast json",
"id": 7,
"initialValue":
{
"hexValue": "31",
"id": 6,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "118:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"nodeType": "VariableDeclarationStatement",
"src": "109:10:1"
},
{
"body":
{
"id": 24,
"nodeType": "Block",
"src": "270:96:1",
"statements":
[
{
"assignments":
[
21
],
"declarations":
[
{
"constant": false,
"id": 21,
"mutability": "mutable",
"name": "j",
"nameLocation": "350:1:1",
"nodeType": "VariableDeclaration",
"scope": 24,
"src": "345:6:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 20,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "345:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"documentation": "documentation for j; will appear in ast json",
"id": 23,
"initialValue":
{
"hexValue": "30",
"id": 22,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "354:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "345:10:1"
}
]
},
"condition":
{
"commonType":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 15,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression":
{
"id": 13,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10,
"src": "236:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression":
{
"hexValue": "3130",
"id": 14,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "240:2:1",
"typeDescriptions":
{
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"src": "236:6:1",
"typeDescriptions":
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 25,
"initializationExpression":
{
"assignments":
[
10
],
"declarations":
[
{
"constant": false,
"id": 10,
"mutability": "mutable",
"name": "i",
"nameLocation": "217:1:1",
"nodeType": "VariableDeclaration",
"scope": 25,
"src": "212:6:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 9,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "212:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 12,
"initialValue":
{
"hexValue": "30",
"id": 11,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "221:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "212:10:1"
},
"loopExpression":
{
"expression":
{
"id": 17,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": true,
"src": "256:3:1",
"subExpression":
{
"id": 16,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10,
"src": "258:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 18,
"nodeType": "ExpressionStatement",
"src": "256:3:1"
},
"nodeType": "ForStatement",
"src": "129:237:1"
}
]
},
"functionSelector": "26121ff0",
"id": 27,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nameLocation": "26:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "27:2:1"
},
"returnParameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "42:0:1"
},
"scope": 41,
"src": "17:355:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "public"
},
{
"body":
{
"id": 39,
"nodeType": "Block",
"src": "662:2:1",
"statements": []
},
"functionSelector": "191157d1",
"id": 40,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "g",
"nameLocation": "386:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 37,
"nodeType": "ParameterList",
"parameters":
[
{
"constant": false,
"id": 30,
"mutability": "mutable",
"name": "param1",
"nameLocation": "468:6:1",
"nodeType": "VariableDeclaration",
"scope": 40,
"src": "463:11:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 29,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "463:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 33,
"mutability": "mutable",
"name": "param2",
"nameLocation": "555:6:1",
"nodeType": "VariableDeclaration",
"scope": 40,
"src": "550:11:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 32,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "550:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 36,
"mutability": "mutable",
"name": "param3",
"nameLocation": "642:6:1",
"nodeType": "VariableDeclaration",
"scope": 40,
"src": "637:11:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 35,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "637:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "387:267:1"
},
"returnParameters":
{
"id": 38,
"nodeType": "ParameterList",
"parameters": [],
"src": "662:0:1"
},
"scope": 41,
"src": "377:287:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 42,
"src": "0:666:1",
"usedErrors": []
}
],
"src": "0:667:1"
}

View File

@ -0,0 +1,376 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
27
]
},
"id": 28,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 27,
"linearizedBaseContracts":
[
27
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"constant": false,
"id": 2,
"mutability": "mutable",
"name": "a",
"nameLocation": "50:1:1",
"nodeType": "VariableDeclaration",
"scope": 27,
"src": "45:6:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 1,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "45:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"body":
{
"id": 25,
"nodeType": "Block",
"src": "99:229:1",
"statements":
[
{
"body":
{
"id": 21,
"nodeType": "Block",
"src": "156:66:1",
"statements":
[
{
"expression":
{
"id": 19,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide":
{
"id": 17,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "205:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "*=",
"rightHandSide":
{
"hexValue": "32",
"id": 18,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "210:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "205:6:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 20,
"nodeType": "ExpressionStatement",
"src": "205:6:1"
}
]
},
"condition":
{
"commonType":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 13,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression":
{
"id": 11,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 8,
"src": "143:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression":
{
"hexValue": "3230",
"id": 12,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "147:2:1",
"typeDescriptions":
{
"typeIdentifier": "t_rational_20_by_1",
"typeString": "int_const 20"
},
"value": "20"
},
"src": "143:6:1",
"typeDescriptions":
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 22,
"initializationExpression":
{
"assignments":
[
8
],
"declarations":
[
{
"constant": false,
"id": 8,
"mutability": "mutable",
"name": "i",
"nameLocation": "136:1:1",
"nodeType": "VariableDeclaration",
"scope": 22,
"src": "131:6:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 7,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "131:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 10,
"initialValue":
{
"hexValue": "30",
"id": 9,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "140:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "131:10:1"
},
"loopExpression":
{
"expression":
{
"id": 15,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "151:3:1",
"subExpression":
{
"id": 14,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 8,
"src": "151:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 16,
"nodeType": "ExpressionStatement",
"src": "151:3:1"
},
"nodeType": "ForStatement",
"src": "126:96:1"
},
{
"expression":
{
"id": 23,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5,
"src": "320:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 6,
"id": 24,
"nodeType": "Return",
"src": "313:8:1"
}
]
},
"functionSelector": "26121ff0",
"id": 26,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nameLocation": "66:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 3,
"nodeType": "ParameterList",
"parameters": [],
"src": "67:2:1"
},
"returnParameters":
{
"id": 6,
"nodeType": "ParameterList",
"parameters":
[
{
"constant": false,
"id": 5,
"mutability": "mutable",
"name": "x",
"nameLocation": "96:1:1",
"nodeType": "VariableDeclaration",
"scope": 26,
"src": "91:6:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 4,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "91:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "90:8:1"
},
"scope": 27,
"src": "57:271:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "public"
}
],
"scope": 28,
"src": "0:330:1",
"usedErrors": []
}
],
"src": "0:331:1"
}

View File

@ -0,0 +1,386 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
28
]
},
"id": 29,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 28,
"linearizedBaseContracts":
[
28
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"constant": false,
"documentation":
{
"id": 1,
"nodeType": "StructuredDocumentation",
"src": "17:8:1",
"text": "test"
},
"id": 3,
"mutability": "mutable",
"name": "a",
"nameLocation": "35:1:1",
"nodeType": "VariableDeclaration",
"scope": 28,
"src": "30:6:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 2,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "30:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"body":
{
"id": 26,
"nodeType": "Block",
"src": "84:181:1",
"statements":
[
{
"body":
{
"id": 22,
"nodeType": "Block",
"src": "142:75:1",
"statements":
[
{
"documentation": "tee\n s \"t\" 3",
"expression":
{
"id": 20,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide":
{
"id": 18,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6,
"src": "200:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "*=",
"rightHandSide":
{
"hexValue": "32",
"id": 19,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "205:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"src": "200:6:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 21,
"nodeType": "ExpressionStatement",
"src": "200:6:1"
}
]
},
"condition":
{
"commonType":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 14,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression":
{
"id": 12,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "129:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression":
{
"hexValue": "3230",
"id": 13,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "133:2:1",
"typeDescriptions":
{
"typeIdentifier": "t_rational_20_by_1",
"typeString": "int_const 20"
},
"value": "20"
},
"src": "129:6:1",
"typeDescriptions":
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"documentation": "test2",
"id": 23,
"initializationExpression":
{
"assignments":
[
9
],
"declarations":
[
{
"constant": false,
"id": 9,
"mutability": "mutable",
"name": "i",
"nameLocation": "122:1:1",
"nodeType": "VariableDeclaration",
"scope": 23,
"src": "117:6:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 8,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "117:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 11,
"initialValue":
{
"hexValue": "30",
"id": 10,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "126:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "117:10:1"
},
"loopExpression":
{
"expression":
{
"id": 16,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "137:3:1",
"subExpression":
{
"id": 15,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "137:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 17,
"nodeType": "ExpressionStatement",
"src": "137:3:1"
},
"nodeType": "ForStatement",
"src": "112:105:1"
},
{
"documentation": "tes \"t4\" ",
"expression":
{
"id": 24,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 6,
"src": "257:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"functionReturnParameters": 7,
"id": 25,
"nodeType": "Return",
"src": "250:8:1"
}
]
},
"functionSelector": "26121ff0",
"id": 27,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nameLocation": "51:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 4,
"nodeType": "ParameterList",
"parameters": [],
"src": "52:2:1"
},
"returnParameters":
{
"id": 7,
"nodeType": "ParameterList",
"parameters":
[
{
"constant": false,
"id": 6,
"mutability": "mutable",
"name": "x",
"nameLocation": "81:1:1",
"nodeType": "VariableDeclaration",
"scope": 27,
"src": "76:6:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 5,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "76:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "75:8:1"
},
"scope": 28,
"src": "42:223:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "public"
}
],
"scope": 29,
"src": "0:267:1",
"usedErrors": []
}
],
"src": "0:268:1"
}

View File

@ -0,0 +1,96 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
6
]
},
"id": 7,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 6,
"linearizedBaseContracts":
[
6
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 4,
"nodeType": "Block",
"src": "42:31:1",
"statements":
[
{
"AST":
{
"nodeType": "YulBlock",
"src": "61:6:1",
"statements":
[
{
"nodeType": "YulBlock",
"src": "63:2:1",
"statements": []
}
]
},
"evmVersion": "london",
"externalReferences": [],
"id": 3,
"nodeType": "InlineAssembly",
"src": "52:15:1"
}
]
},
"functionSelector": "e2179b8e",
"id": 5,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "g",
"nameLocation": "26:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "27:2:1"
},
"returnParameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "42:0:1"
},
"scope": 6,
"src": "17:56:1",
"stateMutability": "view",
"virtual": false,
"visibility": "public"
}
],
"scope": 7,
"src": "0:75:1",
"usedErrors": []
}
],
"src": "0:76:1"
}

View File

@ -0,0 +1,63 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
4
]
},
"id": 5,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 4,
"linearizedBaseContracts":
[
4
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"canonicalName": "C.E",
"id": 3,
"members":
[
{
"id": 1,
"name": "A",
"nameLocation": "22:1:1",
"nodeType": "EnumValue",
"src": "22:1:1"
},
{
"id": 2,
"name": "B",
"nameLocation": "25:1:1",
"nodeType": "EnumValue",
"src": "25:1:1"
}
],
"name": "E",
"nameLocation": "18:1:1",
"nodeType": "EnumDefinition",
"src": "13:15:1"
}
],
"scope": 5,
"src": "0:30:1",
"usedErrors": []
}
],
"src": "0:31:1"
}

View File

@ -0,0 +1,164 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"A":
[
3
],
"f":
[
13
]
},
"id": 14,
"nodeType": "SourceUnit",
"nodes":
[
{
"canonicalName": "A",
"id": 3,
"members":
[
{
"id": 1,
"name": "X",
"nameLocation": "9:1:1",
"nodeType": "EnumValue",
"src": "9:1:1"
},
{
"id": 2,
"name": "Y",
"nameLocation": "12:1:1",
"nodeType": "EnumValue",
"src": "12:1:1"
}
],
"name": "A",
"nameLocation": "5:1:1",
"nodeType": "EnumDefinition",
"src": "0:15:1"
},
{
"body":
{
"id": 12,
"nodeType": "Block",
"src": "46:15:1",
"statements":
[
{
"expression":
{
"expression":
{
"id": 9,
"name": "A",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3,
"src": "55:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_type$_t_enum$_A_$3_$",
"typeString": "type(enum A)"
}
},
"id": 10,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "57:1:1",
"memberName": "X",
"nodeType": "MemberAccess",
"referencedDeclaration": 1,
"src": "55:3:1",
"typeDescriptions":
{
"typeIdentifier": "t_enum$_A_$3",
"typeString": "enum A"
}
},
"functionReturnParameters": 8,
"id": 11,
"nodeType": "Return",
"src": "48:10:1"
}
]
},
"id": 13,
"implemented": true,
"kind": "freeFunction",
"modifiers": [],
"name": "f",
"nameLocation": "25:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 4,
"nodeType": "ParameterList",
"parameters": [],
"src": "26:2:1"
},
"returnParameters":
{
"id": 8,
"nodeType": "ParameterList",
"parameters":
[
{
"constant": false,
"id": 7,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 13,
"src": "43:1:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_enum$_A_$3",
"typeString": "enum A"
},
"typeName":
{
"id": 6,
"nodeType": "UserDefinedTypeName",
"pathNode":
{
"id": 5,
"name": "A",
"nameLocations":
[
"43:1:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 3,
"src": "43:1:1"
},
"referencedDeclaration": 3,
"src": "43:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_enum$_A_$3",
"typeString": "enum A"
}
},
"visibility": "internal"
}
],
"src": "42:3:1"
},
"scope": 14,
"src": "16:45:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
}
],
"src": "0:62:1"
}

View File

@ -0,0 +1,54 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
3
]
},
"id": 4,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 3,
"linearizedBaseContracts":
[
3
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"anonymous": false,
"eventSelector": "92bbf6e823a631f3c8e09b1c8df90f378fb56f7fbc9701827e1ff8aad7f6a028",
"id": 2,
"name": "E",
"nameLocation": "19:1:1",
"nodeType": "EventDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "20:2:1"
},
"src": "13:10:1"
}
],
"scope": 4,
"src": "0:25:1",
"usedErrors": []
}
],
"src": "0:26:1"
}

View File

@ -0,0 +1,73 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
5
]
},
"id": 6,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 5,
"linearizedBaseContracts":
[
5
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 3,
"nodeType": "Block",
"src": "43:5:1",
"statements": []
},
"id": 4,
"implemented": true,
"kind": "fallback",
"modifiers": [],
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "23:2:1"
},
"returnParameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "43:0:1"
},
"scope": 5,
"src": "15:33:1",
"stateMutability": "payable",
"virtual": false,
"visibility": "external"
}
],
"scope": 6,
"src": "0:50:1",
"usedErrors": []
}
],
"src": "0:51:1"
}

View File

@ -0,0 +1,108 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
9
]
},
"id": 10,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 9,
"linearizedBaseContracts":
[
9
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 3,
"nodeType": "Block",
"src": "42:5:1",
"statements": []
},
"id": 4,
"implemented": true,
"kind": "receive",
"modifiers": [],
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "22:2:1"
},
"returnParameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "42:0:1"
},
"scope": 9,
"src": "15:32:1",
"stateMutability": "payable",
"virtual": false,
"visibility": "external"
},
{
"body":
{
"id": 7,
"nodeType": "Block",
"src": "78:5:1",
"statements": []
},
"id": 8,
"implemented": true,
"kind": "fallback",
"modifiers": [],
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 5,
"nodeType": "ParameterList",
"parameters": [],
"src": "58:2:1"
},
"returnParameters":
{
"id": 6,
"nodeType": "ParameterList",
"parameters": [],
"src": "78:0:1"
},
"scope": 9,
"src": "50:33:1",
"stateMutability": "payable",
"virtual": false,
"visibility": "external"
}
],
"scope": 10,
"src": "0:85:1",
"usedErrors": []
}
],
"src": "0:86:1"
}

View File

@ -0,0 +1,73 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
5
]
},
"id": 6,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 5,
"linearizedBaseContracts":
[
5
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 3,
"nodeType": "Block",
"src": "34:2:1",
"statements": []
},
"id": 4,
"implemented": true,
"kind": "fallback",
"modifiers": [],
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "22:2:1"
},
"returnParameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "34:0:1"
},
"scope": 5,
"src": "14:22:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
}
],
"scope": 6,
"src": "0:38:1",
"usedErrors": []
}
],
"src": "0:39:1"
}

View File

@ -0,0 +1,158 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
6
]
},
"id": 7,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 6,
"linearizedBaseContracts":
[
6
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 4,
"nodeType": "Block",
"src": "42:68:1",
"statements":
[
{
"AST":
{
"nodeType": "YulBlock",
"src": "61:43:1",
"statements":
[
{
"body":
{
"nodeType": "YulBlock",
"src": "76:22:1",
"statements":
[
{
"expression":
{
"arguments":
[
{
"arguments":
[
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "92:2:1",
"type": "",
"value": "20"
}
],
"functionName":
{
"name": "blockhash",
"nodeType": "YulIdentifier",
"src": "82:9:1"
},
"nodeType": "YulFunctionCall",
"src": "82:13:1"
}
],
"functionName":
{
"name": "pop",
"nodeType": "YulIdentifier",
"src": "78:3:1"
},
"nodeType": "YulFunctionCall",
"src": "78:18:1"
},
"nodeType": "YulExpressionStatement",
"src": "78:18:1"
}
]
},
"name": "g",
"nodeType": "YulFunctionDefinition",
"src": "63:35:1"
},
{
"expression":
{
"arguments": [],
"functionName":
{
"name": "g",
"nodeType": "YulIdentifier",
"src": "99:1:1"
},
"nodeType": "YulFunctionCall",
"src": "99:3:1"
},
"nodeType": "YulExpressionStatement",
"src": "99:3:1"
}
]
},
"evmVersion": "london",
"externalReferences": [],
"id": 3,
"nodeType": "InlineAssembly",
"src": "52:52:1"
}
]
},
"functionSelector": "b8c9d365",
"id": 5,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "h",
"nameLocation": "26:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "27:2:1"
},
"returnParameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "42:0:1"
},
"scope": 6,
"src": "17:93:1",
"stateMutability": "view",
"virtual": false,
"visibility": "public"
}
],
"scope": 7,
"src": "0:112:1",
"usedErrors": []
}
],
"src": "0:113:1"
}

View File

@ -0,0 +1,232 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
17
]
},
"id": 18,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 17,
"linearizedBaseContracts":
[
17
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 15,
"nodeType": "Block",
"src": "127:2:1",
"statements": []
},
"functionSelector": "d6cd4974",
"id": 16,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nameLocation": "22:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 7,
"nodeType": "ParameterList",
"parameters":
[
{
"constant": false,
"id": 6,
"mutability": "mutable",
"name": "x",
"nameLocation": "67:1:1",
"nodeType": "VariableDeclaration",
"scope": 16,
"src": "24:44:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_function_external_payable$__$returns$_t_uint256_$",
"typeString": "function () payable external returns (uint256)"
},
"typeName":
{
"id": 5,
"nodeType": "FunctionTypeName",
"parameterTypes":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "32:2:1"
},
"returnParameterTypes":
{
"id": 4,
"nodeType": "ParameterList",
"parameters":
[
{
"constant": false,
"id": 3,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 5,
"src": "61:4:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 2,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "61:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "60:6:1"
},
"src": "24:44:1",
"stateMutability": "payable",
"typeDescriptions":
{
"typeIdentifier": "t_function_external_payable$__$returns$_t_uint256_$",
"typeString": "function () payable external returns (uint256)"
},
"visibility": "external"
},
"visibility": "internal"
}
],
"src": "23:46:1"
},
"returnParameters":
{
"id": 14,
"nodeType": "ParameterList",
"parameters":
[
{
"constant": false,
"id": 13,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 16,
"src": "86:40:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
"typeString": "function () view external returns (uint256)"
},
"typeName":
{
"id": 12,
"nodeType": "FunctionTypeName",
"parameterTypes":
{
"id": 8,
"nodeType": "ParameterList",
"parameters": [],
"src": "94:2:1"
},
"returnParameterTypes":
{
"id": 11,
"nodeType": "ParameterList",
"parameters":
[
{
"constant": false,
"id": 10,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 12,
"src": "120:4:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 9,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "120:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "119:6:1"
},
"src": "86:40:1",
"stateMutability": "view",
"typeDescriptions":
{
"typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
"typeString": "function () view external returns (uint256)"
},
"visibility": "external"
},
"visibility": "internal"
}
],
"src": "85:41:1"
},
"scope": 17,
"src": "13:116:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 18,
"src": "0:131:1",
"usedErrors": []
}
],
"src": "0:132:1"
}

View File

@ -0,0 +1,34 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"E":
[
2
]
},
"id": 3,
"nodeType": "SourceUnit",
"nodes":
[
{
"canonicalName": "E",
"id": 2,
"members":
[
{
"id": 1,
"name": "A",
"nameLocation": "9:1:1",
"nodeType": "EnumValue",
"src": "9:1:1"
}
],
"name": "E",
"nameLocation": "5:1:1",
"nodeType": "EnumDefinition",
"src": "0:12:1"
}
],
"src": "0:13:1"
}

View File

@ -0,0 +1,59 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"S":
[
3
]
},
"id": 4,
"nodeType": "SourceUnit",
"nodes":
[
{
"canonicalName": "S",
"id": 3,
"members":
[
{
"constant": false,
"id": 2,
"mutability": "mutable",
"name": "a",
"nameLocation": "19:1:1",
"nodeType": "VariableDeclaration",
"scope": 3,
"src": "11:9:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 1,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "11:7:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"name": "S",
"nameLocation": "7:1:1",
"nodeType": "StructDefinition",
"scope": 4,
"src": "0:23:1",
"visibility": "public"
}
],
"src": "0:24:1"
}

View File

@ -0,0 +1,80 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C1":
[
1
],
"C2":
[
4
]
},
"id": 5,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C1",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 1,
"linearizedBaseContracts":
[
1
],
"name": "C1",
"nameLocation": "9:2:1",
"nodeType": "ContractDefinition",
"nodes": [],
"scope": 5,
"src": "0:14:1",
"usedErrors": []
},
{
"abstract": false,
"baseContracts":
[
{
"baseName":
{
"id": 2,
"name": "C1",
"nameLocations":
[
"30:2:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 1,
"src": "30:2:1"
},
"id": 3,
"nodeType": "InheritanceSpecifier",
"src": "30:2:1"
}
],
"canonicalName": "C2",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 4,
"linearizedBaseContracts":
[
4,
1
],
"name": "C2",
"nameLocation": "24:2:1",
"nodeType": "ContractDefinition",
"nodes": [],
"scope": 5,
"src": "15:20:1",
"usedErrors": []
}
],
"src": "0:36:1"
}

View File

@ -0,0 +1,108 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
6
]
},
"id": 7,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 6,
"linearizedBaseContracts":
[
6
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 4,
"nodeType": "Block",
"src": "37:51:1",
"statements":
[
{
"AST":
{
"nodeType": "YulBlock",
"src": "56:26:1",
"statements":
[
{
"body":
{
"nodeType": "YulBlock",
"src": "71:9:1",
"statements":
[
{
"nodeType": "YulLeave",
"src": "73:5:1"
}
]
},
"name": "f",
"nodeType": "YulFunctionDefinition",
"src": "58:22:1"
}
]
},
"evmVersion": "london",
"externalReferences": [],
"id": 3,
"nodeType": "InlineAssembly",
"src": "47:35:1"
}
]
},
"functionSelector": "ece866b9",
"id": 5,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "l",
"nameLocation": "26:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "27:2:1"
},
"returnParameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "37:0:1"
},
"scope": 6,
"src": "17:71:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 7,
"src": "0:90:1",
"usedErrors": []
}
],
"src": "0:91:1"
}

View File

@ -0,0 +1,37 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
1
]
},
"id": 2,
"license": "GPL-3.0",
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 1,
"linearizedBaseContracts":
[
1
],
"name": "C",
"nameLocation": "45:1:1",
"nodeType": "ContractDefinition",
"nodes": [],
"scope": 2,
"src": "36:13:1",
"usedErrors": []
}
],
"src": "36:14:1"
}

View File

@ -0,0 +1,175 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"c":
[
11
]
},
"id": 12,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "c",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 11,
"linearizedBaseContracts":
[
11
],
"name": "c",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 9,
"nodeType": "Block",
"src": "33:19:1",
"statements":
[
{
"assignments":
[
4
],
"declarations":
[
{
"constant": false,
"id": 4,
"mutability": "mutable",
"name": "a",
"nameLocation": "40:1:1",
"nodeType": "VariableDeclaration",
"scope": 9,
"src": "35:6:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 3,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "35:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 8,
"initialValue":
{
"commonType":
{
"typeIdentifier": "t_rational_5_by_1",
"typeString": "int_const 5"
},
"id": 7,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression":
{
"hexValue": "32",
"id": 5,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "44:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"nodeType": "BinaryOperation",
"operator": "+",
"rightExpression":
{
"hexValue": "33",
"id": 6,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "48:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_rational_3_by_1",
"typeString": "int_const 3"
},
"value": "3"
},
"src": "44:5:1",
"typeDescriptions":
{
"typeIdentifier": "t_rational_5_by_1",
"typeString": "int_const 5"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "35:14:1"
}
]
},
"functionSelector": "26121ff0",
"id": 10,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nameLocation": "22:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "23:2:1"
},
"returnParameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "33:0:1"
},
"scope": 11,
"src": "13:39:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 12,
"src": "0:54:1",
"usedErrors": []
}
],
"src": "0:55:1"
}

View File

@ -0,0 +1,184 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"c":
[
15
]
},
"id": 16,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "c",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 15,
"linearizedBaseContracts":
[
15
],
"name": "c",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"constant": false,
"id": 3,
"mutability": "mutable",
"name": "a",
"nameLocation": "20:1:1",
"nodeType": "VariableDeclaration",
"scope": 15,
"src": "13:8:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[]"
},
"typeName":
{
"baseType":
{
"id": 1,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "13:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 2,
"nodeType": "ArrayTypeName",
"src": "13:6:1",
"typeDescriptions":
{
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"visibility": "internal"
},
{
"body":
{
"id": 13,
"nodeType": "Block",
"src": "43:25:1",
"statements":
[
{
"assignments":
[
10
],
"declarations":
[
{
"constant": false,
"id": 10,
"mutability": "mutable",
"name": "b",
"nameLocation": "60:1:1",
"nodeType": "VariableDeclaration",
"scope": 13,
"src": "45:16:1",
"stateVariable": false,
"storageLocation": "storage",
"typeDescriptions":
{
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
},
"typeName":
{
"baseType":
{
"id": 8,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "45:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 9,
"nodeType": "ArrayTypeName",
"src": "45:6:1",
"typeDescriptions":
{
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"visibility": "internal"
}
],
"id": 12,
"initialValue":
{
"id": 11,
"name": "a",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3,
"src": "64:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_array$_t_uint256_$dyn_storage",
"typeString": "uint256[] storage ref"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "45:20:1"
}
]
},
"functionSelector": "26121ff0",
"id": 14,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nameLocation": "32:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 4,
"nodeType": "ParameterList",
"parameters": [],
"src": "33:2:1"
},
"returnParameters":
{
"id": 5,
"nodeType": "ParameterList",
"parameters": [],
"src": "43:0:1"
},
"scope": 15,
"src": "23:45:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 16,
"src": "0:70:1",
"usedErrors": []
}
],
"src": "0:71:1"
}

View File

@ -0,0 +1,171 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
6
]
},
"id": 7,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 6,
"linearizedBaseContracts":
[
6
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 4,
"nodeType": "Block",
"src": "42:74:1",
"statements":
[
{
"AST":
{
"nodeType": "YulBlock",
"src": "61:49:1",
"statements":
[
{
"body":
{
"nodeType": "YulBlock",
"src": "90:18:1",
"statements":
[
{
"nodeType": "YulBreak",
"src": "92:5:1"
},
{
"nodeType": "YulContinue",
"src": "98:8:1"
}
]
},
"condition":
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "70:1:1",
"type": "",
"value": "1"
},
"nodeType": "YulForLoop",
"post":
{
"nodeType": "YulBlock",
"src": "72:17:1",
"statements":
[
{
"expression":
{
"arguments":
[
{
"arguments":
[
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "84:1:1",
"type": "",
"value": "0"
}
],
"functionName":
{
"name": "sload",
"nodeType": "YulIdentifier",
"src": "78:5:1"
},
"nodeType": "YulFunctionCall",
"src": "78:8:1"
}
],
"functionName":
{
"name": "pop",
"nodeType": "YulIdentifier",
"src": "74:3:1"
},
"nodeType": "YulFunctionCall",
"src": "74:13:1"
},
"nodeType": "YulExpressionStatement",
"src": "74:13:1"
}
]
},
"pre":
{
"nodeType": "YulBlock",
"src": "67:2:1",
"statements": []
},
"src": "63:45:1"
}
]
},
"evmVersion": "london",
"externalReferences": [],
"id": 3,
"nodeType": "InlineAssembly",
"src": "52:58:1"
}
]
},
"functionSelector": "e2179b8e",
"id": 5,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "g",
"nameLocation": "26:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "27:2:1"
},
"returnParameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "42:0:1"
},
"scope": 6,
"src": "17:99:1",
"stateMutability": "view",
"virtual": false,
"visibility": "public"
}
],
"scope": 7,
"src": "0:118:1",
"usedErrors": []
}
],
"src": "0:119:1"
}

View File

@ -0,0 +1,253 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
19
]
},
"id": 20,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 19,
"linearizedBaseContracts":
[
19
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"canonicalName": "C.E",
"id": 4,
"members":
[
{
"id": 1,
"name": "A",
"nameLocation": "26:1:1",
"nodeType": "EnumValue",
"src": "26:1:1"
},
{
"id": 2,
"name": "B",
"nameLocation": "29:1:1",
"nodeType": "EnumValue",
"src": "29:1:1"
},
{
"id": 3,
"name": "C",
"nameLocation": "32:1:1",
"nodeType": "EnumValue",
"src": "32:1:1"
}
],
"name": "E",
"nameLocation": "22:1:1",
"nodeType": "EnumDefinition",
"src": "17:18:1"
},
{
"constant": false,
"id": 9,
"mutability": "mutable",
"name": "a",
"nameLocation": "59:1:1",
"nodeType": "VariableDeclaration",
"scope": 19,
"src": "40:20:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_mapping$_t_contract$_C_$19_$_t_bool_$",
"typeString": "mapping(contract C => bool)"
},
"typeName":
{
"id": 8,
"keyType":
{
"id": 6,
"nodeType": "UserDefinedTypeName",
"pathNode":
{
"id": 5,
"name": "C",
"nameLocations":
[
"48:1:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 19,
"src": "48:1:1"
},
"referencedDeclaration": 19,
"src": "48:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_contract$_C_$19",
"typeString": "contract C"
}
},
"nodeType": "Mapping",
"src": "40:18:1",
"typeDescriptions":
{
"typeIdentifier": "t_mapping$_t_contract$_C_$19_$_t_bool_$",
"typeString": "mapping(contract C => bool)"
},
"valueType":
{
"id": 7,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "53:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 13,
"mutability": "mutable",
"name": "b",
"nameLocation": "91:1:1",
"nodeType": "VariableDeclaration",
"scope": 19,
"src": "66:26:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"typeName":
{
"id": 12,
"keyType":
{
"id": 10,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "74:7:1",
"typeDescriptions":
{
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "66:24:1",
"typeDescriptions":
{
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"valueType":
{
"id": 11,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "85:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 18,
"mutability": "mutable",
"name": "c",
"nameLocation": "117:1:1",
"nodeType": "VariableDeclaration",
"scope": 19,
"src": "98:20:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_mapping$_t_enum$_E_$4_$_t_bool_$",
"typeString": "mapping(enum C.E => bool)"
},
"typeName":
{
"id": 17,
"keyType":
{
"id": 15,
"nodeType": "UserDefinedTypeName",
"pathNode":
{
"id": 14,
"name": "E",
"nameLocations":
[
"106:1:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4,
"src": "106:1:1"
},
"referencedDeclaration": 4,
"src": "106:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_enum$_E_$4",
"typeString": "enum C.E"
}
},
"nodeType": "Mapping",
"src": "98:18:1",
"typeDescriptions":
{
"typeIdentifier": "t_mapping$_t_enum$_E_$4_$_t_bool_$",
"typeString": "mapping(enum C.E => bool)"
},
"valueType":
{
"id": 16,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "111:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
},
"visibility": "internal"
}
],
"scope": 20,
"src": "0:121:1",
"usedErrors": []
}
],
"src": "0:122:1"
}

View File

@ -0,0 +1,176 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
14
]
},
"id": 15,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 14,
"linearizedBaseContracts":
[
14
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 5,
"nodeType": "Block",
"src": "32:6:1",
"statements":
[
{
"id": 4,
"nodeType": "PlaceholderStatement",
"src": "34:1:1"
}
]
},
"id": 6,
"name": "M",
"nameLocation": "22:1:1",
"nodeType": "ModifierDefinition",
"parameters":
{
"id": 3,
"nodeType": "ParameterList",
"parameters":
[
{
"constant": false,
"id": 2,
"mutability": "mutable",
"name": "i",
"nameLocation": "29:1:1",
"nodeType": "VariableDeclaration",
"scope": 6,
"src": "24:6:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 1,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "24:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "23:8:1"
},
"src": "13:25:1",
"virtual": false,
"visibility": "internal"
},
{
"body":
{
"id": 12,
"nodeType": "Block",
"src": "64:2:1",
"statements": []
},
"functionSelector": "28811f59",
"id": 13,
"implemented": true,
"kind": "function",
"modifiers":
[
{
"arguments":
[
{
"hexValue": "31",
"id": 9,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "54:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
}
],
"id": 10,
"kind": "modifierInvocation",
"modifierName":
{
"id": 8,
"name": "M",
"nameLocations":
[
"52:1:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 6,
"src": "52:1:1"
},
"nodeType": "ModifierInvocation",
"src": "52:4:1"
}
],
"name": "F",
"nameLocation": "48:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 7,
"nodeType": "ParameterList",
"parameters": [],
"src": "49:2:1"
},
"returnParameters":
{
"id": 11,
"nodeType": "ParameterList",
"parameters": [],
"src": "64:0:1"
},
"scope": 14,
"src": "39:27:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 15,
"src": "0:68:1",
"usedErrors": []
}
],
"src": "0:69:1"
}

View File

@ -0,0 +1,176 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
14
]
},
"id": 15,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 14,
"linearizedBaseContracts":
[
14
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 5,
"nodeType": "Block",
"src": "32:6:1",
"statements":
[
{
"id": 4,
"nodeType": "PlaceholderStatement",
"src": "34:1:1"
}
]
},
"id": 6,
"name": "M",
"nameLocation": "22:1:1",
"nodeType": "ModifierDefinition",
"parameters":
{
"id": 3,
"nodeType": "ParameterList",
"parameters":
[
{
"constant": false,
"id": 2,
"mutability": "mutable",
"name": "i",
"nameLocation": "29:1:1",
"nodeType": "VariableDeclaration",
"scope": 6,
"src": "24:6:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 1,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "24:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "23:8:1"
},
"src": "13:25:1",
"virtual": false,
"visibility": "internal"
},
{
"body":
{
"id": 12,
"nodeType": "Block",
"src": "64:2:1",
"statements": []
},
"functionSelector": "28811f59",
"id": 13,
"implemented": true,
"kind": "function",
"modifiers":
[
{
"arguments":
[
{
"hexValue": "31",
"id": 9,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "54:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
}
],
"id": 10,
"kind": "modifierInvocation",
"modifierName":
{
"id": 8,
"name": "M",
"nameLocations":
[
"52:1:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 6,
"src": "52:1:1"
},
"nodeType": "ModifierInvocation",
"src": "52:4:1"
}
],
"name": "F",
"nameLocation": "48:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 7,
"nodeType": "ParameterList",
"parameters": [],
"src": "49:2:1"
},
"returnParameters":
{
"id": 11,
"nodeType": "ParameterList",
"parameters": [],
"src": "64:0:1"
},
"scope": 14,
"src": "39:27:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 15,
"src": "0:68:1",
"usedErrors": []
}
],
"src": "0:69:1"
}

View File

@ -0,0 +1,185 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
10
]
},
"id": 11,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 10,
"linearizedBaseContracts":
[
10
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"constant": false,
"functionSelector": "0dbe671f",
"id": 3,
"mutability": "immutable",
"name": "a",
"nameLocation": "39:1:1",
"nodeType": "VariableDeclaration",
"scope": 10,
"src": "17:27:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 1,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "17:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value":
{
"hexValue": "34",
"id": 2,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "43:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
},
"value": "4"
},
"visibility": "public"
},
{
"constant": true,
"functionSelector": "4df7e3d0",
"id": 6,
"mutability": "constant",
"name": "b",
"nameLocation": "71:1:1",
"nodeType": "VariableDeclaration",
"scope": 10,
"src": "50:26:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 4,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "50:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value":
{
"hexValue": "32",
"id": 5,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "75:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"visibility": "public"
},
{
"constant": false,
"functionSelector": "c3da42b8",
"id": 9,
"mutability": "mutable",
"name": "c",
"nameLocation": "94:1:1",
"nodeType": "VariableDeclaration",
"scope": 10,
"src": "82:17:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 7,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "82:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value":
{
"hexValue": "33",
"id": 8,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "98:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_rational_3_by_1",
"typeString": "int_const 3"
},
"value": "3"
},
"visibility": "public"
}
],
"scope": 11,
"src": "0:102:1",
"usedErrors": []
}
],
"src": "0:103:1"
}

View File

@ -0,0 +1,176 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
8
]
},
"id": 9,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 8,
"linearizedBaseContracts":
[
8
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 6,
"nodeType": "Block",
"src": "57:95:1",
"statements":
[
{
"AST":
{
"nodeType": "YulBlock",
"src": "72:76:1",
"statements":
[
{
"body":
{
"nodeType": "YulBlock",
"src": "94:35:1",
"statements":
[
{
"body":
{
"nodeType": "YulBlock",
"src": "118:3:1",
"statements": []
},
"name": "f2",
"nodeType": "YulFunctionDefinition",
"src": "104:17:1"
}
]
},
"name": "f1",
"nodeType": "YulFunctionDefinition",
"src": "80:49:1"
},
{
"nodeType": "YulAssignment",
"src": "136:6:1",
"value":
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "141:1:1",
"type": "",
"value": "2"
},
"variableNames":
[
{
"name": "x",
"nodeType": "YulIdentifier",
"src": "136:1:1"
}
]
}
]
},
"evmVersion": "london",
"externalReferences":
[
{
"declaration": 3,
"isOffset": false,
"isSlot": false,
"src": "136:1:1",
"valueSize": 1
}
],
"id": 5,
"nodeType": "InlineAssembly",
"src": "63:85:1"
}
]
},
"functionSelector": "26121ff0",
"id": 7,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nameLocation": "24:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "25:2:1"
},
"returnParameters":
{
"id": 4,
"nodeType": "ParameterList",
"parameters":
[
{
"constant": false,
"id": 3,
"mutability": "mutable",
"name": "x",
"nameLocation": "54:1:1",
"nodeType": "VariableDeclaration",
"scope": 7,
"src": "49:6:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 2,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "49:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "48:8:1"
},
"scope": 8,
"src": "15:137:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "public"
}
],
"scope": 9,
"src": "0:154:1",
"usedErrors": []
}
],
"src": "0:155:1"
}

View File

@ -0,0 +1,237 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
15
]
},
"id": 16,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 15,
"linearizedBaseContracts":
[
15
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 13,
"nodeType": "Block",
"src": "33:45:1",
"statements":
[
{
"assignments":
[
4
],
"declarations":
[
{
"constant": false,
"id": 4,
"mutability": "mutable",
"name": "x",
"nameLocation": "49:1:1",
"nodeType": "VariableDeclaration",
"scope": 13,
"src": "35:15:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions":
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName":
{
"id": 3,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "35:6:1",
"typeDescriptions":
{
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"id": 12,
"initialValue":
{
"arguments":
[
{
"arguments":
[
{
"hexValue": "ff",
"id": 9,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "hexString",
"lValueRequested": false,
"nodeType": "Literal",
"src": "66:7:1",
"typeDescriptions":
{
"typeIdentifier": "t_stringliteral_8b1a944cf13a9a1c08facb2c9e98623ef3254d2ddb48113885c3e8e97fec8db9",
"typeString": "literal_string hex\"ff\""
}
}
],
"expression":
{
"argumentTypes":
[
{
"typeIdentifier": "t_stringliteral_8b1a944cf13a9a1c08facb2c9e98623ef3254d2ddb48113885c3e8e97fec8db9",
"typeString": "literal_string hex\"ff\""
}
],
"id": 8,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "60:5:1",
"typeDescriptions":
{
"typeIdentifier": "t_type$_t_bytes_storage_ptr_$",
"typeString": "type(bytes storage pointer)"
},
"typeName":
{
"id": 7,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "60:5:1",
"typeDescriptions": {}
}
},
"id": 10,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "60:14:1",
"tryCall": false,
"typeDescriptions":
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression":
{
"argumentTypes":
[
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 6,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "53:6:1",
"typeDescriptions":
{
"typeIdentifier": "t_type$_t_string_storage_ptr_$",
"typeString": "type(string storage pointer)"
},
"typeName":
{
"id": 5,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "53:6:1",
"typeDescriptions": {}
}
},
"id": 11,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "53:22:1",
"tryCall": false,
"typeDescriptions":
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "35:40:1"
}
]
},
"functionSelector": "26121ff0",
"id": 14,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nameLocation": "22:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "23:2:1"
},
"returnParameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "33:0:1"
},
"scope": 15,
"src": "13:65:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 16,
"src": "0:80:1",
"usedErrors": []
}
],
"src": "0:81:1"
}

View File

@ -0,0 +1,337 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"A":
[
5
],
"B":
[
16
],
"C":
[
29
]
},
"id": 30,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "A",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 5,
"linearizedBaseContracts":
[
5
],
"name": "A",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 3,
"nodeType": "Block",
"src": "44:2:1",
"statements": []
},
"functionSelector": "a399b6a2",
"id": 4,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "faa",
"nameLocation": "23:3:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "26:2:1"
},
"returnParameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "44:0:1"
},
"scope": 5,
"src": "14:32:1",
"stateMutability": "nonpayable",
"virtual": true,
"visibility": "public"
}
],
"scope": 30,
"src": "0:48:1",
"usedErrors": []
},
{
"abstract": true,
"baseContracts":
[
{
"baseName":
{
"id": 6,
"name": "A",
"nameLocations":
[
"72:1:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 5,
"src": "72:1:1"
},
"id": 7,
"nodeType": "InheritanceSpecifier",
"src": "72:1:1"
}
],
"canonicalName": "B",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": false,
"id": 16,
"linearizedBaseContracts":
[
16,
5
],
"name": "B",
"nameLocation": "67:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"functionSelector": "c2985578",
"id": 10,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "foo",
"nameLocation": "86:3:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 8,
"nodeType": "ParameterList",
"parameters": [],
"src": "89:2:1"
},
"returnParameters":
{
"id": 9,
"nodeType": "ParameterList",
"parameters": [],
"src": "106:0:1"
},
"scope": 16,
"src": "77:30:1",
"stateMutability": "nonpayable",
"virtual": true,
"visibility": "public"
},
{
"baseFunctions":
[
4
],
"body":
{
"id": 14,
"nodeType": "Block",
"src": "148:2:1",
"statements": []
},
"functionSelector": "a399b6a2",
"id": 15,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "faa",
"nameLocation": "118:3:1",
"nodeType": "FunctionDefinition",
"overrides":
{
"id": 12,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "139:8:1"
},
"parameters":
{
"id": 11,
"nodeType": "ParameterList",
"parameters": [],
"src": "121:2:1"
},
"returnParameters":
{
"id": 13,
"nodeType": "ParameterList",
"parameters": [],
"src": "148:0:1"
},
"scope": 16,
"src": "109:41:1",
"stateMutability": "nonpayable",
"virtual": true,
"visibility": "public"
}
],
"scope": 30,
"src": "49:103:1",
"usedErrors": []
},
{
"abstract": false,
"baseContracts":
[
{
"baseName":
{
"id": 17,
"name": "B",
"nameLocations":
[
"167:1:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 16,
"src": "167:1:1"
},
"id": 18,
"nodeType": "InheritanceSpecifier",
"src": "167:1:1"
}
],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 29,
"linearizedBaseContracts":
[
29,
16,
5
],
"name": "C",
"nameLocation": "162:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"baseFunctions":
[
10
],
"body":
{
"id": 22,
"nodeType": "Block",
"src": "203:3:1",
"statements": []
},
"functionSelector": "c2985578",
"id": 23,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "foo",
"nameLocation": "181:3:1",
"nodeType": "FunctionDefinition",
"overrides":
{
"id": 20,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "194:8:1"
},
"parameters":
{
"id": 19,
"nodeType": "ParameterList",
"parameters": [],
"src": "184:2:1"
},
"returnParameters":
{
"id": 21,
"nodeType": "ParameterList",
"parameters": [],
"src": "203:0:1"
},
"scope": 29,
"src": "172:34:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"baseFunctions":
[
15
],
"body":
{
"id": 27,
"nodeType": "Block",
"src": "239:3:1",
"statements": []
},
"functionSelector": "a399b6a2",
"id": 28,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "faa",
"nameLocation": "217:3:1",
"nodeType": "FunctionDefinition",
"overrides":
{
"id": 25,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "230:8:1"
},
"parameters":
{
"id": 24,
"nodeType": "ParameterList",
"parameters": [],
"src": "220:2:1"
},
"returnParameters":
{
"id": 26,
"nodeType": "ParameterList",
"parameters": [],
"src": "239:0:1"
},
"scope": 29,
"src": "208:34:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 30,
"src": "153:91:1",
"usedErrors": []
}
],
"src": "0:245:1"
}

View File

@ -0,0 +1,68 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
5
]
},
"id": 6,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 5,
"linearizedBaseContracts":
[
5
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 3,
"nodeType": "Block",
"src": "24:6:1",
"statements":
[
{
"id": 2,
"nodeType": "PlaceholderStatement",
"src": "26:1:1"
}
]
},
"id": 4,
"name": "M",
"nameLocation": "22:1:1",
"nodeType": "ModifierDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "24:0:1"
},
"src": "13:17:1",
"virtual": false,
"visibility": "internal"
}
],
"scope": 6,
"src": "0:32:1",
"usedErrors": []
}
],
"src": "0:33:1"
}

View File

@ -0,0 +1,73 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
5
]
},
"id": 6,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 5,
"linearizedBaseContracts":
[
5
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 3,
"nodeType": "Block",
"src": "42:5:1",
"statements": []
},
"id": 4,
"implemented": true,
"kind": "receive",
"modifiers": [],
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "22:2:1"
},
"returnParameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "42:0:1"
},
"scope": 5,
"src": "15:32:1",
"stateMutability": "payable",
"virtual": false,
"visibility": "external"
}
],
"scope": 6,
"src": "0:49:1",
"usedErrors": []
}
],
"src": "0:50:1"
}

View File

@ -0,0 +1,129 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"c":
[
11
]
},
"id": 12,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "c",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 11,
"linearizedBaseContracts":
[
11
],
"name": "c",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 9,
"nodeType": "Block",
"src": "33:20:1",
"statements":
[
{
"assignments":
[
7
],
"declarations":
[
{
"constant": false,
"id": 7,
"mutability": "mutable",
"name": "x",
"nameLocation": "49:1:1",
"nodeType": "VariableDeclaration",
"scope": 9,
"src": "35:15:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions":
{
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[]"
},
"typeName":
{
"baseType":
{
"id": 5,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "35:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 6,
"nodeType": "ArrayTypeName",
"src": "35:6:1",
"typeDescriptions":
{
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"visibility": "internal"
}
],
"id": 8,
"nodeType": "VariableDeclarationStatement",
"src": "35:15:1"
}
]
},
"functionSelector": "26121ff0",
"id": 10,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nameLocation": "22:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "23:2:1"
},
"returnParameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "33:0:1"
},
"scope": 11,
"src": "13:40:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 12,
"src": "0:55:1",
"usedErrors": []
}
],
"src": "0:56:1"
}

View File

@ -0,0 +1,140 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"c":
[
12
]
},
"id": 13,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "c",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 12,
"linearizedBaseContracts":
[
12
],
"name": "c",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 10,
"nodeType": "Block",
"src": "33:25:1",
"statements":
[
{
"assignments":
[
8
],
"declarations":
[
{
"constant": false,
"id": 8,
"mutability": "mutable",
"name": "rows",
"nameLocation": "51:4:1",
"nodeType": "VariableDeclaration",
"scope": 10,
"src": "35:20:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions":
{
"typeIdentifier": "t_array$_t_array$_t_uint256_$dyn_memory_ptr_$dyn_memory_ptr",
"typeString": "uint256[][]"
},
"typeName":
{
"baseType":
{
"baseType":
{
"id": 5,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "35:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 6,
"nodeType": "ArrayTypeName",
"src": "35:6:1",
"typeDescriptions":
{
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"id": 7,
"nodeType": "ArrayTypeName",
"src": "35:8:1",
"typeDescriptions":
{
"typeIdentifier": "t_array$_t_array$_t_uint256_$dyn_storage_$dyn_storage_ptr",
"typeString": "uint256[][]"
}
},
"visibility": "internal"
}
],
"id": 9,
"nodeType": "VariableDeclarationStatement",
"src": "35:20:1"
}
]
},
"functionSelector": "26121ff0",
"id": 11,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nameLocation": "22:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "23:2:1"
},
"returnParameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "33:0:1"
},
"scope": 12,
"src": "13:45:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 13,
"src": "0:60:1",
"usedErrors": []
}
],
"src": "0:61:1"
}

View File

@ -0,0 +1,252 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
12
]
},
"id": 13,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 12,
"linearizedBaseContracts":
[
12
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"canonicalName": "C.S",
"id": 3,
"members":
[
{
"constant": false,
"id": 2,
"mutability": "mutable",
"name": "x",
"nameLocation": "33:1:1",
"nodeType": "VariableDeclaration",
"scope": 3,
"src": "28:6:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 1,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "28:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"name": "S",
"nameLocation": "24:1:1",
"nodeType": "StructDefinition",
"scope": 12,
"src": "17:20:1",
"visibility": "public"
},
{
"constant": false,
"id": 6,
"mutability": "mutable",
"name": "s",
"nameLocation": "44:1:1",
"nodeType": "VariableDeclaration",
"scope": 12,
"src": "42:3:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_struct$_S_$3_storage",
"typeString": "struct C.S"
},
"typeName":
{
"id": 5,
"nodeType": "UserDefinedTypeName",
"pathNode":
{
"id": 4,
"name": "S",
"nameLocations":
[
"42:1:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 3,
"src": "42:1:1"
},
"referencedDeclaration": 3,
"src": "42:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_struct$_S_$3_storage_ptr",
"typeString": "struct C.S"
}
},
"visibility": "internal"
},
{
"body":
{
"id": 10,
"nodeType": "Block",
"src": "76:70:1",
"statements":
[
{
"AST":
{
"nodeType": "YulBlock",
"src": "95:45:1",
"statements":
[
{
"nodeType": "YulVariableDeclaration",
"src": "97:17:1",
"value":
{
"name": "s.offset",
"nodeType": "YulIdentifier",
"src": "106:8:1"
},
"variables":
[
{
"name": "x",
"nodeType": "YulTypedName",
"src": "101:1:1",
"type": ""
}
]
},
{
"nodeType": "YulVariableDeclaration",
"src": "115:23:1",
"value":
{
"arguments":
[
{
"name": "s.slot",
"nodeType": "YulIdentifier",
"src": "128:6:1"
},
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "136:1:1",
"type": "",
"value": "2"
}
],
"functionName":
{
"name": "mul",
"nodeType": "YulIdentifier",
"src": "124:3:1"
},
"nodeType": "YulFunctionCall",
"src": "124:14:1"
},
"variables":
[
{
"name": "y",
"nodeType": "YulTypedName",
"src": "119:1:1",
"type": ""
}
]
}
]
},
"evmVersion": "london",
"externalReferences":
[
{
"declaration": 6,
"isOffset": true,
"isSlot": false,
"src": "106:8:1",
"suffix": "offset",
"valueSize": 1
},
{
"declaration": 6,
"isOffset": false,
"isSlot": true,
"src": "128:6:1",
"suffix": "slot",
"valueSize": 1
}
],
"id": 9,
"nodeType": "InlineAssembly",
"src": "86:54:1"
}
]
},
"functionSelector": "ffae15ba",
"id": 11,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "e",
"nameLocation": "60:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 7,
"nodeType": "ParameterList",
"parameters": [],
"src": "61:2:1"
},
"returnParameters":
{
"id": 8,
"nodeType": "ParameterList",
"parameters": [],
"src": "76:0:1"
},
"scope": 12,
"src": "51:95:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "public"
}
],
"scope": 13,
"src": "0:148:1",
"usedErrors": []
}
],
"src": "0:149:1"
}

View File

@ -0,0 +1,36 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
1
]
},
"id": 2,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 1,
"linearizedBaseContracts":
[
1
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes": [],
"scope": 2,
"src": "0:13:1",
"usedErrors": []
}
],
"src": "0:14:1"
}

View File

@ -0,0 +1,172 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
12
]
},
"id": 13,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 12,
"linearizedBaseContracts":
[
12
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 10,
"nodeType": "Block",
"src": "33:20:1",
"statements":
[
{
"assignments":
[
4
],
"declarations":
[
{
"constant": false,
"id": 4,
"mutability": "mutable",
"name": "x",
"nameLocation": "40:1:1",
"nodeType": "VariableDeclaration",
"scope": 10,
"src": "35:6:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 3,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "35:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 6,
"initialValue":
{
"hexValue": "32",
"id": 5,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "44:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_rational_2_by_1",
"typeString": "int_const 2"
},
"value": "2"
},
"nodeType": "VariableDeclarationStatement",
"src": "35:10:1"
},
{
"expression":
{
"id": 8,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "47:3:1",
"subExpression":
{
"id": 7,
"name": "x",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4,
"src": "47:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 9,
"nodeType": "ExpressionStatement",
"src": "47:3:1"
}
]
},
"functionSelector": "26121ff0",
"id": 11,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nameLocation": "22:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "23:2:1"
},
"returnParameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "33:0:1"
},
"scope": 12,
"src": "13:40:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 13,
"src": "0:55:1",
"usedErrors": []
}
],
"src": "0:56:1"
}

View File

@ -0,0 +1,136 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
9
]
},
"id": 10,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 9,
"linearizedBaseContracts":
[
9
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 7,
"nodeType": "Block",
"src": "33:36:1",
"statements":
[
{
"assignments":
[
4
],
"declarations":
[
{
"constant": false,
"id": 4,
"mutability": "mutable",
"name": "x",
"nameLocation": "49:1:1",
"nodeType": "VariableDeclaration",
"scope": 7,
"src": "35:15:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions":
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName":
{
"id": 3,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "35:6:1",
"typeDescriptions":
{
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"id": 6,
"initialValue":
{
"hexValue": "48656c6c6f20576f726c64",
"id": 5,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "53:13:1",
"typeDescriptions":
{
"typeIdentifier": "t_stringliteral_592fa743889fc7f92ac2a37bb1f5ba1daf2a5c84741ca0e0061d243a2e6707ba",
"typeString": "literal_string \"Hello World\""
},
"value": "Hello World"
},
"nodeType": "VariableDeclarationStatement",
"src": "35:31:1"
}
]
},
"functionSelector": "26121ff0",
"id": 8,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nameLocation": "22:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "23:2:1"
},
"returnParameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "33:0:1"
},
"scope": 9,
"src": "13:56:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 10,
"src": "0:71:1",
"usedErrors": []
}
],
"src": "0:72:1"
}

View File

@ -0,0 +1,113 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
6
]
},
"id": 7,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 6,
"linearizedBaseContracts":
[
6
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 4,
"nodeType": "Block",
"src": "37:43:1",
"statements":
[
{
"AST":
{
"nodeType": "YulBlock",
"src": "56:18:1",
"statements":
[
{
"nodeType": "YulVariableDeclaration",
"src": "58:14:1",
"value":
{
"hexValue": "616263",
"kind": "string",
"nodeType": "YulLiteral",
"src": "67:5:1",
"type": "",
"value": "abc"
},
"variables":
[
{
"name": "x",
"nodeType": "YulTypedName",
"src": "62:1:1",
"type": ""
}
]
}
]
},
"evmVersion": "london",
"externalReferences": [],
"id": 3,
"nodeType": "InlineAssembly",
"src": "47:27:1"
}
]
},
"functionSelector": "5a2ee019",
"id": 5,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "m",
"nameLocation": "26:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "27:2:1"
},
"returnParameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "37:0:1"
},
"scope": 6,
"src": "17:63:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 7,
"src": "0:82:1",
"usedErrors": []
}
],
"src": "0:83:1"
}

View File

@ -0,0 +1,204 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
6
]
},
"id": 7,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 6,
"linearizedBaseContracts":
[
6
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 4,
"nodeType": "Block",
"src": "42:154:1",
"statements":
[
{
"AST":
{
"nodeType": "YulBlock",
"src": "61:129:1",
"statements":
[
{
"nodeType": "YulVariableDeclaration",
"src": "75:10:1",
"value":
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "84:1:1",
"type": "",
"value": "0"
},
"variables":
[
{
"name": "v",
"nodeType": "YulTypedName",
"src": "79:1:1",
"type": ""
}
]
},
{
"cases":
[
{
"body":
{
"nodeType": "YulBlock",
"src": "139:10:1",
"statements":
[
{
"nodeType": "YulAssignment",
"src": "141:6:1",
"value":
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "146:1:1",
"type": "",
"value": "1"
},
"variableNames":
[
{
"name": "v",
"nodeType": "YulIdentifier",
"src": "141:1:1"
}
]
}
]
},
"nodeType": "YulCase",
"src": "132:17:1",
"value":
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "137:1:1",
"type": "",
"value": "0"
}
},
{
"body":
{
"nodeType": "YulBlock",
"src": "170:10:1",
"statements":
[
{
"nodeType": "YulAssignment",
"src": "172:6:1",
"value":
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "177:1:1",
"type": "",
"value": "2"
},
"variableNames":
[
{
"name": "v",
"nodeType": "YulIdentifier",
"src": "172:1:1"
}
]
}
]
},
"nodeType": "YulCase",
"src": "162:18:1",
"value": "default"
}
],
"expression":
{
"arguments": [],
"functionName":
{
"name": "calldatasize",
"nodeType": "YulIdentifier",
"src": "105:12:1"
},
"nodeType": "YulFunctionCall",
"src": "105:14:1"
},
"nodeType": "YulSwitch",
"src": "98:82:1"
}
]
},
"evmVersion": "london",
"externalReferences": [],
"id": 3,
"nodeType": "InlineAssembly",
"src": "52:138:1"
}
]
},
"functionSelector": "26121ff0",
"id": 5,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nameLocation": "26:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "27:2:1"
},
"returnParameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "42:0:1"
},
"scope": 6,
"src": "17:179:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "public"
}
],
"scope": 7,
"src": "0:198:1",
"usedErrors": []
}
],
"src": "0:199:1"
}

View File

@ -0,0 +1,135 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
6
]
},
"id": 7,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 6,
"linearizedBaseContracts":
[
6
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 4,
"nodeType": "Block",
"src": "42:58:1",
"statements":
[
{
"AST":
{
"nodeType": "YulBlock",
"src": "61:33:1",
"statements":
[
{
"cases":
[
{
"body":
{
"nodeType": "YulBlock",
"src": "79:2:1",
"statements": []
},
"nodeType": "YulCase",
"src": "72:9:1",
"value":
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "77:1:1",
"type": "",
"value": "0"
}
},
{
"body":
{
"nodeType": "YulBlock",
"src": "90:2:1",
"statements": []
},
"nodeType": "YulCase",
"src": "82:10:1",
"value": "default"
}
],
"expression":
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "70:1:1",
"type": "",
"value": "0"
},
"nodeType": "YulSwitch",
"src": "63:29:1"
}
]
},
"evmVersion": "london",
"externalReferences": [],
"id": 3,
"nodeType": "InlineAssembly",
"src": "52:42:1"
}
]
},
"functionSelector": "e2179b8e",
"id": 5,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "g",
"nameLocation": "26:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "27:2:1"
},
"returnParameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "42:0:1"
},
"scope": 6,
"src": "17:83:1",
"stateMutability": "view",
"virtual": false,
"visibility": "public"
}
],
"scope": 7,
"src": "0:102:1",
"usedErrors": []
}
],
"src": "0:103:1"
}

View File

@ -0,0 +1,272 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"A":
[
5
],
"B":
[
10
],
"C":
[
22
]
},
"id": 23,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "A",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 5,
"linearizedBaseContracts":
[
5
],
"name": "A",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 3,
"nodeType": "Block",
"src": "45:2:1",
"statements": []
},
"functionSelector": "26121ff0",
"id": 4,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nameLocation": "26:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "27:2:1"
},
"returnParameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "45:0:1"
},
"scope": 5,
"src": "17:30:1",
"stateMutability": "nonpayable",
"virtual": true,
"visibility": "public"
}
],
"scope": 23,
"src": "0:49:1",
"usedErrors": []
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "B",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 10,
"linearizedBaseContracts":
[
10
],
"name": "B",
"nameLocation": "59:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 8,
"nodeType": "Block",
"src": "95:2:1",
"statements": []
},
"functionSelector": "26121ff0",
"id": 9,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nameLocation": "76:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 6,
"nodeType": "ParameterList",
"parameters": [],
"src": "77:2:1"
},
"returnParameters":
{
"id": 7,
"nodeType": "ParameterList",
"parameters": [],
"src": "95:0:1"
},
"scope": 10,
"src": "67:30:1",
"stateMutability": "nonpayable",
"virtual": true,
"visibility": "public"
}
],
"scope": 23,
"src": "50:49:1",
"usedErrors": []
},
{
"abstract": false,
"baseContracts":
[
{
"baseName":
{
"id": 11,
"name": "A",
"nameLocations":
[
"114:1:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 5,
"src": "114:1:1"
},
"id": 12,
"nodeType": "InheritanceSpecifier",
"src": "114:1:1"
},
{
"baseName":
{
"id": 13,
"name": "B",
"nameLocations":
[
"117:1:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 10,
"src": "117:1:1"
},
"id": 14,
"nodeType": "InheritanceSpecifier",
"src": "117:1:1"
}
],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 22,
"linearizedBaseContracts":
[
22,
10,
5
],
"name": "C",
"nameLocation": "109:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"baseFunctions":
[
4,
9
],
"body":
{
"id": 20,
"nodeType": "Block",
"src": "160:2:1",
"statements": []
},
"functionSelector": "26121ff0",
"id": 21,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nameLocation": "134:1:1",
"nodeType": "FunctionDefinition",
"overrides":
{
"id": 18,
"nodeType": "OverrideSpecifier",
"overrides":
[
{
"id": 16,
"name": "A",
"nameLocations":
[
"154:1:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 5,
"src": "154:1:1"
},
{
"id": 17,
"name": "B",
"nameLocations":
[
"157:1:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 10,
"src": "157:1:1"
}
],
"src": "145:14:1"
},
"parameters":
{
"id": 15,
"nodeType": "ParameterList",
"parameters": [],
"src": "135:2:1"
},
"returnParameters":
{
"id": 19,
"nodeType": "ParameterList",
"parameters": [],
"src": "160:0:1"
},
"scope": 22,
"src": "125:37:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 23,
"src": "100:64:1",
"usedErrors": []
}
],
"src": "0:165:1"
}

View File

@ -0,0 +1,136 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
9
]
},
"id": 10,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 9,
"linearizedBaseContracts":
[
9
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 7,
"nodeType": "Block",
"src": "33:42:1",
"statements":
[
{
"assignments":
[
4
],
"declarations":
[
{
"constant": false,
"id": 4,
"mutability": "mutable",
"name": "x",
"nameLocation": "49:1:1",
"nodeType": "VariableDeclaration",
"scope": 7,
"src": "35:15:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions":
{
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName":
{
"id": 3,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "35:6:1",
"typeDescriptions":
{
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"id": 6,
"initialValue":
{
"hexValue": "48656c6c6f20f09f9883",
"id": 5,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "unicodeString",
"lValueRequested": false,
"nodeType": "Literal",
"src": "53:19:1",
"typeDescriptions":
{
"typeIdentifier": "t_stringliteral_cd7a99177cebb3d14b8cc54e313dbf76867c71cd6fbb9a33ce3870dc80e9992b",
"typeString": "literal_string hex\"48656c6c6f20f09f9883\""
},
"value": "Hello \ud83d\ude03"
},
"nodeType": "VariableDeclarationStatement",
"src": "35:37:1"
}
]
},
"functionSelector": "26121ff0",
"id": 8,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nameLocation": "22:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "23:2:1"
},
"returnParameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "33:0:1"
},
"scope": 9,
"src": "13:62:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 10,
"src": "0:77:1",
"usedErrors": []
}
],
"src": "0:78:1"
}

View File

@ -0,0 +1,235 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
19
],
"X":
[
2
],
"f":
[
9
]
},
"id": 20,
"nodeType": "SourceUnit",
"nodes":
[
{
"errorSelector": "c1599bd9",
"id": 2,
"name": "X",
"nameLocation": "6:1:1",
"nodeType": "ErrorDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "7:2:1"
},
"src": "0:10:1"
},
{
"body":
{
"id": 8,
"nodeType": "Block",
"src": "29:15:1",
"statements":
[
{
"errorCall":
{
"arguments": [],
"expression":
{
"argumentTypes": [],
"id": 5,
"name": "X",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2,
"src": "38:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_function_error_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 6,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "38:3:1",
"tryCall": false,
"typeDescriptions":
{
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 7,
"nodeType": "RevertStatement",
"src": "31:10:1"
}
]
},
"id": 9,
"implemented": true,
"kind": "freeFunction",
"modifiers": [],
"name": "f",
"nameLocation": "20:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 3,
"nodeType": "ParameterList",
"parameters": [],
"src": "21:2:1"
},
"returnParameters":
{
"id": 4,
"nodeType": "ParameterList",
"parameters": [],
"src": "29:0:1"
},
"scope": 20,
"src": "11:33:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 19,
"linearizedBaseContracts":
[
19
],
"name": "C",
"nameLocation": "54:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"errorSelector": "2bc80f3a",
"id": 11,
"name": "T",
"nameLocation": "68:1:1",
"nodeType": "ErrorDefinition",
"parameters":
{
"id": 10,
"nodeType": "ParameterList",
"parameters": [],
"src": "69:2:1"
},
"src": "62:10:1"
},
{
"body":
{
"id": 17,
"nodeType": "Block",
"src": "97:8:1",
"statements":
[
{
"expression":
{
"arguments": [],
"expression":
{
"argumentTypes": [],
"id": 14,
"name": "f",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9,
"src": "99:1:1",
"typeDescriptions":
{
"typeIdentifier": "t_function_internal_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 15,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "99:3:1",
"tryCall": false,
"typeDescriptions":
{
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 16,
"nodeType": "ExpressionStatement",
"src": "99:3:1"
}
]
},
"functionSelector": "b8c9d365",
"id": 18,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "h",
"nameLocation": "86:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 12,
"nodeType": "ParameterList",
"parameters": [],
"src": "87:2:1"
},
"returnParameters":
{
"id": 13,
"nodeType": "ParameterList",
"parameters": [],
"src": "97:0:1"
},
"scope": 19,
"src": "77:28:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
}
],
"scope": 20,
"src": "45:62:1",
"usedErrors":
[
2,
11
]
}
],
"src": "0:108:1"
}

View File

@ -0,0 +1,355 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
27
],
"MyAddress":
[
2
],
"MyUInt":
[
4
],
"f":
[
16
]
},
"id": 28,
"nodeType": "SourceUnit",
"nodes":
[
{
"canonicalName": "MyAddress",
"id": 2,
"name": "MyAddress",
"nameLocation": "5:9:1",
"nodeType": "UserDefinedValueTypeDefinition",
"src": "0:26:1",
"underlyingType":
{
"id": 1,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "18:7:1",
"stateMutability": "nonpayable",
"typeDescriptions":
{
"typeIdentifier": "t_address",
"typeString": "address"
}
}
},
{
"canonicalName": "MyUInt",
"id": 4,
"name": "MyUInt",
"nameLocation": "32:6:1",
"nodeType": "UserDefinedValueTypeDefinition",
"src": "27:20:1",
"underlyingType":
{
"id": 3,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "42:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"body":
{
"id": 15,
"nodeType": "Block",
"src": "61:34:1",
"statements":
[
{
"assignments":
[
9
],
"declarations":
[
{
"constant": false,
"id": 9,
"mutability": "mutable",
"name": "a",
"nameLocation": "77:1:1",
"nodeType": "VariableDeclaration",
"scope": 15,
"src": "67:11:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_userDefinedValueType$_MyAddress_$2",
"typeString": "MyAddress"
},
"typeName":
{
"id": 8,
"nodeType": "UserDefinedTypeName",
"pathNode":
{
"id": 7,
"name": "MyAddress",
"nameLocations":
[
"67:9:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 2,
"src": "67:9:1"
},
"referencedDeclaration": 2,
"src": "67:9:1",
"typeDescriptions":
{
"typeIdentifier": "t_userDefinedValueType$_MyAddress_$2",
"typeString": "MyAddress"
}
},
"visibility": "internal"
}
],
"id": 10,
"nodeType": "VariableDeclarationStatement",
"src": "67:11:1"
},
{
"assignments":
[
13
],
"declarations":
[
{
"constant": false,
"id": 13,
"mutability": "mutable",
"name": "b",
"nameLocation": "91:1:1",
"nodeType": "VariableDeclaration",
"scope": 15,
"src": "84:8:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_userDefinedValueType$_MyUInt_$4",
"typeString": "MyUInt"
},
"typeName":
{
"id": 12,
"nodeType": "UserDefinedTypeName",
"pathNode":
{
"id": 11,
"name": "MyUInt",
"nameLocations":
[
"84:6:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4,
"src": "84:6:1"
},
"referencedDeclaration": 4,
"src": "84:6:1",
"typeDescriptions":
{
"typeIdentifier": "t_userDefinedValueType$_MyUInt_$4",
"typeString": "MyUInt"
}
},
"visibility": "internal"
}
],
"id": 14,
"nodeType": "VariableDeclarationStatement",
"src": "84:8:1"
}
]
},
"id": 16,
"implemented": true,
"kind": "freeFunction",
"modifiers": [],
"name": "f",
"nameLocation": "57:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 5,
"nodeType": "ParameterList",
"parameters": [],
"src": "58:2:1"
},
"returnParameters":
{
"id": 6,
"nodeType": "ParameterList",
"parameters": [],
"src": "61:0:1"
},
"scope": 28,
"src": "48:47:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 27,
"linearizedBaseContracts":
[
27
],
"name": "C",
"nameLocation": "105:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"canonicalName": "C.MyAddress",
"id": 18,
"name": "MyAddress",
"nameLocation": "118:9:1",
"nodeType": "UserDefinedValueTypeDefinition",
"src": "113:26:1",
"underlyingType":
{
"id": 17,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "131:7:1",
"stateMutability": "nonpayable",
"typeDescriptions":
{
"typeIdentifier": "t_address",
"typeString": "address"
}
}
},
{
"canonicalName": "C.MyUInt",
"id": 20,
"name": "MyUInt",
"nameLocation": "149:6:1",
"nodeType": "UserDefinedValueTypeDefinition",
"src": "144:20:1",
"underlyingType":
{
"id": 19,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "159:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"constant": false,
"functionSelector": "97682884",
"id": 26,
"mutability": "mutable",
"name": "m",
"nameLocation": "205:1:1",
"nodeType": "VariableDeclaration",
"scope": 27,
"src": "169:37:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_mapping$_t_userDefinedValueType$_MyAddress_$18_$_t_userDefinedValueType$_MyUInt_$20_$",
"typeString": "mapping(C.MyAddress => C.MyUInt)"
},
"typeName":
{
"id": 25,
"keyType":
{
"id": 22,
"nodeType": "UserDefinedTypeName",
"pathNode":
{
"id": 21,
"name": "MyAddress",
"nameLocations":
[
"177:9:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 18,
"src": "177:9:1"
},
"referencedDeclaration": 18,
"src": "177:9:1",
"typeDescriptions":
{
"typeIdentifier": "t_userDefinedValueType$_MyAddress_$18",
"typeString": "C.MyAddress"
}
},
"nodeType": "Mapping",
"src": "169:28:1",
"typeDescriptions":
{
"typeIdentifier": "t_mapping$_t_userDefinedValueType$_MyAddress_$18_$_t_userDefinedValueType$_MyUInt_$20_$",
"typeString": "mapping(C.MyAddress => C.MyUInt)"
},
"valueType":
{
"id": 24,
"nodeType": "UserDefinedTypeName",
"pathNode":
{
"id": 23,
"name": "MyUInt",
"nameLocations":
[
"190:6:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 20,
"src": "190:6:1"
},
"referencedDeclaration": 20,
"src": "190:6:1",
"typeDescriptions":
{
"typeIdentifier": "t_userDefinedValueType$_MyUInt_$20",
"typeString": "C.MyUInt"
}
}
},
"visibility": "public"
}
],
"scope": 28,
"src": "96:113:1",
"usedErrors": []
}
],
"src": "0:210:1"
}

View File

@ -0,0 +1,186 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
13
],
"L":
[
4
],
"f":
[
10
]
},
"id": 14,
"nodeType": "SourceUnit",
"nodes":
[
{
"functionList":
[
{
"function":
{
"id": 1,
"name": "f",
"nameLocations":
[
"7:1:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 10,
"src": "7:1:1"
}
}
],
"global": false,
"id": 3,
"nodeType": "UsingForDirective",
"src": "0:19:1",
"typeName":
{
"id": 2,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "14:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "L",
"contractDependencies": [],
"contractKind": "library",
"fullyImplemented": true,
"id": 4,
"linearizedBaseContracts":
[
4
],
"name": "L",
"nameLocation": "28:1:1",
"nodeType": "ContractDefinition",
"nodes": [],
"scope": 14,
"src": "20:12:1",
"usedErrors": []
},
{
"body":
{
"id": 9,
"nodeType": "Block",
"src": "50:2:1",
"statements": []
},
"id": 10,
"implemented": true,
"kind": "freeFunction",
"modifiers": [],
"name": "f",
"nameLocation": "42:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 7,
"nodeType": "ParameterList",
"parameters":
[
{
"constant": false,
"id": 6,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 10,
"src": "44:4:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 5,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "44:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "43:6:1"
},
"returnParameters":
{
"id": 8,
"nodeType": "ParameterList",
"parameters": [],
"src": "50:0:1"
},
"scope": 14,
"src": "33:19:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 13,
"linearizedBaseContracts":
[
13
],
"name": "C",
"nameLocation": "62:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"global": false,
"id": 12,
"libraryName":
{
"id": 11,
"name": "L",
"nameLocations":
[
"72:1:1"
],
"nodeType": "IdentifierPath",
"referencedDeclaration": 4,
"src": "72:1:1"
},
"nodeType": "UsingForDirective",
"src": "66:14:1"
}
],
"scope": 14,
"src": "53:29:1",
"usedErrors": []
}
],
"src": "0:83:1"
}

View File

@ -0,0 +1,162 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"C":
[
9
]
},
"id": 10,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "C",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 9,
"linearizedBaseContracts":
[
9
],
"name": "C",
"nameLocation": "9:1:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 7,
"nodeType": "Block",
"src": "42:51:1",
"statements":
[
{
"assignments":
[
4
],
"declarations":
[
{
"constant": false,
"id": 4,
"mutability": "mutable",
"name": "x",
"nameLocation": "57:1:1",
"nodeType": "VariableDeclaration",
"scope": 7,
"src": "52:6:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName":
{
"id": 3,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "52:4:1",
"typeDescriptions":
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 5,
"nodeType": "VariableDeclarationStatement",
"src": "52:6:1"
},
{
"AST":
{
"nodeType": "YulBlock",
"src": "77:10:1",
"statements":
[
{
"nodeType": "YulAssignment",
"src": "79:6:1",
"value":
{
"kind": "number",
"nodeType": "YulLiteral",
"src": "84:1:1",
"type": "",
"value": "7"
},
"variableNames":
[
{
"name": "x",
"nodeType": "YulIdentifier",
"src": "79:1:1"
}
]
}
]
},
"evmVersion": "london",
"externalReferences":
[
{
"declaration": 4,
"isOffset": false,
"isSlot": false,
"src": "79:1:1",
"valueSize": 1
}
],
"id": 6,
"nodeType": "InlineAssembly",
"src": "68:19:1"
}
]
},
"functionSelector": "26121ff0",
"id": 8,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nameLocation": "26:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "27:2:1"
},
"returnParameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "42:0:1"
},
"scope": 9,
"src": "17:76:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "public"
}
],
"scope": 10,
"src": "0:95:1",
"usedErrors": []
}
],
"src": "0:96:1"
}

View File

@ -0,0 +1,155 @@
{
"absolutePath": "a",
"exportedSymbols":
{
"Sample":
[
6
]
},
"id": 7,
"nodeType": "SourceUnit",
"nodes":
[
{
"abstract": false,
"baseContracts": [],
"canonicalName": "Sample",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 6,
"linearizedBaseContracts":
[
6
],
"name": "Sample",
"nameLocation": "9:6:1",
"nodeType": "ContractDefinition",
"nodes":
[
{
"body":
{
"id": 4,
"nodeType": "Block",
"src": "47:167:1",
"statements":
[
{
"AST":
{
"nodeType": "YulBlock",
"src": "66:142:1",
"statements":
[
{
"nodeType": "YulVariableDeclaration",
"src": "80:15:1",
"value":
{
"hexValue": "74657374",
"kind": "string",
"nodeType": "YulLiteral",
"src": "89:6:1",
"type": "",
"value": "test"
},
"variables":
[
{
"name": "a",
"nodeType": "YulTypedName",
"src": "84:1:1",
"type": ""
}
]
},
{
"nodeType": "YulVariableDeclaration",
"src": "108:54:1",
"value":
{
"hexValue": "112233445566778899aabbccddeeff6677889900",
"kind": "string",
"nodeType": "YulLiteral",
"src": "117:45:1",
"type": ""
},
"variables":
[
{
"name": "b",
"nodeType": "YulTypedName",
"src": "112:1:1",
"type": ""
}
]
},
{
"nodeType": "YulVariableDeclaration",
"src": "175:23:1",
"value":
{
"hexValue": "1234abcd",
"kind": "string",
"nodeType": "YulLiteral",
"src": "184:14:1",
"type": ""
},
"variables":
[
{
"name": "c",
"nodeType": "YulTypedName",
"src": "179:1:1",
"type": ""
}
]
}
]
},
"evmVersion": "loop",
"externalReferences": [],
"id": 3,
"nodeType": "InlineAssembly",
"src": "57:151:1"
}
]
},
"functionSelector": "26121ff0",
"id": 5,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "f",
"nameLocation": "31:1:1",
"nodeType": "FunctionDefinition",
"parameters":
{
"id": 1,
"nodeType": "ParameterList",
"parameters": [],
"src": "32:2:1"
},
"returnParameters":
{
"id": 2,
"nodeType": "ParameterList",
"parameters": [],
"src": "47:0:1"
},
"scope": 6,
"src": "22:192:1",
"stateMutability": "pure",
"virtual": false,
"visibility": "public"
}
],
"scope": 7,
"src": "0:216:1",
"usedErrors": []
}
],
"src": "0:217:1"
}

View File