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