Comments (2)
As you've noticed, Address
is a type alias for H160
, which is a type constructed by the fixed-hash
crate. This crate was written in the pre-const times, where the amount of computation one could do in a const context was limited.
We still can't make H160::from
and H160::from_str
const, because the respective traits from std lib are not const.
We can however, add a separate const method to do a const construction.
A similar issue for uint
types is #585.
from parity-common.
Using hex-literal crate.
H160(hex_literal::hex!("0298F4332e3857631385b39766325058a93e249f")
from parity-common.
Related Issues (20)
- Drop support for databases repair attempt. HOT 12
- [primitive-types] support deserializing H256 et al from bytes as well as hex strings
- consider replacing `uint` with `ruint`
- New Release: kvdb-rocksdb HOT 6
- Issues wrapping ethereum types and deriving scale-codec methods HOT 2
- U256 type not impl Binary trait
- [rlp] Release v0.6.0 ? HOT 1
- No std/WASM issues compiling ethereum-types HOT 1
- Multiplying two UINT256 to a UINT512 HOT 1
- U256 type does not support `num_traits::int::PrimInt` HOT 3
- Could we have a new crates release for primitive-types please? HOT 1
- [rlp] `RlpIterator::len()` does not update when the iterator is consumed. HOT 1
- From<i64> impl is invalid HOT 2
- ethereum-types: Consider depending on uint v0.9.4 or above
- rlp: handling extra data HOT 1
- rlp: list length and contents are not validated
- Where is patricia-trie? HOT 1
- Implement BoundedVec with bound on both end HOT 2
- Implement `Serialize / Deserialize` for `BoundedBtreeSet` HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parity-common.