Conversation
...account RPC Signed-off-by: Iulian Barbu <[email protected]>
Signed-off-by: Iulian Barbu <[email protected]>
Signed-off-by: Iulian Barbu <[email protected]>
Signed-off-by: Iulian Barbu <[email protected]>
...account test Signed-off-by: Iulian Barbu <[email protected]>
Signed-off-by: Iulian Barbu <[email protected]>
Signed-off-by: Iulian Barbu <[email protected]>
Signed-off-by: Iulian Barbu <[email protected]>
Signed-off-by: Iulian Barbu <[email protected]>
Signed-off-by: Iulian Barbu <[email protected]>
| redundant-lifetimes = "warn" | ||
| rust-2018-idioms = "warn" | ||
| unused-must-use = "warn" | ||
| unexpected_cfgs = { level = "warn", check-cfg = ['cfg(substrate_runtime)'] } |
There was a problem hiding this comment.
needed to supress some warnings after overriding the host functions
|
From @alindima offline:
|
|
IIRC this could also be configured via CLI |
Good catch, the auto impersonation enabling can be done via CLI too. Will add support for this, thanks! |
Signed-off-by: Iulian Barbu <[email protected]>
Signed-off-by: Iulian Barbu <[email protected]>
Signed-off-by: Iulian Barbu <[email protected]>
Signed-off-by: Iulian Barbu <[email protected]>
Signed-off-by: Iulian Barbu <[email protected]>
Signed-off-by: Iulian Barbu <[email protected]>
…alse Signed-off-by: Iulian Barbu <[email protected]>
Also created the impersonation manager accounting for the `enable_auto_impersonate` anvil config flag. Signed-off-by: Iulian Barbu <[email protected]>
Signed-off-by: Iulian Barbu <[email protected]>
Signed-off-by: Iulian Barbu <[email protected]>
...touched Cargo.tomls Signed-off-by: Iulian Barbu <[email protected]>
cc @alindima
@AlexandruCihodaru given our discussion offline about the toml formatters, I added a .taplo.toml config file, same as the one used by taplo itself. I don't think it is a bad idea doing it at this point, since editors differ in how they treat identation so using same formatting will simplify reviews. Alternatively we can reuse same config as for polkadot-sdk, but I don't think it is important. I might be able to do it in a separate PR but I think it is a bit pointless to revert the changes (they aren't that many and also they are simple to review). Either way please lmk your thoughts. |
Signed-off-by: Iulian Barbu <[email protected]>
| // Assert on balances after first transfer. | ||
| let alith_final_balance = node.get_balance(alith_account.address(), latest_block).await; | ||
| let dest_final_balance = node.get_balance(dest_h160, latest_block).await; | ||
| let existential_deposit = U256::from_str_radix("100000000000000000000", 10).unwrap(); |
There was a problem hiding this comment.
nit: make this a constant in utils.rs because it could be useful in other tests
There was a problem hiding this comment.
and make it use the constant in substrate_runtime::currency::DOLLARS under the hood
There was a problem hiding this comment.
Created a u128 cost, and whenever needed as u256 I am converting it. Did it this way to avoid creating a static/lazylock (since a cost u256 creation requires calling non-const fn's like U256::from(..).unwrap(), which can not be done with consts): bcab3f9
.config/.taplo.toml
Outdated
| "target", | ||
| ] | ||
|
|
||
| [formatting] |
There was a problem hiding this comment.
do we have a CI step for checking this format? Because if we don't, it's not that useful. Not everyone uses a code editor that automatically uses taplo for formatting.
Also, where did we get this taplo format from? I am not a big fan of the rule which adds whitespace in order to align the = signs in dependency lists.
Overall I'm not really sure we need it at this point. Anyway, let's not bundle this in this PR, as it's unrelated and would be best to also ask the embedded EVM guys for feedback
There was a problem hiding this comment.
do we have a CI step for checking this format?
We should add one. I can work on this in some other PR, once a taplo config makes its way into the repo.
Because if we don't, it's not that useful. Not everyone uses a code editor that automatically uses taplo for formatting.
It is not a matter of automatically using taplo with the code editor, but to configure it (assuming our code editors allows it). I thought that our team should have taplo configured already given we also opened in the past PRs against polkadot-sdk.
Also, where did we get this taplo format from? I am not a big fan of the rule which adds whitespace in order to align the = signs in dependency lists.
It is the taplo config used by the taplo-cli repo. Changing a rule or the entire taplo config is straight forward (with the caveat that all tomls from anvil-polkadot should be formatted afterward). I am fine with most of the rules, only to have all of us use the same ones.
Overall I'm not really sure we need it at this point. Anyway, let's not bundle this in this PR, as it's unrelated and would be best to also ask the embedded EVM guys for feedback
Sure, we can ask. By then I'll revert my toml changes. I hoped we can align quickly behind some "battle tested" formatting, whichever that is and assumed people can comply easily with taplo formatting in their editors (given our previous polkadot-sdk practice), and preferences to be factored in incrementally. Will open a new PR on this subject, maybe with the formatting rules of polkadot-sdk (since we know them already).
There was a problem hiding this comment.
This could be useful, but we should request feedback on the other devs working on the repo (since it affects all of us) and make sure that it's enforced by CI (otherwise it's not that useful)
| // Assert on balances after first transfer. | ||
| let alith_final_balance = node.get_balance(alith_account.address(), latest_block).await; | ||
| let dest_final_balance = node.get_balance(dest_h160, latest_block).await; | ||
| let existential_deposit = U256::from_str_radix("100000000000000000000", 10).unwrap(); |
There was a problem hiding this comment.
and make it use the constant in substrate_runtime::currency::DOLLARS under the hood
Signed-off-by: Iulian Barbu <[email protected]>
Signed-off-by: Iulian Barbu <[email protected]>
Signed-off-by: Iulian Barbu <[email protected]>
|
Some unrelated tests are failing, will have to look into it too before merging. |
I think this will fix them: #338. I think we can merge it since it's unrelated and the fix is in review |
Signed-off-by: Iulian Barbu <[email protected]>
Signed-off-by: Iulian Barbu <[email protected]>
Motivation
Closes #242 .
Solution