Merge pull request #135 from public-awesome/temporary-creation-fee-update
Temporary change of hardcoded base minter creation fee
This commit is contained in:
commit
245117da7a
@ -13,7 +13,6 @@ import { Tooltip } from 'components/Tooltip'
|
|||||||
import type { ChangeEvent } from 'react'
|
import type { ChangeEvent } from 'react'
|
||||||
import { useEffect, useRef, useState } from 'react'
|
import { useEffect, useRef, useState } from 'react'
|
||||||
import { toast } from 'react-hot-toast'
|
import { toast } from 'react-hot-toast'
|
||||||
import { SG721_UPDATABLE_CODE_ID } from 'utils/constants'
|
|
||||||
|
|
||||||
import { TextInput } from '../../forms/FormInput'
|
import { TextInput } from '../../forms/FormInput'
|
||||||
import type { MinterType } from '../actions/Combobox'
|
import type { MinterType } from '../actions/Combobox'
|
||||||
@ -243,7 +242,7 @@ export const CollectionDetails = ({ onChange, uploadMethod, coverImageUrl, minte
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Conditional test={SG721_UPDATABLE_CODE_ID > 0}>
|
<Conditional test={false}>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
backgroundColor="bg-blue-500"
|
backgroundColor="bg-blue-500"
|
||||||
label={
|
label={
|
||||||
|
@ -91,7 +91,7 @@ export const baseFactory = (client: SigningCosmWasmClient, txSigner: string): Ba
|
|||||||
sender: txSigner,
|
sender: txSigner,
|
||||||
contract: contractAddress,
|
contract: contractAddress,
|
||||||
msg,
|
msg,
|
||||||
funds: [coin(updatable ? '3000000000' : '250000000', 'ustars')],
|
funds: [coin(updatable ? '3000000000' : '1000000000', 'ustars')],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,7 +249,7 @@ export const baseMinter = (client: SigningCosmWasmClient, txSigner: string): Bas
|
|||||||
label: string,
|
label: string,
|
||||||
): Promise<InstantiateResponse> => {
|
): Promise<InstantiateResponse> => {
|
||||||
const result = await client.instantiate(senderAddress, codeId, initMsg, label, 'auto', {
|
const result = await client.instantiate(senderAddress, codeId, initMsg, label, 'auto', {
|
||||||
funds: [coin('250000000', 'ustars')],
|
funds: [coin('1000000000', 'ustars')],
|
||||||
})
|
})
|
||||||
return {
|
return {
|
||||||
contractAddress: result.contractAddress,
|
contractAddress: result.contractAddress,
|
||||||
|
@ -503,7 +503,7 @@ const CollectionCreationPage: NextPage = () => {
|
|||||||
messages: baseFactoryMessages,
|
messages: baseFactoryMessages,
|
||||||
txSigner: wallet.address,
|
txSigner: wallet.address,
|
||||||
msg,
|
msg,
|
||||||
funds: [coin(collectionDetails?.updatable ? '3000000000' : '250000000', 'ustars')],
|
funds: [coin(collectionDetails?.updatable ? '3000000000' : '1000000000', 'ustars')],
|
||||||
updatable: collectionDetails?.updatable,
|
updatable: collectionDetails?.updatable,
|
||||||
}
|
}
|
||||||
await baseFactoryDispatchExecute(payload)
|
await baseFactoryDispatchExecute(payload)
|
||||||
@ -884,7 +884,7 @@ const CollectionCreationPage: NextPage = () => {
|
|||||||
: 3000000000
|
: 3000000000
|
||||||
: collectionDetails?.updatable
|
: collectionDetails?.updatable
|
||||||
? 3000000000
|
? 3000000000
|
||||||
: 250000000
|
: 1000000000
|
||||||
if (amountNeeded >= Number(wallet.balance[0].amount))
|
if (amountNeeded >= Number(wallet.balance[0].amount))
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Insufficient wallet balance to instantiate the required contracts. Needed amount: ${(
|
`Insufficient wallet balance to instantiate the required contracts. Needed amount: ${(
|
||||||
|
@ -145,7 +145,7 @@ const BaseMinterInstantiatePage: NextPage = () => {
|
|||||||
return toast.promise(
|
return toast.promise(
|
||||||
contract
|
contract
|
||||||
.use(BASE_FACTORY_ADDRESS)
|
.use(BASE_FACTORY_ADDRESS)
|
||||||
?.createBaseMinter(wallet.address, msg, [coin('250000000', 'ustars')]) as Promise<CreateBaseMinterResponse>,
|
?.createBaseMinter(wallet.address, msg, [coin('1000000000', 'ustars')]) as Promise<CreateBaseMinterResponse>,
|
||||||
{
|
{
|
||||||
loading: 'Instantiating contract...',
|
loading: 'Instantiating contract...',
|
||||||
error: 'Instantiation failed!',
|
error: 'Instantiation failed!',
|
||||||
|
Loading…
Reference in New Issue
Block a user