-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #186 from kyonRay/feature-1.3.1
Release 1.3.1
- Loading branch information
Showing
18 changed files
with
319 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
### v1.3.1 | ||
|
||
(2023-07-31) | ||
|
||
**新增** | ||
|
||
* 支持FISCO BCOS 3.+ WASM执行版本,支持WASM合约部署、调用等功能。 | ||
|
||
|
||
### v1.3.0 | ||
|
||
(2023-03-15) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v1.3.0 | ||
v1.3.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/main/resources/contracts/liquid/hello_world/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Generated by Cargo | ||
# will have compiled files and executables | ||
/target/ | ||
|
||
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries | ||
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html | ||
Cargo.lock | ||
|
||
# These are backup files generated by rustfmt | ||
**/*.rs.bk |
27 changes: 27 additions & 0 deletions
27
src/main/resources/contracts/liquid/hello_world/.liquid/abi_gen/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[package] | ||
name = "abi-gen" | ||
version = "1.0.0-rc2" | ||
authors = ["vita-dounai <lichenxi.webank@gmail.com>"] | ||
edition = "2018" | ||
publish = false | ||
|
||
[[bin]] | ||
name = "abi-gen" | ||
path = "main.rs" | ||
|
||
[dependencies.contract] | ||
path = "../../" | ||
package = "hello_world" | ||
default-features = false | ||
features = ["liquid-abi-gen"] | ||
|
||
[dependencies.liquid_lang] | ||
git = "https://github.com/WeBankBlockchain/liquid" | ||
branch = "dev" | ||
package = "liquid_lang" | ||
default-features = false | ||
features = ["contract-abi-gen"] | ||
|
||
[dependencies] | ||
serde = "1.0" | ||
serde_json = "1.0" |
39 changes: 39 additions & 0 deletions
39
src/main/resources/contracts/liquid/hello_world/.liquid/abi_gen/main.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
use std::{collections::HashMap, env}; | ||
|
||
fn main() -> Result<(), std::io::Error> { | ||
let mut abi = HashMap::new(); | ||
|
||
let contract_abi = <contract::__LIQUID_ABI_GEN as liquid_lang::GenerateAbi>::generate_abi(); | ||
|
||
let mut local_abi = | ||
Vec::with_capacity(contract_abi.event_abis.len() + contract_abi.fn_abis.len() + 1); | ||
local_abi.extend( | ||
contract_abi | ||
.event_abis | ||
.iter() | ||
.map(|event_abi| liquid_lang::AbiKind::Event(event_abi.clone())), | ||
); | ||
local_abi.push(liquid_lang::AbiKind::Constructor( | ||
contract_abi.constructor_abi, | ||
)); | ||
local_abi.extend( | ||
contract_abi | ||
.fn_abis | ||
.iter() | ||
.map(|fn_abi| liquid_lang::AbiKind::ExternalFn(fn_abi.clone())), | ||
); | ||
abi.insert(String::from("$local"), local_abi); | ||
|
||
for (iface_name, fn_abis) in contract_abi.iface_abis { | ||
let fn_abis = fn_abis | ||
.iter() | ||
.map(|fn_abi| liquid_lang::AbiKind::ExternalFn(fn_abi.clone())) | ||
.collect::<Vec<liquid_lang::AbiKind>>(); | ||
abi.insert(iface_name, fn_abis); | ||
} | ||
|
||
let target_dir = env::var("CARGO_TARGET_DIR").unwrap_or("target".into()); | ||
std::fs::create_dir(&target_dir).ok(); | ||
std::fs::write("hello_world.abi", serde_json::to_string(&abi).unwrap())?; | ||
Ok(()) | ||
} |
Oops, something went wrong.