Skip to content

Commit e55178a

Browse files
User Registry contract implementation (#354)
* User Registry contract implementation * added chengelog * recompiled contracts
1 parent 43ce39d commit e55178a

20 files changed

+503
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Add a User Registry contract that will manage the mappings between user IDs and their respective Proxy contract instances. ([\#354](https://github.com/informalsystems/hydro/pull/354))

Cargo.lock

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ members = [
1212
"contracts/inflow/vault",
1313
"contracts/inflow/control-center",
1414
"contracts/inflow/proxy",
15+
"contracts/inflow/user-registry",
1516
"packages/cw-orch-interface",
1617
"packages/interface",
1718
"packages/test-utils",

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ schema:
4747
cd contracts/inflow/vault && cargo run --bin inflow_vault_schema
4848
cd contracts/inflow/proxy && cargo run --bin inflow_proxy_schema
4949
cd contracts/inflow/control-center && cargo run --bin inflow_control_center_schema
50+
cd contracts/inflow/user-registry && cargo run --bin inflow_user_registry_schema
5051

5152
$(MAKE) ts-codegen-inner SCHEMA_LOCATION=./contracts/hydro/schema NAME=HydroBase
5253
$(MAKE) ts-codegen-inner SCHEMA_LOCATION=./contracts/tribute/schema NAME=TributeBase
@@ -59,6 +60,7 @@ schema:
5960
$(MAKE) ts-codegen-inner SCHEMA_LOCATION=./contracts/inflow/vault/schema NAME=InflowVaultBase
6061
$(MAKE) ts-codegen-inner SCHEMA_LOCATION=./contracts/inflow/proxy/schema NAME=InflowProxyBase
6162
$(MAKE) ts-codegen-inner SCHEMA_LOCATION=./contracts/inflow/control-center/schema NAME=InflowControlCenterBase
63+
$(MAKE) ts-codegen-inner SCHEMA_LOCATION=./contracts/inflow/user-registry/schema NAME=InflowUserRegistryBase
6264

6365
ts-codegen-inner:
6466
cosmwasm-ts-codegen generate \

artifacts/checksums.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ d0fba7e337da1f00b3f0e8987530fbdfda53a89a81a5767516372a97fe3b0a67 marketplace.wa
99
76701e6e9c5d49ead12bb278b66fca39f988f0599febbd18a146f8c4a150c315 proxy.wasm
1010
32a36e944eaf8f7c527dc95db123a9779830e1f1d69a804411d7036caf25822a st_token_info_provider.wasm
1111
b0dfafc02e2e752bc9edb87f34c352f2759cdb3ef5d009c991aa2206407df0e4 tribute.wasm
12+
89be98f04dfcf6876b2e6e24973c7f3534b9fccc0ce36a819f72a71d242ea721 user_registry.wasm
1213
0756364fb18379a1c206953f276369d95dd36979974152364854d7bb06f6f2b6 vault.wasm

artifacts/user_registry.wasm

184 KB
Binary file not shown.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[package]
2+
name = "user-registry"
3+
version = { workspace = true }
4+
edition = { workspace = true }
5+
6+
[lib]
7+
crate-type = ["cdylib", "rlib"]
8+
9+
[features]
10+
library = []
11+
12+
[dependencies]
13+
cosmwasm-std = { workspace = true }
14+
cosmwasm-schema = { workspace = true }
15+
cw-storage-plus = { workspace = true }
16+
cw2 = { workspace = true }
17+
serde = { workspace = true }
18+
schemars = { workspace = true }
19+
thiserror = { workspace = true }
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "ExecuteMsg",
4+
"oneOf": [
5+
{
6+
"type": "object",
7+
"required": [
8+
"register_user"
9+
],
10+
"properties": {
11+
"register_user": {
12+
"type": "object",
13+
"required": [
14+
"proxy_address",
15+
"user_id"
16+
],
17+
"properties": {
18+
"proxy_address": {
19+
"type": "string"
20+
},
21+
"user_id": {
22+
"type": "string"
23+
}
24+
},
25+
"additionalProperties": false
26+
}
27+
},
28+
"additionalProperties": false
29+
}
30+
]
31+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "InstantiateMsg",
4+
"type": "object",
5+
"required": [
6+
"admins"
7+
],
8+
"properties": {
9+
"admins": {
10+
"type": "array",
11+
"items": {
12+
"type": "string"
13+
}
14+
}
15+
},
16+
"additionalProperties": false
17+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "QueryMsg",
4+
"oneOf": [
5+
{
6+
"type": "object",
7+
"required": [
8+
"proxy_address"
9+
],
10+
"properties": {
11+
"proxy_address": {
12+
"type": "object",
13+
"required": [
14+
"user_id"
15+
],
16+
"properties": {
17+
"user_id": {
18+
"type": "string"
19+
}
20+
},
21+
"additionalProperties": false
22+
}
23+
},
24+
"additionalProperties": false
25+
}
26+
]
27+
}

0 commit comments

Comments
 (0)