Skip to content

Conversation

@mina86
Copy link
Contributor

@mina86 mina86 commented Aug 15, 2023

For data structures which are part of public API consistently use
Dispalyed wrapper for u128 and u64 integers. This is to make sure
that the numbers are encoded as strings when serialising to JSON.

This doesn’t change anything right now but future upgrades of
serde-json-wasm will change how integers are serialised so this is
future-proofing the code.

While at it, since Displayed is a shared wrapper used by various
modules, move it to shared module rather than keeping it in asset.

Required for merge:

  • pr-workflow-check / draft-release-check is ✅ success
  • Other rules GitHub shows you, or can be read in configuration

Makes review faster:

  • PR title is my best effort to provide summary of changes and has clear text to be part of release notes
  • I marked PR by misc label if it should not be in release notes
  • Linked Zenhub/Github/Slack/etc reference if one exists
  • I was clear on what type of deployment required to release my changes (node, runtime, contract, indexer, on chain operation, frontend, infrastructure) if any in PR title or description
  • Added reviewer into Reviewers
  • I tagged(@) or used other form of notification of one person who I think can handle best review of this PR
  • I have proved that PR has no general regressions of relevant features and processes required to release into production
  • Any dependency updates made, was done according guides from relevant dependency
  • Clicking all checkboxes
  • Adding detailed description of changes when it feels appropriate (for example when PR is big)

@mina86 mina86 added the Misc I marked PR by `misc` label if it should not be in release notes #owned:terraform label Aug 15, 2023
@github-actions
Copy link

Pull reviewers stats

Stats of the last 30 days for composable:

User Total reviews Time to review Total comments
dzmitry-lahoda 27 10h 33m 19
blasrodri 20 1h 23m 13
mina86 17 18h 2m 87
RustNinja 16 1h 11m 2
kkast 12 3h 53m 7
vmarkushin 3 7h 2
JafarAz 3 9h 25m 0
0xBrainjar2 1 3d 17h 35m 6

@github-actions
Copy link

# run Composable node
nix run "github:ComposableFi/composable/refs/pull/4073/merge" --allow-import-from-derivation --extra-experimental-features "flakes nix-command" --no-sandbox --accept-flake-config --option sandbox relaxed
# run local Picasso DevNet (for CosmWasm development)
nix run "github:ComposableFi/composable/refs/pull/4073/merge#devnet-picasso" --allow-import-from-derivation --extra-experimental-features "flakes nix-command" --no-sandbox --accept-flake-config --option sandbox relaxed 
# CosmWasm on Substrate CLI tool
nix run "github:ComposableFi/composable/refs/pull/4073/merge#ccw" --allow-import-from-derivation --extra-experimental-features "flakes nix-command" --no-sandbox --accept-flake-config --option sandbox relaxed 
# run cross chain devnet with Dotsama and Cosmos nodes 
nix run "github:ComposableFi/composable/refs/pull/4073/merge#devnet-xc-fresh" --allow-import-from-derivation --extra-experimental-features "flakes nix-command" --no-sandbox --accept-flake-config --option sandbox relaxed 
# or same with docker
nix build "github:ComposableFi/composable/refs/pull/4073/merge#devnet-xc-image" --allow-import-from-derivation --extra-experimental-features "flakes nix-command" --no-sandbox --accept-flake-config --option sandbox relaxed \
&& docker load --input result && docker run -it --entrypoint bash devnet-xc:latest -c /bin/devnet-xc-fresh 

About nix

@dzmitry-lahoda dzmitry-lahoda self-requested a review August 15, 2023 20:36
dzmitry-lahoda
dzmitry-lahoda previously approved these changes Aug 15, 2023
@dzmitry-lahoda
Copy link
Contributor

from Into u128? because uXxx and Uxxx, all do it. same for u64. i guess it may work no macro.

@mina86 mina86 added this pull request to the merge queue Aug 15, 2023
@mina86
Copy link
Contributor Author

mina86 commented Aug 15, 2023

cosmwasm uses explicit definitions for Uint128, see https://docs.rs/cosmwasm-std/latest/src/cosmwasm_std/math/uint128.rs.html#273. If there is some way to make derive_macro or something else work, I certainly don’t see it.

Merged via the queue into main with commit 71e062b Aug 15, 2023
@mina86 mina86 deleted the mpn/c branch August 15, 2023 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Misc I marked PR by `misc` label if it should not be in release notes #owned:terraform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants