Class: EVMQueryChallengeWithDetails<T>
EVM query challenge with optional resolved metadata (WithDetails pattern). Used in approval criteria and collection invariants when returned from the API.
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1544
EVM query challenge with optional resolved metadata (WithDetails pattern). Used in approval criteria and collection invariants when returned from the API.
Extends
Type Parameters
T
T extends NumberType
Implements
Constructors
Constructor
new EVMQueryChallengeWithDetails<
T>(evmQueryChallenge):EVMQueryChallengeWithDetails<T>
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1550
Parameters
evmQueryChallenge
iEVMQueryChallengeWithDetails<T>
Returns
EVMQueryChallengeWithDetails<T>
Overrides
Properties
calldata
calldata:
string
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1487
ABI-encoded function selector + arguments (hex string). Example: "70a08231000000000000000000000000{address}" for balanceOf(address) Placeholders: $initiator, $sender, $recipient, $collectionId, $recipients
Implementation of
iEVMQueryChallengeWithDetails.calldata
Inherited from
comparisonOperator?
optionalcomparisonOperator?:string
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1489
Comparison operator: "eq" (equals), "ne" (not equals), "gt" (greater than), "gte", "lt", "lte" Only "eq" and "ne" work for non-numeric types. Default is "eq".
Implementation of
iEVMQueryChallengeWithDetails.comparisonOperator
Inherited from
EVMQueryChallenge.comparisonOperator
contractAddress
contractAddress:
string
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1486
The EVM contract address to query (0x format or bb1 format)
Implementation of
iEVMQueryChallengeWithDetails.contractAddress
Inherited from
EVMQueryChallenge.contractAddress
customData?
optionalcustomData?:string
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1492
Arbitrary custom data
Implementation of
iEVMQueryChallengeWithDetails.customData
Inherited from
expectedResult?
optionalexpectedResult?:string
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1488
Expected return value (hex string). If empty, any non-error result passes. For boolean checks, use "0000...0001" for true.
Implementation of
iEVMQueryChallengeWithDetails.expectedResult
Inherited from
EVMQueryChallenge.expectedResult
gasLimit
gasLimit:
T
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1490
Gas limit for the query (default 100000, max 500000)
Implementation of
iEVMQueryChallengeWithDetails.gasLimit
Inherited from
metadata?
optionalmetadata?:iEVMQueryChallengeMetadata
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1548
Resolved metadata from the challenge URI, when populated by the indexer/API
Implementation of
iEVMQueryChallengeWithDetails.metadata
uri?
optionaluri?:string
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1491
The URI associated with this challenge (metadata)
Implementation of
iEVMQueryChallengeWithDetails.uri
Inherited from
Methods
clone()
clone():
EVMQueryChallengeWithDetails<T>
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1559
Deep copies the object and returns a new instance.
Returns
EVMQueryChallengeWithDetails<T>
Overrides
convert()
convert<
U>(convertFunction,options?):EVMQueryChallengeWithDetails<U>
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1555
Converts the object to a different NumberType equivalent.
Type Parameters
U
U extends NumberType
Parameters
convertFunction
(item) => U
options?
Returns
EVMQueryChallengeWithDetails<U>
Overrides
equals()
equals<
U>(other,normalizeNumberTypes?):boolean
Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:147
Compares this object's fields to another object's fields for equality. Equality is determined by comparing the JSON representations of the objects.
If normalizeNumberTypes is true, then all number types will be compared as strings (i.e. "1n" === "1" === 1). Else, they will be compared as their native types (i.e. 1n !== 1 !== "1").
Type Parameters
U
U extends CustomType<U>
Parameters
other
CustomType<U> | null | undefined
normalizeNumberTypes?
boolean
Returns
boolean
Inherited from
getNumberFieldNames()
getNumberFieldNames():
string[]
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1505
Internal helper method to convert the number fields of the object to a different NumberType equivalent.
Returns
string[]
Inherited from
EVMQueryChallenge.getNumberFieldNames
hasNumberFields()
hasNumberFields():
boolean
Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:161
Checks if the object has number fields.
Returns
boolean
Inherited from
EVMQueryChallenge.hasNumberFields
toJson()
toJson():
JsonObject
Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:139
Converts the object to a JSON object with all primitive types.
Returns
JsonObject
Inherited from
toJsonString()
toJsonString():
string
Defined in: packages/bitbadgesjs-sdk/src/common/base.ts:143
Converts the object to a JSON string.
Returns
string
Inherited from
EVMQueryChallenge.toJsonString
toProto()
toProto():
EVMQueryChallenge
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1525
Returns
EVMQueryChallenge
Inherited from
fromProto()
staticfromProto<U>(item,convertFunction):EVMQueryChallenge<U>
Defined in: packages/bitbadgesjs-sdk/src/core/misc.ts:1513
Type Parameters
U
U extends NumberType
Parameters
item
EVMQueryChallenge
convertFunction
(item) => U