-
Notifications
You must be signed in to change notification settings - Fork 16
Conversation
src/ext.rs
Outdated
@@ -81,7 +84,7 @@ pub fn create(endowment: &[u8; 32], code: &[u8]) -> Result<[u8; 20], Error> { | |||
} | |||
} | |||
|
|||
pub fn call(address: &[u8; 20], value: &[u8; 32], input: &[u8], result: &mut [u8]) -> Result<(), Error> { | |||
pub fn call(address: &Address, value: &[u8; 32], input: &[u8], result: &mut [u8]) -> Result<(), Error> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
U256 on value?
should convert then to bigendian and pass
src/ext.rs
Outdated
unsafe { external::suicide(refund.as_ptr()); } | ||
} | ||
|
||
pub fn create(endowment: &[u8; 32], code: &[u8]) -> Result<[u8; 20], Error> { | ||
let mut result = [0u8; 20]; | ||
pub fn create(endowment: &[u8; 32], code: &[u8]) -> Result<Address, Error> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same with U256
block_hash should also return H256 |
gas_limit and difficulty should return U256 |
Commit messages should be little more meaningful or i'll squash them |
src/lib.rs
Outdated
let mut value = [0u8; 32]; | ||
value.copy_from_slice(&self.raw[60..92]); | ||
value | ||
U256::from(value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better explicitly use from_big_endian
here
I know, I'm planning to squash them before merge |
- changed interfaces of storage, ext and ParamsView to use H160, H256 and bignum::U256 primitives
use of H256 and H160 instead of plain u8-arrays