From 4e3014c3f71e5561f30dc69785044c5f5efac993 Mon Sep 17 00:00:00 2001 From: nahem Date: Mon, 12 Aug 2024 12:14:17 +0200 Subject: [PATCH] fix: denom on instantiate treasurechest contract was inj instead of factory --- contracts/injective-auction-pool/src/helpers.rs | 4 +--- deploy/02-testnet-auction.txt | 7 ++++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/contracts/injective-auction-pool/src/helpers.rs b/contracts/injective-auction-pool/src/helpers.rs index 6c77456..6d2f16a 100644 --- a/contracts/injective-auction-pool/src/helpers.rs +++ b/contracts/injective-auction-pool/src/helpers.rs @@ -133,8 +133,6 @@ pub(crate) fn new_auction_round( // round BIDDING_BALANCE.save(deps.storage, &Uint128::zero())?; - let mut messages: Vec = vec![]; - // transfer corresponding tokens to the rewards fee address messages.push(CosmosMsg::Bank(BankMsg::Send { to_address: config.rewards_fee_addr.to_string(), @@ -162,7 +160,7 @@ pub(crate) fn new_auction_round( unsettled_auction.auction_round ), msg: to_json_binary(&treasurechest::chest::InstantiateMsg { - denom: config.native_denom.clone(), + denom: denom.clone(), owner: env.contract.address.to_string(), notes: denom.clone(), token_factory: config.token_factory_type.to_string(), diff --git a/deploy/02-testnet-auction.txt b/deploy/02-testnet-auction.txt index c46f76a..6291d15 100644 --- a/deploy/02-testnet-auction.txt +++ b/deploy/02-testnet-auction.txt @@ -107,4 +107,9 @@ injectived tx wasm execute $AUCTION_CONTRACT '{"exit_pool":{}}' --from inj1cdugm injectived tx wasm execute inj1kar690fes35rm0dx5zcjwt5pjhtvcf572w3ffe '{"exit_pool":{}}' --from inj1cdugmt5t0mgfsmfc99eyhe4fzps0937ae0jgqh --yes --gas-prices "160000000inj" --gas-adjustment 1.3 --gas auto --amount 102factory/$AUCTION_CONTRACT/auction.0 --node https://testnet.sentry.tm.injective.network:443 --output json --chain-id injective-888 | jq # settle auction -injectived tx wasm execute $AUCTION_CONTRACT '{"settle_auction":{"auction_round":108, "auction_winner":"inj1dlyumvy7rfmq534hnh8et2ft58zpm0d84vjkfd", "auction_winning_bid": "7230370850000000000001"}}' --from inj1cdugmt5t0mgfsmfc99eyhe4fzps0937ae0jgqh --yes --gas-prices "160000000inj" --gas-adjustment 1.3 --gas auto --node https://testnet.sentry.tm.injective.network:443 --output json --chain-id injective-888 | jq \ No newline at end of file +injectived tx wasm execute $AUCTION_CONTRACT '{"settle_auction":{"auction_round":108, "auction_winner":"inj1dlyumvy7rfmq534hnh8et2ft58zpm0d84vjkfd", "auction_winning_bid": "7230370850000000000001"}}' --from inj1cdugmt5t0mgfsmfc99eyhe4fzps0937ae0jgqh --yes --gas-prices "160000000inj" --gas-adjustment 1.3 --gas auto --node https://testnet.sentry.tm.injective.network:443 --output json --chain-id injective-888 --amount 1000000000000000000inj | jq | jq + +# claim from treasure_chest contract +TREASURE_CHEST_CONTRACT=inj1jzc67t0t445dzdd96ksywf0tfj7ah2qljfrlp9 + +injectived tx wasm execute $TREASURE_CHEST_CONTRACT '{"withdraw":{}}' --from inj1cdugmt5t0mgfsmfc99eyhe4fzps0937ae0jgqh --yes --gas-prices "160000000inj" --gas-adjustment 1.3 --gas auto --amount 8000000000000000000000factory/$AUCTION_CONTRACT/auction.0 --node https://testnet.sentry.tm.injective.network:443 --output json --chain-id injective-888 | jq \ No newline at end of file