Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
205 commits
Select commit Hold shift + click to select a range
0c050c6
added dummy README file
davidatwhiletrue May 27, 2024
cd1bde7
added gitignore
davidatwhiletrue May 27, 2024
b195566
added happy path scenarios
davidatwhiletrue May 27, 2024
eda23e0
added emitted events
davidatwhiletrue May 27, 2024
642a48e
highlight off-chain system with lightblue color.
davidatwhiletrue May 27, 2024
fa0f28b
Handling Ihor's feedback (WIP)
davidatwhiletrue May 29, 2024
bb6a75a
Update sequence diagrams
davidatwhiletrue May 30, 2024
f51c909
test gh action
davidatwhiletrue May 30, 2024
bee4886
test gh action
davidatwhiletrue May 30, 2024
a6b00fd
test gh action
davidatwhiletrue May 30, 2024
45a03cf
test gh action
davidatwhiletrue May 30, 2024
d5fca2d
fix readme
davidatwhiletrue May 30, 2024
31f22c8
test gh action
davidatwhiletrue May 30, 2024
dd76255
Merge remote-tracking branch 'origin/sequence-diagram' into sequence-…
davidatwhiletrue May 30, 2024
996b0bb
Render PlantUML files
davidatwhiletrue May 30, 2024
541a8a1
test gh action
davidatwhiletrue May 30, 2024
8083ba9
Merge remote-tracking branch 'origin/sequence-diagram' into sequence-…
davidatwhiletrue May 30, 2024
b166665
Render PlantUML files
davidatwhiletrue May 30, 2024
1cc5e55
added voucher verification on renewals
davidatwhiletrue Jun 6, 2024
c4730af
modifications after gathering feedback from D3.
davidatwhiletrue Jun 8, 2024
2462418
Render PlantUML files
davidatwhiletrue Jun 8, 2024
8e853dc
few fixes
davidatwhiletrue Jun 8, 2024
a723999
Render PlantUML files
davidatwhiletrue Jun 8, 2024
6a31bf0
few text fixes.
davidatwhiletrue Jun 10, 2024
1abd55c
Merge remote-tracking branch 'origin/sequence-diagram-d3-feedback_inc…
davidatwhiletrue Jun 10, 2024
d413150
Render PlantUML files
davidatwhiletrue Jun 10, 2024
3b63852
WIP
zie1ony May 16, 2024
249f5cf
Merge branch 'master' into develop
zie1ony Jun 10, 2024
3d21081
Merge remote-tracking branch 'make/sequence-diagram-d3-feedback_inclu…
zie1ony Jun 10, 2024
de84402
Merge-docs
zie1ony Jun 10, 2024
62b3b11
Renamed Registry contract with NameToken in the sequence diagrams.
davidatwhiletrue Jun 11, 2024
d69fe43
Render PlantUML files
davidatwhiletrue Jun 11, 2024
7f6b62d
Renamed Registry contract with NameToken in the sequence diagrams. (p…
davidatwhiletrue Jun 12, 2024
e569eda
Render PlantUML files
davidatwhiletrue Jun 12, 2024
3a68741
Renamed Registry contract with NameToken in the sequence diagrams. (p…
davidatwhiletrue Jun 12, 2024
731c2f4
Merge remote-tracking branch 'origin/develop' into develop
davidatwhiletrue Jun 12, 2024
36ba211
Render PlantUML files
davidatwhiletrue Jun 12, 2024
fff6102
Removed can_transfer call and added a check for expiration date in th…
davidatwhiletrue Jun 12, 2024
4b4707d
Render PlantUML files
davidatwhiletrue Jun 12, 2024
bc15c4a
Basic Registrar
zie1ony Jun 13, 2024
18df92b
expire(), admin_transfer(), and admin_burn() registrar methods take n…
davidatwhiletrue Jun 13, 2024
35347f9
Merge remote-tracking branch 'origin/develop' into develop
davidatwhiletrue Jun 13, 2024
7bb7a6f
Render PlantUML files
davidatwhiletrue Jun 13, 2024
6c0478a
added set_signer and set_treasury methods to controller and d3 operat…
davidatwhiletrue Jun 13, 2024
ddf7845
Render PlantUML files
davidatwhiletrue Jun 13, 2024
7f07f16
Merge pull request #2 from make-software/set_signer
davidatwhiletrue Jun 17, 2024
5ed947b
Registrar basic implementation
zie1ony Jun 17, 2024
333eaec
Merge branch 'develop' of github.com:make-software/cspr-name-contract…
zie1ony Jun 17, 2024
74bf075
Tests reworked
zie1ony Jun 21, 2024
378b0f1
wip
zie1ony Jul 2, 2024
b3233ba
Use External and the new unwrap_or_revert_interface
kpob Jul 3, 2024
710fe1f
Update Controller and Registrar contracts
kpob Jul 4, 2024
ebb5fcb
Add voucher_expiration field to each voucher type
kpob Jul 5, 2024
41fdd81
Set github as the odra source
kpob Jul 5, 2024
58534f5
Update tests, fix register() and renew() logic
kpob Jul 5, 2024
08b3cf5
use the name `token_hash` instead of `label`
kpob Jul 5, 2024
0ef1290
Add more test scenarios
kpob Jul 8, 2024
e8660f9
Update vouchers structures and entrypoint names for buying and renewing
kpob Jul 9, 2024
f732153
Add Resolver interface
kpob Jul 9, 2024
c05e7a5
Update burning and resolving flow
kpob Jul 10, 2024
61ab6c6
Prevent non-owner users from setting a resolver
kpob Jul 10, 2024
1812a50
Limit registrar functions visibility
kpob Jul 10, 2024
f47e2bf
Fixes to Controller and mock buy cli
zie1ony Jul 10, 2024
2f7906e
Complete DefaultResolver
kpob Jul 11, 2024
b0ea3cb
Resolve error numbers conflict
kpob Jul 11, 2024
b36c5b1
Add more test cases for DefaultResolver
kpob Jul 11, 2024
fe39b95
Tests for NameToken
kpob Jul 12, 2024
fa3b629
more test cases for Controller and Registrar
kpob Jul 15, 2024
9f72fee
Fix set_resolver and prolong logic
kpob Jul 15, 2024
9768e11
Rename token-hash to name
zie1ony Jul 16, 2024
3f9942f
New deployed contracts
zie1ony Jul 16, 2024
976e3d2
Change Minting mode to ACL from Public.
zie1ony Jul 23, 2024
f7a532a
Include events in the schema
zie1ony Jul 24, 2024
9314dbf
Structs examples.
zie1ony Jul 30, 2024
9087e35
Validate payment amount
kpob Jul 30, 2024
c309fdf
Add more commands to the cli
kpob Jul 30, 2024
9f87fec
Update the Controller contract
kpob Jul 30, 2024
0c1e63d
Increase the time that reminting is disallowed
kpob Jul 30, 2024
a2a26a2
Change NameTokenMetadata structure
kpob Jul 30, 2024
0f1f71a
Changes to buy cspr name:
davidatwhiletrue Aug 6, 2024
e828a9a
Render PlantUML files
davidatwhiletrue Aug 6, 2024
dd57335
Changes to renew cspr name:
davidatwhiletrue Aug 6, 2024
7f631b6
Merge remote-tracking branch 'origin/sequence-diagrams-updates' into …
davidatwhiletrue Aug 6, 2024
42fefbc
Render PlantUML files
davidatwhiletrue Aug 6, 2024
5f8df91
Changes to registrar admin functions:
davidatwhiletrue Aug 6, 2024
01ea687
Merge remote-tracking branch 'origin/sequence-diagrams-updates' into …
davidatwhiletrue Aug 6, 2024
b8e93c8
Render PlantUML files
davidatwhiletrue Aug 6, 2024
6bb6081
Add SecondaryMarket contract
kpob Aug 6, 2024
b641412
Changes to controller and resolution:
davidatwhiletrue Aug 7, 2024
9d4093c
Render PlantUML files
davidatwhiletrue Aug 7, 2024
dbe02e2
trigger png update
davidatwhiletrue Aug 7, 2024
ce7b0a5
Merge remote-tracking branch 'origin/sequence-diagrams-updates' into …
davidatwhiletrue Aug 7, 2024
13c1b0f
- added set_default_resolver() to admin functions
davidatwhiletrue Aug 8, 2024
a68ec52
Render PlantUML files
davidatwhiletrue Aug 8, 2024
eab7fdb
expire_single() burns the token only if the 'pending delete period' …
kpob Aug 8, 2024
7fbcfcd
Unify naming, update Resolver.cleanup()
kpob Aug 8, 2024
4c71fe4
fixed set-default-resolver.puml path in md page.
davidatwhiletrue Aug 9, 2024
6f376cf
Move default resolver to NameToken contract
kpob Aug 9, 2024
3e7c7df
Update Secondary market
kpob Aug 9, 2024
e85ab92
Use odra-cli , remove custom cli
kpob Jul 30, 2024
c070fd2
Align to the current version of odra-cli
kpob Aug 8, 2024
03e016d
Update config scenario and deploy script
kpob Aug 9, 2024
eab9499
Add more test cases
kpob Aug 9, 2024
a1453ab
Implement js client for smart contracts
Volodymyr-Kuchinskyi Aug 13, 2024
ce96863
Merge pull request #4 from make-software/default-resolver-on-nametoken
zie1ony Aug 14, 2024
3451fde
Merge pull request #3 from make-software/sequence-diagrams-updates
zie1ony Aug 14, 2024
c6bbb95
Merge pull request #6 from make-software/odra-cli
zie1ony Aug 14, 2024
37af774
Updated schema
zie1ony Aug 14, 2024
74cf605
Add renaming
Volodymyr-Kuchinskyi Aug 21, 2024
06e5f3d
Added serialization/deserialization logic
Volodymyr-Kuchinskyi Aug 21, 2024
5508c9f
Fix PR review comments
Volodymyr-Kuchinskyi Aug 29, 2024
13c475e
Merge branch 'develop' into contracts-js-wrapper
Volodymyr-Kuchinskyi Aug 30, 2024
4cd49af
Adjust the code with examples
Volodymyr-Kuchinskyi Aug 30, 2024
de8fa08
Added admin functions for registrar for js wrapper
Volodymyr-Kuchinskyi Aug 30, 2024
5e5df08
Added name token admin functions for js wrapper
Volodymyr-Kuchinskyi Aug 30, 2024
5a26b15
Merge pull request #5 from make-software/contracts-js-wrapper
Volodymyr-Kuchinskyi Aug 30, 2024
45924dc
registrar has controller_prolong and admin_prolong
zie1ony Sep 5, 2024
0c14024
Revert flexible metadata due to `json!` generating f64
zie1ony Sep 5, 2024
13f726e
prolong and register at once
zie1ony Sep 5, 2024
5ce894e
New deployed contracts
zie1ony Sep 5, 2024
c104c15
Update sequence diagrams
davidatwhiletrue Sep 6, 2024
9156b3a
Render PlantUML files
davidatwhiletrue Sep 6, 2024
4bea893
Add adjustments for prolong register registrar changes for client js
Volodymyr-Kuchinskyi Sep 11, 2024
567fb45
Fix interaction with registrar contract
Volodymyr-Kuchinskyi Sep 12, 2024
adfa28a
Merge pull request #8 from make-software/feat/client-js-registrar-adj…
Volodymyr-Kuchinskyi Sep 13, 2024
d9aafe9
Add ability to set resooution for the bought name of js client
Volodymyr-Kuchinskyi Sep 13, 2024
c1538a6
Merge pull request #7 from make-software/feature/prolong-register-at-…
zie1ony Sep 18, 2024
dfbc02d
serialize struct example
zie1ony Sep 26, 2024
5ac550f
Update to 1.3.0
zie1ony Sep 26, 2024
ca67728
Merge branch 'develop' of github.com:make-software/cspr-name-contract…
zie1ony Sep 26, 2024
ff91431
Basic reverse resolver
zie1ony Oct 2, 2024
45767e1
Merge pull request #9 from make-software/feature/add-set-resolution-j…
Volodymyr-Kuchinskyi Oct 3, 2024
2db05a5
feat: Add primary name resolution functionality for js client
Volodymyr-Kuchinskyi Oct 3, 2024
a6eb9c1
Merge pull request #10 from make-software/feat/set-primary-name-js
Volodymyr-Kuchinskyi Oct 4, 2024
ec0748f
updated reverse resolver
zie1ony Oct 11, 2024
b0c61ef
updated reverse resolver
zie1ony Oct 11, 2024
faafbc7
docs for casper-name-contracts
zie1ony Oct 30, 2024
ef4376d
fix docs dir
zie1ony Oct 30, 2024
6c5c4ab
Refactor and upgrade js client to match with CSPR 2.0 SDK
Volodymyr-Kuchinskyi May 23, 2025
4b688cd
Adjust examples
Volodymyr-Kuchinskyi May 23, 2025
a807c63
fix: Fix integration examples
Volodymyr-Kuchinskyi May 24, 2025
7d60624
Merge pull request #11 from make-software/upgrade-js-client-2.0
Volodymyr-Kuchinskyi May 24, 2025
005cbf0
fix: Fixed examples for setting resolution in js client
Volodymyr-Kuchinskyi May 26, 2025
0f39c11
fix: Fixed examples for onchain purchase renew in js client
Volodymyr-Kuchinskyi May 26, 2025
350de01
Refactor registrar and resolver contracts to use CEP95 instead of CEP…
kpob May 26, 2025
4d073e4
fix: Fixed examples for setting primary name in js client
Volodymyr-Kuchinskyi May 26, 2025
833add1
Merge branch 'develop' into feature/cep95-integration
kpob May 26, 2025
9e0542a
chore: Add example of setting treasury account via client-js
Volodymyr-Kuchinskyi May 28, 2025
db5fa5a
chore: Adjust onchain renewal flow examples for js client
Volodymyr-Kuchinskyi May 28, 2025
6412d8b
Using odra 2.0.1 from github
zie1ony May 28, 2025
72f93b2
Merge pull request #12 from make-software/feature/cep95-integration
zie1ony May 28, 2025
3a14be5
Updated schemas
zie1ony May 28, 2025
13d9bbc
New deployed contracts
zie1ony May 28, 2025
ef7b345
Fix js examples
Volodymyr-Kuchinskyi Jun 10, 2025
dc56bbd
Actualised wasm proxy
Volodymyr-Kuchinskyi Jun 10, 2025
447a7c9
Add permissions set for name token
zie1ony Jun 11, 2025
155ea8d
chore: Add resolver cleanup example for client-js
Volodymyr-Kuchinskyi Jun 11, 2025
59b06e1
chore: minor fix of client-js
Volodymyr-Kuchinskyi Jun 12, 2025
685e5e1
chore: Add client-js examples for resolution removal
Volodymyr-Kuchinskyi Jun 12, 2025
7e57457
transfer_from_operator_resets_resolver
zie1ony Jun 16, 2025
d47f405
Fix token metadata setting and update resolver after transfer from op…
kpob Jun 17, 2025
5e3fd1c
Merge pull request #16 from make-software/feature/operator-transfer
kpob Jun 17, 2025
a8e7bb5
Remove Result from metadata's expiration()
zie1ony Jun 17, 2025
8ca340b
HAL-001: the mint entry point increases the mint_tokens_count value
kpob Jun 17, 2025
b2a5014
HAL-002: subdomains validation
kpob Jun 17, 2025
95ace60
HAL-004: Limit the max grace period to one year to eliminate the ris…
kpob Jun 18, 2025
eb700e3
HAL-006: Add payment validation to prevent overpayment in buy and ren…
kpob Jun 18, 2025
8bec9a3
HAL-007: Implement pause and unpause functionality in contracts to co…
kpob Jun 18, 2025
bf96e2e
HAL-008: register errors in modules to generate schemas correctly
kpob Jun 18, 2025
dfde683
HAL-009: Refactor ownership management in NameToken contract
kpob Jun 18, 2025
f2ede3f
HAL-011: Add whitelist checks and error handling for whitelisting ope…
kpob Jun 18, 2025
d6e1255
HAL-012: Add check to prevent redundant primary name updates in Rever…
kpob Jun 18, 2025
0d8a008
HAL-014: Add contract address validation in multiple contracts to ens…
kpob Jun 18, 2025
5737bb5
HAL-015: Remove redundant admin role assignment in Registrar contract…
kpob Jun 23, 2025
d27f96b
HAL-016: Rename cleanup methods to invalidate_resolutions for clarity…
kpob Jun 23, 2025
a04d9b6
HAL-019: Refactor resolver method - remove redundant `clone()` call
kpob Jun 23, 2025
e180f8f
HAL-018: Fix typos in comments across multiple contracts for clarity
kpob Jun 23, 2025
0bd8310
HAL-013: Add validation for token names and update domain validation …
kpob Jun 23, 2025
c84f351
HAL-003: error handling in `ReverseResolver`
kpob Jun 24, 2025
8bf8856
HAL-010: Refactor token transfer and cleanup logic to improve error h…
kpob Jun 24, 2025
c6cdf75
Fix formatting by separating import statements for clarity
kpob Jun 24, 2025
bc33c95
Update toolchain version to 1.85.0-nightly and add pause/unpause even…
kpob Jun 24, 2025
6518ece
feat: Add asset_uri field to NameTokenMetadata and related structures
kpob Jun 25, 2025
807c42e
chore: Update toolchain version to rustc 1.85.0-nightly and add asset…
kpob Jun 26, 2025
0761ea2
Merge pull request #20 from make-software/feature/add-asset-uri-to-me…
kpob Jun 26, 2025
379c6bc
Rename test function for clarity and refactor whitelist checks to use…
kpob Jun 26, 2025
b68c91c
Merge branch 'develop' into feature/post-audit-fixes
kpob Jun 26, 2025
5af1729
Merge pull request #19 from make-software/feature/post-audit-fixes
kpob Jun 26, 2025
7089295
Merge pull request #17 from make-software/feature/simpler-expiration
kpob Jun 26, 2025
4187531
Add asset URI to NameMintInfo in registrar tests
kpob Jun 27, 2025
60ac21b
HAL-017: Add events for signer public key and treasury address change…
kpob Jun 27, 2025
3ac0409
Merge pull request #21 from make-software/feature/events
zie1ony Jun 27, 2025
c2858b5
update to release/2.1.0 of Odra
zie1ony Jun 27, 2025
dc4defd
contracts.toml
zie1ony Jun 27, 2025
ded92cb
updated schmeas
zie1ony Jun 27, 2025
557c8cc
updated docs
zie1ony Jun 27, 2025
87ba152
Add ReverseResolver to cli
zie1ony Jun 30, 2025
8ea7f62
chore: Extend js client with asset_uri for name token image url
Volodymyr-Kuchinskyi Jul 2, 2025
859c88f
fix: correct variable naming in resolve function for clarity
kpob Jul 2, 2025
2eaaad1
refactor: Update dependencies in Cargo.toml and improve code structur…
kpob Jul 9, 2025
25c6ff0
chore: Remove outdated deployed contracts files
kpob Jul 9, 2025
9bad54c
Update docs
kpob Jul 9, 2025
26f596a
Merge pull request #22 from make-software/fix/incorrect-token-hash-va…
kpob Jul 9, 2025
5ebc4a6
Merge branch 'master' into develop
kpob Jul 9, 2025
6b672c6
Render PlantUML files
kpob Jul 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 17 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Path to the secret key of the account that will be used
# to deploy the contracts.
# We're using .keys folder so we don't accidentally commit
# the secret key to the repository.
ODRA_CASPER_LIVENET_SECRET_KEY_PATH=./net-1/faucet/secret_key.pem

# RPC address of the node that will be used to deploy the contracts.
ODRA_CASPER_LIVENET_NODE_ADDRESS=http://localhost:11101

# Chain name of the network. Known values:
# - integration-test
ODRA_CASPER_LIVENET_CHAIN_NAME=casper-net-1

# Paths to the secret keys of the additional accounts.
# Main secret key will be 0th account.
ODRA_CASPER_LIVENET_KEY_1=./net-1/faucet/secret_key.pem
ODRA_CASPER_LIVENET_KEY_2=./net-1/faucet/secret_key.pem
13 changes: 7 additions & 6 deletions .github/workflows/update-plantuml-pngs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ jobs:
name: plantuml
steps:
- name: checkout
uses: actions/checkout@v1
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: plantuml
id: plantuml
uses: grassedge/generate-plantuml-action@v1.5

- name: Generate UML diagrams
run: |
docker run --rm -v ${{ github.workspace }}/docs/sequence-diagrams/puml:/workspace plantuml/plantuml -tpng /workspace/*.puml

- name: Update Repo
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Render PlantUML files"

7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@ Cargo.lock
.builder*
/wasm
.env
.DS_Store
.env15
.env20
.DS_Store
/.idea
casper-name-contracts/wasm
net-1
66 changes: 16 additions & 50 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,53 +1,19 @@
[package]
name = "casper-name"
version = "0.1.0"
edition = "2021"

[dependencies]
odra = { path = "../odra3/odra", features = [], default-features = false }
odra-modules = { path = "../odra3/modules", features = [], default-features = false }
hex = { version = "0.4.3", default-features = false }
odra-casper-livenet-env = { path = "../odra3/odra-casper/livenet-env", optional = true }
serde = { version = "1.0.80", default-features = false }
serde_json = { version = "1.0.99", default-features = false }
serde-json-wasm = { version = "1.0.1", default-features = false }

[dev-dependencies]
odra-test = { path = "../odra3/odra-test", features = [], default-features = false }
blake2 = "0.10.6"
hex = "0.4.3"

[build-dependencies]
odra-build = { path = "../odra3/odra-build", features = [], default-features = false }

[features]
default = []
livenet = ["odra-casper-livenet-env"]

[[bin]]
name = "casper_name_build_contract"
path = "bin/build_contract.rs"
test = false

[[bin]]
name = "casper_name_build_schema"
path = "bin/build_schema.rs"
test = false

[[bin]]
name = "deploy-example"
path = "bin/deploy_example.rs"
required-features = ["livenet"]
test = false

[[bin]]
name = "test-schema"
path = "bin/test_schema.rs"
test = false

[[test]]
name = "test_register"
path = "tests/test_register.rs"
[workspace]
members = [
"casper-name-cli",
"casper-name-contracts",
]

resolver = "2"

[workspace.dependencies]
odra = { version = "2.1.0" }
odra-cli = { version = "2.1.0" }
odra-modules = { version = "2.1.0" }
odra-test = { version = "2.1.0" }
odra-build = { version = "2.1.0" }
odra-bdd = { version = "2.1.0" }
odra-casper-livenet-env = { version = "2.1.0" }

[profile.release]
codegen-units = 1
Expand Down
1 change: 0 additions & 1 deletion NOTES.md

This file was deleted.

17 changes: 16 additions & 1 deletion Odra.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
[[contracts]]
fqn = "casper_name::register::Register"
fqn = "casper_name_contracts::contracts::registrar::Registrar"

[[contracts]]
fqn = "casper_name_contracts::contracts::name_token::NameToken"

[[contracts]]
fqn = "casper_name_contracts::contracts::controller::Controller"

[[contracts]]
fqn = "casper_name_contracts::contracts::resolver::DefaultResolver"

[[contracts]]
fqn = "casper_name_contracts::contracts::marketplace::SecondaryMarket"

[[contracts]]
fqn = "casper_name_contracts::contracts::reverse_resolver::ReverseResolver"
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,25 @@
It's recommended to install
[cargo-odra](https://github.com/odradev/cargo-odra) first.

### Prerequisites

Install wasm-opt tool (it is needed for building contracts)
```
$ cargo install wasm-opt --locked
```

if you run casper node localy (nctl), you need to copy files to have access to the accounts keys from the host
```
$ docker run --rm -it --name mynctl -d -p 11101:11101 -p 14101:14101 -p 18101:18101 makesoftware/casper-nctl

$ docker cp mynctl:/home/casper/casper-node/utils/nctl/assets/net-1 .
```

Copy example env file and make appropriate adjustments (default values work with nctl)
```
$ cp .env.example .env
```

### Build

```
Expand All @@ -16,6 +35,12 @@ The result files will be placed in `${project-root}/wasm` directory.
$ cargo odra build -b casper
```

### Deploy

```
$ cargo run -p casper-name-cli deploy
```

### Test
To run test on your local machine, you can basically execute the command:

Expand Down
69 changes: 0 additions & 69 deletions bin/build_schema.rs

This file was deleted.

8 changes: 0 additions & 8 deletions bin/test_schema.rs

This file was deleted.

24 changes: 24 additions & 0 deletions casper-name-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[package]
name = "casper-name-cli"
version = "0.1.0"
edition = "2021"

[dependencies]
odra = { workspace = true }
odra-casper-livenet-env = { workspace = true }
odra-cli = { workspace = true }
odra-modules = { workspace = true }
casper-name-contracts = { path = "../casper-name-contracts" }
clap = { version = "4.5.4", features = ["derive"] }
prettycli = "0.1.1"
chrono = { version = "0.4", features = ["serde"] }
serde = { version = "1.0", features = ["derive"] }
serde_derive = { version = "1.0", features = ["default"] }
serde_json = "1.0"
toml = "0.8.13"
blake2 = "0.10.6"
hex = "0.4.3"

[[bin]]
name = "casper-name-cli"
path = "bin/main.rs"
3 changes: 3 additions & 0 deletions casper-name-cli/bin/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pub fn main() {
casper_name_cli::odra_cli::cli();
}
1 change: 1 addition & 0 deletions casper-name-cli/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod odra_cli;
28 changes: 28 additions & 0 deletions casper-name-cli/src/odra_cli.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
use casper_name_contracts::contracts::{
controller::Controller, marketplace::SecondaryMarket, name_token::NameToken,
registrar::Registrar, resolver::DefaultResolver, reverse_resolver::ReverseResolver,
};
use deploy::DeployScript;
use odra_cli::OdraCli;
use scenario::{CalculateSignature, CalculateTokenHash, RegisterTokenScenario, SetConfigScript};

mod deploy;
mod scenario;

pub fn cli() {
OdraCli::new()
.about("Casper Name Service CLI")
.deploy(DeployScript)
.contract::<DefaultResolver>()
.contract::<Controller>()
.contract::<Registrar>()
.contract::<NameToken>()
.contract::<SecondaryMarket>()
.contract::<ReverseResolver>()
.scenario(SetConfigScript)
.scenario(RegisterTokenScenario)
.scenario(CalculateTokenHash)
.scenario(CalculateSignature)
.build()
.run();
}
Loading
Loading