mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-04-26 07:37:57 +00:00
@@ -33,7 +33,7 @@ impl Contract {
|
||||
/// A shortcut constructor.
|
||||
pub fn new(
|
||||
path: String,
|
||||
source_hash: [u8; revive_common::BYTE_LENGTH_FIELD],
|
||||
source_hash: [u8; revive_common::BYTE_LENGTH_WORD],
|
||||
source_version: SolcVersion,
|
||||
ir: IR,
|
||||
metadata_json: Option<serde_json::Value>,
|
||||
@@ -98,7 +98,7 @@ impl Contract {
|
||||
optimizer.settings().to_owned(),
|
||||
);
|
||||
let metadata_json = serde_json::to_value(&metadata).expect("Always valid");
|
||||
let metadata_hash: Option<[u8; revive_common::BYTE_LENGTH_FIELD]> = if include_metadata_hash
|
||||
let metadata_hash: Option<[u8; revive_common::BYTE_LENGTH_WORD]> = if include_metadata_hash
|
||||
{
|
||||
let metadata_string = serde_json::to_string(&metadata).expect("Always valid");
|
||||
Some(sha3::Keccak256::digest(metadata_string.as_bytes()).into())
|
||||
|
||||
Reference in New Issue
Block a user