Merge pull request #187 from public-awesome/wl-increase-member-limit-update

Upgrade-fee payment for whitelist > increase member limit
This commit is contained in:
Serkan Reis 2023-07-07 14:59:31 +03:00 committed by GitHub
commit 829ecee0bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 3 deletions

View File

@ -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_PINATA_ENDPOINT_URL=https://api.pinata.cloud/pinning/pinFileToIPFS
NEXT_PUBLIC_SG721_CODE_ID=2595 NEXT_PUBLIC_SG721_CODE_ID=2595

View File

@ -243,7 +243,17 @@ export const WhiteList = (client: SigningCosmWasmClient, txSigner: string): Whit
} }
const increaseMemberLimit = async (limit: number): Promise<string> => { const increaseMemberLimit = async (limit: number): Promise<string> => {
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 return res.transactionHash
} }
/// EXECUTE END /// EXECUTE END

View File

@ -1,6 +1,6 @@
{ {
"name": "stargaze-studio", "name": "stargaze-studio",
"version": "0.7.1", "version": "0.7.2",
"workspaces": [ "workspaces": [
"packages/*" "packages/*"
], ],