diff --git a/ontio-bump-alloc/Cargo.toml b/ontio-bump-alloc/Cargo.toml index 6d50d11..93d4cba 100644 --- a/ontio-bump-alloc/Cargo.toml +++ b/ontio-bump-alloc/Cargo.toml @@ -3,6 +3,10 @@ name = "ontio-bump-alloc" version = "0.1.0" authors = ["laizy "] edition = "2018" +license = "Apache-2.0/MIT" +homepage = "https://github.com/ontio/ontology-wasm-cdt-rust" +repository = "https://github.com/ontio/ontology-wasm-cdt-rust" +description = "bump memory allocation for ontology wasm engine" [dependencies] cfg-if = { version = "0.1", default-features = false } diff --git a/ontio-codegen/Cargo.toml b/ontio-codegen/Cargo.toml index 3c453e6..49fcabe 100644 --- a/ontio-codegen/Cargo.toml +++ b/ontio-codegen/Cargo.toml @@ -3,6 +3,10 @@ name = "ontio-codegen" version = "0.1.0" authors = ["laizy "] edition = "2018" +license = "Apache-2.0/MIT" +homepage = "https://github.com/ontio/ontology-wasm-cdt-rust" +repository = "https://github.com/ontio/ontology-wasm-cdt-rust" +description = "codegen for ontio-std" [lib] proc-macro = true @@ -17,7 +21,3 @@ heck = {version = "0.3.1",default-features = false} [dev-dependencies] ontio-std = {path="../ontio-std"} - -[features] -mock = ["ontio-std/mock"] - diff --git a/ontio-derive-codec/Cargo.toml b/ontio-derive-codec/Cargo.toml index b30ecf8..ab7ca9a 100644 --- a/ontio-derive-codec/Cargo.toml +++ b/ontio-derive-codec/Cargo.toml @@ -3,6 +3,10 @@ name = "ontio-derive-codec" version = "0.1.0" authors = ["Lucas "] edition = "2018" +license = "Apache-2.0/MIT" +homepage = "https://github.com/ontio/ontology-wasm-cdt-rust" +repository = "https://github.com/ontio/ontology-wasm-cdt-rust" +description = "codec derive macro for ontio-std" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/ontio-std/Cargo.toml b/ontio-std/Cargo.toml index 6f53f97..ed42dde 100644 --- a/ontio-std/Cargo.toml +++ b/ontio-std/Cargo.toml @@ -3,15 +3,19 @@ name = "ontio-std" version = "0.1.0" authors = ["laizy "] edition = "2018" +license = "Apache-2.0/MIT" +homepage = "https://github.com/ontio/ontology-wasm-cdt-rust" +repository = "https://github.com/ontio/ontology-wasm-cdt-rust" +description = "development library for ontology wasm contract" [dependencies] wee_alloc = "0.4" -ontio-bump-alloc = {path = "../ontio-bump-alloc", optional = true} +ontio-bump-alloc = {version = "0.1", path = "../ontio-bump-alloc", optional = true} fixed-hash = { version = "0.4", default-features = false } cfg-if = { version = "0.1", default-features = false } byteorder = { version = "1", default-features= false, features = ["i128"] } -ontio-codegen = { path = "../ontio-codegen"} -ontio-derive-codec = { path = "../ontio-derive-codec"} +ontio-codegen = { version = "0.1", path = "../ontio-codegen"} +ontio-derive-codec = { version = "0.1", path = "../ontio-derive-codec"} sha2 = {version="0.8", optional=true} [dev-dependencies] diff --git a/ontio-std/src/abi/source.rs b/ontio-std/src/abi/source.rs index dd71f8d..ad36690 100644 --- a/ontio-std/src/abi/source.rs +++ b/ontio-std/src/abi/source.rs @@ -82,12 +82,12 @@ impl<'a> Source<'a> { T::decode(self) } - pub(crate) fn read_address(&mut self) -> Result<&'a Address, Error> { + pub fn read_address(&mut self) -> Result<&'a Address, Error> { let buf = self.next_bytes(20)?; Ok(unsafe { &*(buf.as_ptr() as *const Address) }) } - pub(crate) fn read_h256(&mut self) -> Result<&'a H256, Error> { + pub fn read_h256(&mut self) -> Result<&'a H256, Error> { let buf = self.next_bytes(32)?; Ok(unsafe { &*(buf.as_ptr() as *const H256) }) } diff --git a/ontio-std/src/runtime.rs b/ontio-std/src/runtime.rs index 9c33097..fc8bbb7 100644 --- a/ontio-std/src/runtime.rs +++ b/ontio-std/src/runtime.rs @@ -36,7 +36,7 @@ mod env { author_len: u32, email_ptr: *const u8, email_len: u32, desc_ptr: *const u8, desc_len: u32, new_addr_ptr: *mut u8, ) -> u32; - pub fn ontio_contract_delete() -> !; + pub fn ontio_contract_destroy() -> !; } } @@ -187,7 +187,7 @@ pub fn contract_migrate( ///delete the contract pub fn contract_delete() -> ! { unsafe { - env::ontio_contract_delete(); + env::ontio_contract_destroy(); } } ///Save key-value as a key-value pair