From d95ab021ec1450cc97a954195c2cc8ac157ecd13 Mon Sep 17 00:00:00 2001 From: Serkan Reis Date: Fri, 7 Jul 2023 12:34:40 +0300 Subject: [PATCH 1/2] Add upgrade fee payment for wl member limit increase --- contracts/whitelist/contract.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/contracts/whitelist/contract.ts b/contracts/whitelist/contract.ts index bccd07f..255ab09 100644 --- a/contracts/whitelist/contract.ts +++ b/contracts/whitelist/contract.ts @@ -243,7 +243,17 @@ export const WhiteList = (client: SigningCosmWasmClient, txSigner: string): Whit } const increaseMemberLimit = async (limit: number): Promise => { - const res = await client.execute(txSigner, contractAddress, { increase_member_limit: limit }, 'auto') + const whitelistConfig = await config() + const currentLimit = Number(whitelistConfig.member_limit) + const upgradeFee = (Math.ceil(limit / 1000) - Math.ceil(currentLimit / 1000)) * 100000000 + const res = await client.execute( + txSigner, + contractAddress, + { increase_member_limit: limit }, + 'auto', + 'Increase Member Limit', + upgradeFee === 0 ? undefined : [coin(upgradeFee.toString(), 'ustars')], + ) return res.transactionHash } /// EXECUTE END From 6a87b4980cddbaa1e972509278f251c6b28d17d6 Mon Sep 17 00:00:00 2001 From: Serkan Reis Date: Fri, 7 Jul 2023 12:35:24 +0300 Subject: [PATCH 2/2] Bump Studio version --- .env.example | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index f796894..46be8b3 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,4 @@ -APP_VERSION=0.7.1 +APP_VERSION=0.7.2 NEXT_PUBLIC_PINATA_ENDPOINT_URL=https://api.pinata.cloud/pinning/pinFileToIPFS NEXT_PUBLIC_SG721_CODE_ID=2595 diff --git a/package.json b/package.json index 003929a..e053b14 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stargaze-studio", - "version": "0.7.1", + "version": "0.7.2", "workspaces": [ "packages/*" ],