Skip to content

Commit d6527b0

Browse files
authored
Merge pull request #2458 from CosmWasm/co/uint256-coin
Use `Uint256` in `Coin`
2 parents f89d63b + c44ce2b commit d6527b0

25 files changed

+158
-117
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ and this project adheres to
5858
- cosmwasm-std: Remove previously deprecated `cosmwast_std::testing::mock_info`.
5959
Use `cosmwasm_std::testing::message_info` instead. ([#2393])
6060
- cosmwasm-std: Remove abort feature. ([#2141])
61+
- cosmwasm-std: Change `Coin::amount` to `Uint256` instead of `Uint128`.
62+
([#2458])
6163
- cosmwasm-std: Replace dependency `serde-json-wasm` with `serde_json`.
6264
([#2195])
6365
- cosmwasm-std: Make `GovMsg` `#[non_exhaustive]` for consistency. ([#2347])
@@ -97,6 +99,7 @@ and this project adheres to
9799
[#2432]: https://github.com/CosmWasm/cosmwasm/pull/2432
98100
[#2433]: https://github.com/CosmWasm/cosmwasm/pull/2433
99101
[#2438]: https://github.com/CosmWasm/cosmwasm/pull/2438
102+
[#2458]: https://github.com/CosmWasm/cosmwasm/pull/2458
100103

101104
## [2.2.0] - 2024-12-17
102105

contracts/hackatom/schema/hackatom.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -278,16 +278,16 @@
278278
],
279279
"properties": {
280280
"amount": {
281-
"$ref": "#/definitions/Uint128"
281+
"$ref": "#/definitions/Uint256"
282282
},
283283
"denom": {
284284
"type": "string"
285285
}
286286
},
287287
"additionalProperties": false
288288
},
289-
"Uint128": {
290-
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
289+
"Uint256": {
290+
"description": "An implementation of u256 that is using strings for JSON encoding/decoding, such that the full u256 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `new` to create instances out of u128, `from` for other primitive uint types or `from_be_bytes` to provide big endian bytes:\n\n``` # use cosmwasm_std::Uint256; let a = Uint256::new(258u128); let b = Uint256::from(258u16); let c = Uint256::from_be_bytes([ 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 1u8, 2u8, ]); assert_eq!(a, b); assert_eq!(a, c); ```",
291291
"type": "string"
292292
}
293293
}

contracts/hackatom/schema/raw/response_to_other_balance.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@
2424
],
2525
"properties": {
2626
"amount": {
27-
"$ref": "#/definitions/Uint128"
27+
"$ref": "#/definitions/Uint256"
2828
},
2929
"denom": {
3030
"type": "string"
3131
}
3232
},
3333
"additionalProperties": false
3434
},
35-
"Uint128": {
36-
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
35+
"Uint256": {
36+
"description": "An implementation of u256 that is using strings for JSON encoding/decoding, such that the full u256 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `new` to create instances out of u128, `from` for other primitive uint types or `from_be_bytes` to provide big endian bytes:\n\n``` # use cosmwasm_std::Uint256; let a = Uint256::new(258u128); let b = Uint256::from(258u16); let c = Uint256::from_be_bytes([ 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 1u8, 2u8, ]); assert_eq!(a, b); assert_eq!(a, c); ```",
3737
"type": "string"
3838
}
3939
}

contracts/hackatom/schema/raw/sudo.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@
4141
],
4242
"properties": {
4343
"amount": {
44-
"$ref": "#/definitions/Uint128"
44+
"$ref": "#/definitions/Uint256"
4545
},
4646
"denom": {
4747
"type": "string"
4848
}
4949
},
5050
"additionalProperties": false
5151
},
52-
"Uint128": {
53-
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
52+
"Uint256": {
53+
"description": "An implementation of u256 that is using strings for JSON encoding/decoding, such that the full u256 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `new` to create instances out of u128, `from` for other primitive uint types or `from_be_bytes` to provide big endian bytes:\n\n``` # use cosmwasm_std::Uint256; let a = Uint256::new(258u128); let b = Uint256::from(258u16); let c = Uint256::from_be_bytes([ 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 1u8, 2u8, ]); assert_eq!(a, b); assert_eq!(a, c); ```",
5454
"type": "string"
5555
}
5656
}

contracts/ibc-reflect-send/schema/ibc-reflect-send.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
],
186186
"properties": {
187187
"amount": {
188-
"$ref": "#/definitions/Uint128"
188+
"$ref": "#/definitions/Uint256"
189189
},
190190
"denom": {
191191
"type": "string"
@@ -662,8 +662,8 @@
662662
}
663663
]
664664
},
665-
"Uint128": {
666-
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
665+
"Uint256": {
666+
"description": "An implementation of u256 that is using strings for JSON encoding/decoding, such that the full u256 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `new` to create instances out of u128, `from` for other primitive uint types or `from_be_bytes` to provide big endian bytes:\n\n``` # use cosmwasm_std::Uint256; let a = Uint256::new(258u128); let b = Uint256::from(258u16); let c = Uint256::from_be_bytes([ 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 1u8, 2u8, ]); assert_eq!(a, b); assert_eq!(a, c); ```",
667667
"type": "string"
668668
},
669669
"Uint64": {
@@ -962,7 +962,7 @@
962962
],
963963
"properties": {
964964
"amount": {
965-
"$ref": "#/definitions/Uint128"
965+
"$ref": "#/definitions/Uint256"
966966
},
967967
"denom": {
968968
"type": "string"
@@ -978,8 +978,8 @@
978978
}
979979
]
980980
},
981-
"Uint128": {
982-
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
981+
"Uint256": {
982+
"description": "An implementation of u256 that is using strings for JSON encoding/decoding, such that the full u256 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `new` to create instances out of u128, `from` for other primitive uint types or `from_be_bytes` to provide big endian bytes:\n\n``` # use cosmwasm_std::Uint256; let a = Uint256::new(258u128); let b = Uint256::from(258u16); let c = Uint256::from_be_bytes([ 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 1u8, 2u8, ]); assert_eq!(a, b); assert_eq!(a, c); ```",
983983
"type": "string"
984984
},
985985
"Uint64": {
@@ -1062,7 +1062,7 @@
10621062
],
10631063
"properties": {
10641064
"amount": {
1065-
"$ref": "#/definitions/Uint128"
1065+
"$ref": "#/definitions/Uint256"
10661066
},
10671067
"denom": {
10681068
"type": "string"
@@ -1078,8 +1078,8 @@
10781078
}
10791079
]
10801080
},
1081-
"Uint128": {
1082-
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
1081+
"Uint256": {
1082+
"description": "An implementation of u256 that is using strings for JSON encoding/decoding, such that the full u256 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `new` to create instances out of u128, `from` for other primitive uint types or `from_be_bytes` to provide big endian bytes:\n\n``` # use cosmwasm_std::Uint256; let a = Uint256::new(258u128); let b = Uint256::from(258u16); let c = Uint256::from_be_bytes([ 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 1u8, 2u8, ]); assert_eq!(a, b); assert_eq!(a, c); ```",
10831083
"type": "string"
10841084
},
10851085
"Uint64": {

contracts/ibc-reflect-send/schema/ibc/acknowledgement_msg_balances.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,16 @@
5757
],
5858
"properties": {
5959
"amount": {
60-
"$ref": "#/definitions/Uint128"
60+
"$ref": "#/definitions/Uint256"
6161
},
6262
"denom": {
6363
"type": "string"
6464
}
6565
},
6666
"additionalProperties": false
6767
},
68-
"Uint128": {
69-
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
68+
"Uint256": {
69+
"description": "An implementation of u256 that is using strings for JSON encoding/decoding, such that the full u256 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `new` to create instances out of u128, `from` for other primitive uint types or `from_be_bytes` to provide big endian bytes:\n\n``` # use cosmwasm_std::Uint256; let a = Uint256::new(258u128); let b = Uint256::from(258u16); let c = Uint256::from_be_bytes([ 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 1u8, 2u8, ]); assert_eq!(a, b); assert_eq!(a, c); ```",
7070
"type": "string"
7171
}
7272
}

contracts/ibc-reflect-send/schema/ibc/packet_msg.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
],
127127
"properties": {
128128
"amount": {
129-
"$ref": "#/definitions/Uint128"
129+
"$ref": "#/definitions/Uint256"
130130
},
131131
"denom": {
132132
"type": "string"
@@ -603,8 +603,8 @@
603603
}
604604
]
605605
},
606-
"Uint128": {
607-
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
606+
"Uint256": {
607+
"description": "An implementation of u256 that is using strings for JSON encoding/decoding, such that the full u256 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `new` to create instances out of u128, `from` for other primitive uint types or `from_be_bytes` to provide big endian bytes:\n\n``` # use cosmwasm_std::Uint256; let a = Uint256::new(258u128); let b = Uint256::from(258u16); let c = Uint256::from_be_bytes([ 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 1u8, 2u8, ]); assert_eq!(a, b); assert_eq!(a, c); ```",
608608
"type": "string"
609609
},
610610
"Uint64": {

contracts/ibc-reflect-send/schema/raw/execute.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174
],
175175
"properties": {
176176
"amount": {
177-
"$ref": "#/definitions/Uint128"
177+
"$ref": "#/definitions/Uint256"
178178
},
179179
"denom": {
180180
"type": "string"
@@ -651,8 +651,8 @@
651651
}
652652
]
653653
},
654-
"Uint128": {
655-
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
654+
"Uint256": {
655+
"description": "An implementation of u256 that is using strings for JSON encoding/decoding, such that the full u256 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `new` to create instances out of u128, `from` for other primitive uint types or `from_be_bytes` to provide big endian bytes:\n\n``` # use cosmwasm_std::Uint256; let a = Uint256::new(258u128); let b = Uint256::from(258u16); let c = Uint256::from_be_bytes([ 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 1u8, 2u8, ]); assert_eq!(a, b); assert_eq!(a, c); ```",
656656
"type": "string"
657657
},
658658
"Uint64": {

contracts/ibc-reflect-send/schema/raw/response_to_account.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
],
4444
"properties": {
4545
"amount": {
46-
"$ref": "#/definitions/Uint128"
46+
"$ref": "#/definitions/Uint256"
4747
},
4848
"denom": {
4949
"type": "string"
@@ -59,8 +59,8 @@
5959
}
6060
]
6161
},
62-
"Uint128": {
63-
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
62+
"Uint256": {
63+
"description": "An implementation of u256 that is using strings for JSON encoding/decoding, such that the full u256 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `new` to create instances out of u128, `from` for other primitive uint types or `from_be_bytes` to provide big endian bytes:\n\n``` # use cosmwasm_std::Uint256; let a = Uint256::new(258u128); let b = Uint256::from(258u16); let c = Uint256::from_be_bytes([ 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 1u8, 2u8, ]); assert_eq!(a, b); assert_eq!(a, c); ```",
6464
"type": "string"
6565
},
6666
"Uint64": {

contracts/ibc-reflect-send/schema/raw/response_to_list_accounts.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
],
5959
"properties": {
6060
"amount": {
61-
"$ref": "#/definitions/Uint128"
61+
"$ref": "#/definitions/Uint256"
6262
},
6363
"denom": {
6464
"type": "string"
@@ -74,8 +74,8 @@
7474
}
7575
]
7676
},
77-
"Uint128": {
78-
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
77+
"Uint256": {
78+
"description": "An implementation of u256 that is using strings for JSON encoding/decoding, such that the full u256 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `new` to create instances out of u128, `from` for other primitive uint types or `from_be_bytes` to provide big endian bytes:\n\n``` # use cosmwasm_std::Uint256; let a = Uint256::new(258u128); let b = Uint256::from(258u16); let c = Uint256::from_be_bytes([ 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 1u8, 2u8, ]); assert_eq!(a, b); assert_eq!(a, c); ```",
7979
"type": "string"
8080
},
8181
"Uint64": {

contracts/ibc-reflect/schema/ibc/acknowledgement_msg_balance.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,16 @@
5454
],
5555
"properties": {
5656
"amount": {
57-
"$ref": "#/definitions/Uint128"
57+
"$ref": "#/definitions/Uint256"
5858
},
5959
"denom": {
6060
"type": "string"
6161
}
6262
},
6363
"additionalProperties": false
6464
},
65-
"Uint128": {
66-
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
65+
"Uint256": {
66+
"description": "An implementation of u256 that is using strings for JSON encoding/decoding, such that the full u256 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `new` to create instances out of u128, `from` for other primitive uint types or `from_be_bytes` to provide big endian bytes:\n\n``` # use cosmwasm_std::Uint256; let a = Uint256::new(258u128); let b = Uint256::from(258u16); let c = Uint256::from_be_bytes([ 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 1u8, 2u8, ]); assert_eq!(a, b); assert_eq!(a, c); ```",
6767
"type": "string"
6868
}
6969
}

0 commit comments

Comments
 (0)