5 个稳定版本
1.0.4 | 2024年6月17日 |
---|---|
1.0.3 | 2024年5月13日 |
1.0.2 | 2023年12月14日 |
1.0.1 | 2023年8月3日 |
#13 in #name-service
309 每月下载量
73KB
2K SLoC
Archway 网络的 ArchID 命名服务
部署主网合约 (archway-1):
archway1275jwjpktae4y4y0cdq274a2m0jnpekhttnfuljm6n59wnpyd62qppqxq0
部署测试网合约 (constantine-3):
archway1lr8rstt40s697hqpedv2nvt27f4cuccqwvly9gnvuszxmcevrlns60xw4r
实例化注册合约:
# Using Archway Developer CLI
archway instantiate --args '{ "admin": "archway1f395p0gg67mmfd5zcqvpnp9cxnu0hg6r9hfczq", "wallet": "archway1f395p0gg67mmfd5zcqvpnp9cxnu0hg6r9hfczq", "cw721": "tbd", "base_cost": "250000000000000000", "base_expiration": 31536000 }'
配置注册合约:
# Using archwayd (e.g. add correct "cw721" value)
archwayd tx wasm execute archway1lr8rstt40s697hqpedv2nvt27f4cuccqwvly9gnvuszxmcevrlns60xw4r '{ "update_config": { "config": { "admin": "archway1f395p0gg67mmfd5zcqvpnp9cxnu0hg6r9hfczq", "wallet": "archway1f395p0gg67mmfd5zcqvpnp9cxnu0hg6r9hfczq", "cw721": "archway146htsfvftmq8fl26977w9xgdwmsptr2quuf7yyra4j0gttx32z3secq008", "base_cost": "250000000000000000", "base_expiration": 31536000 } } }' --from keplr --chain-id "constantine-3" --node "https://rpc.constantine.archway.tech:443" --broadcast-mode sync --output json -y --gas-prices $(archwayd q rewards estimate-fees 1 --node 'https://rpc.constantine.archway.tech:443' --output json | jq -r '.gas_unit_price | (.amount + .denom)')
注册域名:
# Using Archway Developer CLI
archway tx --args '{ "register": {"name": "archid"}}'
# Using archwayd
archwayd tx wasm execute archway1lr8rstt40s697hqpedv2nvt27f4cuccqwvly9gnvuszxmcevrlns60xw4r '{"register": {"name": "archid"}}' --from keplr --chain-id "constantine-3" --node "https://rpc.constantine.archway.tech:443" --broadcast-mode sync --output json -y --gas-prices $(archwayd q rewards estimate-fees 1 --node 'https://rpc.constantine.archway.tech:443' --output json | jq -r '.gas_unit_price | (.amount + .denom)')
解析记录:
# Using Archway Developer CLI
archway query contract-state smart --args '{"resolve_record": { "name": "archid.arch" }}'
# Using archwayd
archwayd query wasm contract-state smart "archway1lr8rstt40s697hqpedv2nvt27f4cuccqwvly9gnvuszxmcevrlns60xw4r" '{"resolve_record": { "name": "archid.arch" }}' --node "https://rpc.constantine.archway.tech:443"
依赖项
~4–6MB
~127K SLoC