Merge branch 'master' into feature/yul_compilation
This commit is contained in:
commit
76d05b57cc
|
@ -582,13 +582,16 @@ pub struct Output {
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||||
pub struct SolcAbi {
|
pub struct SolcAbi {
|
||||||
|
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||||
pub inputs: Vec<Item>,
|
pub inputs: Vec<Item>,
|
||||||
#[serde(rename = "stateMutability")]
|
#[serde(rename = "stateMutability")]
|
||||||
pub state_mutability: Option<String>,
|
pub state_mutability: Option<String>,
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub abi_type: String,
|
pub abi_type: String,
|
||||||
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
pub name: Option<String>,
|
pub name: Option<String>,
|
||||||
pub outputs: Option<Vec<Item>>,
|
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||||
|
pub outputs: Vec<Item>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||||
|
@ -1377,7 +1380,7 @@ pub struct UserDoc {
|
||||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
pub kind: Option<String>,
|
pub kind: Option<String>,
|
||||||
#[serde(default, skip_serializing_if = "::std::collections::BTreeMap::is_empty")]
|
#[serde(default, skip_serializing_if = "::std::collections::BTreeMap::is_empty")]
|
||||||
pub methods: BTreeMap<String, String>,
|
pub methods: BTreeMap<String, BTreeMap<String, String>>,
|
||||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
pub notice: Option<String>,
|
pub notice: Option<String>,
|
||||||
}
|
}
|
||||||
|
@ -1395,11 +1398,21 @@ pub struct DevDoc {
|
||||||
#[serde(default, rename = "custom:experimental", skip_serializing_if = "Option::is_none")]
|
#[serde(default, rename = "custom:experimental", skip_serializing_if = "Option::is_none")]
|
||||||
pub custom_experimental: Option<String>,
|
pub custom_experimental: Option<String>,
|
||||||
#[serde(default, skip_serializing_if = "::std::collections::BTreeMap::is_empty")]
|
#[serde(default, skip_serializing_if = "::std::collections::BTreeMap::is_empty")]
|
||||||
pub methods: BTreeMap<String, serde_json::Value>,
|
pub methods: BTreeMap<String, MethodDoc>,
|
||||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
pub title: Option<String>,
|
pub title: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Default, Serialize, Deserialize, Eq, PartialEq)]
|
||||||
|
pub struct MethodDoc {
|
||||||
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
|
pub details: Option<String>,
|
||||||
|
#[serde(default, skip_serializing_if = "::std::collections::BTreeMap::is_empty")]
|
||||||
|
pub params: BTreeMap<String, String>,
|
||||||
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
|
pub r#return: Option<String>,
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize, Eq, PartialEq)]
|
#[derive(Clone, Debug, Serialize, Deserialize, Eq, PartialEq)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Evm {
|
pub struct Evm {
|
||||||
|
|
|
@ -7,5 +7,4 @@ object "SimpleStore" {
|
||||||
code {
|
code {
|
||||||
calldatacopy(0, 0, 36) // write calldata to memory
|
calldatacopy(0, 0, 36) // write calldata to memory
|
||||||
}
|
}
|
||||||
}
|
}}
|
||||||
}
|
|
||||||
|
|
|
@ -116,8 +116,6 @@ fn can_compile_yul_sample() {
|
||||||
std::fs::remove_dir_all(&project.paths().artifacts).unwrap();
|
std::fs::remove_dir_all(&project.paths().artifacts).unwrap();
|
||||||
let compiled = project.compile().unwrap();
|
let compiled = project.compile().unwrap();
|
||||||
// Make sure ABI does exist
|
// Make sure ABI does exist
|
||||||
|
|
||||||
|
|
||||||
assert!(compiled.find("Dapp").is_some());
|
assert!(compiled.find("Dapp").is_some());
|
||||||
assert!(compiled.find("SimpleStore").is_some());
|
assert!(compiled.find("SimpleStore").is_some());
|
||||||
assert!(!compiled.is_unchanged());
|
assert!(!compiled.is_unchanged());
|
||||||
|
|
Loading…
Reference in New Issue