Skip to content

Commit

Permalink
fix: rust scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
WaDadidou committed Oct 16, 2024
1 parent 6cfb339 commit 29939e6
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 62 deletions.
File renamed without changes.
22 changes: 22 additions & 0 deletions rust/cw-contracts/nft-tr721/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
ADMIN=testnet-adm
NODE_FLAG=--node https://rpc.testnet.teritori.com:443
TX_FLAGS=--from $(ADMIN) --chain-id teritori-test-7 $(NODE_FLAG) --gas auto --gas-adjustment 1.3 -y -b sync --output json --keyring-backend test -o json
QUERY_FLAGS=$(NODE_FLAG) -o json
WORKSPACE_PATH := $(shell realpath $(shell dirname $(shell pwd))/../..)

# only informative
# CODE_ID=0

.PHONY: artifacts/nft_tr721.wasm
artifacts/nft_tr721.wasm:
docker run --rm -v "$(WORKSPACE_PATH):/code" \
--platform linux/amd64 \
--mount type=volume,source=nft_tr721_cache,target=/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
cosmwasm/rust-optimizer:0.14.0

.PHONY: deploy.testnet
deploy.testnet: artifacts/nft_tr721.wasm
set -o pipefail; \
TXHASH=$$(teritorid tx wasm store $(WORKSPACE_PATH)/artifacts/nft_tr721.wasm $(TX_FLAGS) | jq -r .txhash); \
while ! teritorid query tx $$TXHASH $(QUERY_FLAGS) 2>/dev/null | jq -r '.logs[0].events[] | select(.type=="store_code").attributes[] | select(.key=="code_id").value'; do sleep 1; done
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { deploy } from "./utils";

import { deploy } from "../../utils/scripts";
const WASM_FILE = "nft_tr721.wasm";

const main = async () => {
Expand Down
59 changes: 0 additions & 59 deletions rust/scripts/utils.ts

This file was deleted.

2 changes: 1 addition & 1 deletion rust/utils/scripts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const GAS_PRICE = GasPrice.fromString("0.025utori");
const NODE_RPC = "https://rpc.testnet.teritori.com:443";
// const CHAIN_ID = "teritori-test-7";

export const getClientInfos = async () => {
const getClientInfos = async () => {
const wallet = await DirectSecp256k1HdWallet.fromMnemonic(MNEMONIC, {
prefix: "tori",
});
Expand Down

0 comments on commit 29939e6

Please sign in to comment.