Skip to content

Commit

Permalink
Auction House Integration Tests (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
Funkatronics authored Oct 24, 2022
1 parent cae532f commit 6c5fb1d
Show file tree
Hide file tree
Showing 31 changed files with 7,198 additions and 3,680 deletions.
2 changes: 1 addition & 1 deletion lib/src/main/java/com/metaplex/lib/Metaplex.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Metaplex(val connection: Connection,

val nft: NftClient by lazy { NftClient(connection, identityDriver) }
val tokens: TokenClient by lazy { TokenClient(connection) }
val auctions: AuctionsClient by lazy { AuctionsClient(connection) }
val auctions: AuctionsClient by lazy { AuctionsClient(connection, identityDriver) }
val candyMachinesV2: CandyMachineV2Client by lazy { CandyMachineV2Client(connection, identityDriver) }
val candyMachines: CandyMachineClient by lazy { CandyMachineClient(connection, identityDriver) }

Expand Down
2 changes: 1 addition & 1 deletion lib/src/main/java/com/metaplex/lib/experimental/jen/Idl.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ data class Instruction(val name: String, val accounts: List<AccountInput>,

@Serializable
data class AccountInput(val name: String, val isMut: Boolean, val isSigner: Boolean,
val desc: String? = null, val optional: Boolean = false)
val desc: String? = null, val optional: Boolean = false, val docs: List<String>? = null)

@Serializable
data class Argument(val name: String, @Serializable(with = FTSerializer::class) val type: FieldType)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@
// Accounts
// Metaplex
//
// This code was generated locally by Funkatronics on 2022-08-11
// This code was generated locally by Funkatronics on 2022-10-20
//
@file:UseSerializers(PublicKeyAs32ByteSerializer::class)

package com.metaplex.lib.experimental.jen.auctionhouse

import com.metaplex.lib.serialization.serializers.solana.PublicKeyAs32ByteSerializer
import com.solana.core.PublicKey
import kotlin.Boolean
import kotlin.Long
import kotlin.UByte
import kotlin.ULong
import kotlin.UShort
import kotlin.collections.List
import kotlinx.serialization.Serializable
import kotlinx.serialization.UseSerializers

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
// Errors
// Metaplex
//
// This code was generated locally by Funkatronics on 2022-08-11
// This code was generated locally by Funkatronics on 2022-10-20
//
package com.metaplex.lib.experimental.jen.auctionhouse

import kotlin.Int
import kotlin.String

sealed interface AuctionHouseError {
val code: Int

Expand Down Expand Up @@ -118,7 +121,7 @@ class CannotMatchFreeSalesWithoutAuctionHouseOrSellerSignoff : AuctionHouseError
override val code: Int = 6017

override val message: String =
"Cannot match free sales unless the auction house or seller signs off"
"Cannot match free sales unless the auction house or seller signs off"
}

class SaleRequiresSigner : AuctionHouseError {
Expand Down Expand Up @@ -227,7 +230,7 @@ class EscrowUnderRentExemption : AuctionHouseError {
override val code: Int = 6035

override val message: String =
"The instruction would drain the escrow below rent exemption threshold"
"The instruction would drain the escrow below rent exemption threshold"
}

class InvalidSeedsOrAuctionHouseNotDelegated : AuctionHouseError {
Expand All @@ -246,21 +249,21 @@ class MissingElementForPartialOrder : AuctionHouseError {
override val code: Int = 6038

override val message: String =
"Partial order size and price must both be provided in a partial buy."
"Partial order size and price must both be provided in a partial buy."
}

class NotEnoughTokensAvailableForPurchase : AuctionHouseError {
override val code: Int = 6039

override val message: String =
"Amount of tokens available for purchase is less than the partial order amount."
"Amount of tokens available for purchase is less than the partial order amount."
}

class PartialPriceMismatch : AuctionHouseError {
override val code: Int = 6040

override val message: String =
"Calculated partial price does not not partial price that was provided."
"Calculated partial price does not not partial price that was provided."
}

class AuctionHouseAlreadyDelegated : AuctionHouseError {
Expand Down
Loading

0 comments on commit 6c5fb1d

Please sign in to comment.