Skip to content

Commit

Permalink
Use clearer terminology (#1933)
Browse files Browse the repository at this point in the history
* Use clearer terminology (bytecode vs binary)

* Upgrade `jsonschema` to `0.28`
  • Loading branch information
cmichi authored Feb 4, 2025
1 parent 72e2da3 commit 172e456
Show file tree
Hide file tree
Showing 25 changed files with 163 additions and 168 deletions.
54 changes: 27 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ from `true` to `false` through the `flip()` function.

##### `cargo contract build`

Compile the contract into [PolkaVM](https://github.com/paritytech/polkavm) bytecode, generate
Compile the contract into a [PolkaVM](https://github.com/paritytech/polkavm) binary, generate
metadata for it, and bundle both together in a `<name>.contract` file, which you can use for
deploying the contract on-chain.

Expand Down
2 changes: 1 addition & 1 deletion crates/analyze/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub use contract_metadata::Language;
/// Detects the programming language of a smart contract from its PolkaVM
/// binary code.
///
/// This function accepts contract bytecode as input and employs a set of heuristics
/// This function accepts a binary contract as input and employs a set of heuristics
/// to identify the contract's source language. It currently supports detection of the
/// ink! and Solidity languages.
pub fn determine_language(_code: &[u8]) -> Result<Language> {
Expand Down
4 changes: 2 additions & 2 deletions crates/build/src/crate_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub struct CrateMetadata {
pub contract_artifact_name: String,
pub root_package: Package,
pub original_code: PathBuf,
pub dest_bytecode: PathBuf,
pub dest_binary: PathBuf,
pub ink_version: Version,
pub documentation: Option<Url>,
pub homepage: Option<Url>,
Expand Down Expand Up @@ -138,7 +138,7 @@ impl CrateMetadata {
root_package,
contract_artifact_name,
original_code: original_code.into(),
dest_bytecode: dest_code.into(),
dest_binary: dest_code.into(),
ink_version,
documentation,
homepage,
Expand Down
4 changes: 2 additions & 2 deletions crates/build/src/docker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,14 @@ fn update_build_result(host_folder: &Path, build_result: &mut BuildResult) -> Re
);
build_result.target_directory = new_path;

let new_path = build_result.dest_polkavm.as_ref().map(|p| {
let new_path = build_result.dest_binary.as_ref().map(|p| {
host_folder.join(
p.as_path()
.strip_prefix(MOUNT_DIR)
.expect("cannot strip prefix"),
)
});
build_result.dest_polkavm = new_path;
build_result.dest_binary = new_path;

// TODO: Clippy currently throws a false-positive here. The manual allow can be
// removed after https://github.com/rust-lang/rust-clippy/pull/13609 has been released.
Expand Down
Loading

0 comments on commit 172e456

Please sign in to comment.