@imtbl/sdk 1.24.0-alpha.3 → 1.24.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blockchain_data.js +2 -2
- package/dist/browser/checkout/sdk.js +4 -4
- package/dist/checkout.js +20 -25
- package/dist/config.js +1 -1
- package/dist/index.browser.js +17 -17
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +23 -28
- package/dist/index.js +23 -28
- package/dist/orderbook.js +17 -22
- package/dist/passport.js +4 -4
- package/dist/x.js +3 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -181,7 +181,7 @@ const flattenProperties$1 = (properties) => {
|
|
|
181
181
|
};
|
|
182
182
|
|
|
183
183
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
184
|
-
const SDK_VERSION$1 = '1.24.0-alpha.
|
|
184
|
+
const SDK_VERSION$1 = '1.24.0-alpha.5';
|
|
185
185
|
const getReferrer$1 = () => {
|
|
186
186
|
if (isNode$1()) {
|
|
187
187
|
return '';
|
|
@@ -13732,7 +13732,7 @@ class MultiRollupApiClients {
|
|
|
13732
13732
|
}
|
|
13733
13733
|
|
|
13734
13734
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
13735
|
-
const defaultHeaders$2 = { 'x-sdk-version': 'ts-immutable-sdk-1.24.0-alpha.
|
|
13735
|
+
const defaultHeaders$2 = { 'x-sdk-version': 'ts-immutable-sdk-1.24.0-alpha.5' };
|
|
13736
13736
|
const createConfig$1 = ({ basePath, headers, }) => {
|
|
13737
13737
|
if (!basePath.trim()) {
|
|
13738
13738
|
throw Error('basePath can not be empty');
|
|
@@ -13804,7 +13804,7 @@ class APIError extends Error {
|
|
|
13804
13804
|
|
|
13805
13805
|
/* eslint-disable implicit-arrow-linebreak */
|
|
13806
13806
|
const defaultHeaders$1 = {
|
|
13807
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.24.0-alpha.
|
|
13807
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.24.0-alpha.5',
|
|
13808
13808
|
};
|
|
13809
13809
|
/**
|
|
13810
13810
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -14278,7 +14278,7 @@ var blockchain_data = /*#__PURE__*/Object.freeze({
|
|
|
14278
14278
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
14279
14279
|
class ApiConfiguration extends index$2.Configuration {
|
|
14280
14280
|
}
|
|
14281
|
-
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.24.0-alpha.
|
|
14281
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.24.0-alpha.5' };
|
|
14282
14282
|
/**
|
|
14283
14283
|
* @dev use createImmutableXConfiguration instead
|
|
14284
14284
|
*/
|
|
@@ -14317,7 +14317,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
14317
14317
|
chainID,
|
|
14318
14318
|
coreContractAddress,
|
|
14319
14319
|
registrationContractAddress,
|
|
14320
|
-
sdkVersion: 'ts-immutable-sdk-1.24.0-alpha.
|
|
14320
|
+
sdkVersion: 'ts-immutable-sdk-1.24.0-alpha.5',
|
|
14321
14321
|
baseConfig,
|
|
14322
14322
|
});
|
|
14323
14323
|
const production = ({ baseConfig }) => createImmutableXConfiguration({
|
|
@@ -27731,12 +27731,12 @@ function getOrderComponentsFromMessage(orderMessage) {
|
|
|
27731
27731
|
// This can always be overwritten by the user signing the transaction
|
|
27732
27732
|
function prepareTransaction(transactionMethods,
|
|
27733
27733
|
// chainId is required for EIP155
|
|
27734
|
-
chainId) {
|
|
27734
|
+
chainId, callerAddress) {
|
|
27735
27735
|
return async () => {
|
|
27736
27736
|
const v6ContractTransaction = await transactionMethods.buildTransaction();
|
|
27737
27737
|
const v5PopulatedTransaction = {
|
|
27738
27738
|
to: v6ContractTransaction.to,
|
|
27739
|
-
from:
|
|
27739
|
+
from: callerAddress,
|
|
27740
27740
|
type: v6ContractTransaction.type,
|
|
27741
27741
|
maxFeePerGas: v6ContractTransaction.maxFeePerGas
|
|
27742
27742
|
? ethers.BigNumber.from(v6ContractTransaction.maxFeePerGas)
|
|
@@ -27744,8 +27744,6 @@ chainId) {
|
|
|
27744
27744
|
maxPriorityFeePerGas: v6ContractTransaction.maxPriorityFeePerGas
|
|
27745
27745
|
? ethers.BigNumber.from(v6ContractTransaction.maxPriorityFeePerGas)
|
|
27746
27746
|
: undefined,
|
|
27747
|
-
accessList: v6ContractTransaction.accessList,
|
|
27748
|
-
customData: v6ContractTransaction.customData,
|
|
27749
27747
|
value: v6ContractTransaction.value ? ethers.BigNumber.from(v6ContractTransaction.value) : undefined,
|
|
27750
27748
|
data: v6ContractTransaction.data,
|
|
27751
27749
|
nonce: v6ContractTransaction.nonce,
|
|
@@ -27847,7 +27845,7 @@ class Seaport {
|
|
|
27847
27845
|
listingActions.push({
|
|
27848
27846
|
type: ActionType.TRANSACTION,
|
|
27849
27847
|
purpose: TransactionPurpose.APPROVAL,
|
|
27850
|
-
buildTransaction: prepareTransaction(approvalAction.transactionMethods, (await this.provider.getNetwork()).chainId),
|
|
27848
|
+
buildTransaction: prepareTransaction(approvalAction.transactionMethods, (await this.provider.getNetwork()).chainId, offerer),
|
|
27851
27849
|
});
|
|
27852
27850
|
}
|
|
27853
27851
|
const createAction = seaportActions.find((action) => action.type === 'create');
|
|
@@ -27875,15 +27873,12 @@ class Seaport {
|
|
|
27875
27873
|
const address = await signer.getAddress();
|
|
27876
27874
|
// eslint-disable-next-line no-console
|
|
27877
27875
|
console.log(`Fulfiller address: ${address}`);
|
|
27878
|
-
// eslint-disable-next-line no-console
|
|
27879
|
-
console.log(`Provided address: ${account}`);
|
|
27880
27876
|
}
|
|
27881
27877
|
catch {
|
|
27882
27878
|
// no-op - this is for temporary debugging
|
|
27883
27879
|
}
|
|
27884
27880
|
const { actions: seaportActions } = await seaportLib.fulfillOrders({
|
|
27885
27881
|
accountAddress: account,
|
|
27886
|
-
recipientAddress: account,
|
|
27887
27882
|
fulfillOrderDetails: [
|
|
27888
27883
|
{
|
|
27889
27884
|
order: {
|
|
@@ -27900,7 +27895,7 @@ class Seaport {
|
|
|
27900
27895
|
if (approvalAction) {
|
|
27901
27896
|
fulfillmentActions.push({
|
|
27902
27897
|
type: ActionType.TRANSACTION,
|
|
27903
|
-
buildTransaction: prepareTransaction(approvalAction.transactionMethods, (await this.provider.getNetwork()).chainId),
|
|
27898
|
+
buildTransaction: prepareTransaction(approvalAction.transactionMethods, (await this.provider.getNetwork()).chainId, account),
|
|
27904
27899
|
purpose: TransactionPurpose.APPROVAL,
|
|
27905
27900
|
});
|
|
27906
27901
|
}
|
|
@@ -27910,7 +27905,7 @@ class Seaport {
|
|
|
27910
27905
|
}
|
|
27911
27906
|
fulfillmentActions.push({
|
|
27912
27907
|
type: ActionType.TRANSACTION,
|
|
27913
|
-
buildTransaction: prepareTransaction(fulfilOrderAction.transactionMethods, (await this.provider.getNetwork()).chainId),
|
|
27908
|
+
buildTransaction: prepareTransaction(fulfilOrderAction.transactionMethods, (await this.provider.getNetwork()).chainId, account),
|
|
27914
27909
|
purpose: TransactionPurpose.FULFILL_ORDER,
|
|
27915
27910
|
});
|
|
27916
27911
|
return {
|
|
@@ -27940,7 +27935,7 @@ class Seaport {
|
|
|
27940
27935
|
if (approvalAction) {
|
|
27941
27936
|
fulfillmentActions.push({
|
|
27942
27937
|
type: ActionType.TRANSACTION,
|
|
27943
|
-
buildTransaction: prepareTransaction(approvalAction.transactionMethods, (await this.provider.getNetwork()).chainId),
|
|
27938
|
+
buildTransaction: prepareTransaction(approvalAction.transactionMethods, (await this.provider.getNetwork()).chainId, account),
|
|
27944
27939
|
purpose: TransactionPurpose.APPROVAL,
|
|
27945
27940
|
});
|
|
27946
27941
|
}
|
|
@@ -27950,7 +27945,7 @@ class Seaport {
|
|
|
27950
27945
|
}
|
|
27951
27946
|
fulfillmentActions.push({
|
|
27952
27947
|
type: ActionType.TRANSACTION,
|
|
27953
|
-
buildTransaction: prepareTransaction(fulfilOrderAction.transactionMethods, (await this.provider.getNetwork()).chainId),
|
|
27948
|
+
buildTransaction: prepareTransaction(fulfilOrderAction.transactionMethods, (await this.provider.getNetwork()).chainId, account),
|
|
27954
27949
|
purpose: TransactionPurpose.FULFILL_ORDER,
|
|
27955
27950
|
});
|
|
27956
27951
|
return {
|
|
@@ -27967,7 +27962,7 @@ class Seaport {
|
|
|
27967
27962
|
const cancellationTransaction = await seaportLib.cancelOrders(orderComponents, account);
|
|
27968
27963
|
return {
|
|
27969
27964
|
type: ActionType.TRANSACTION,
|
|
27970
|
-
buildTransaction: prepareTransaction(cancellationTransaction, (await this.provider.getNetwork()).chainId),
|
|
27965
|
+
buildTransaction: prepareTransaction(cancellationTransaction, (await this.provider.getNetwork()).chainId, account),
|
|
27971
27966
|
purpose: TransactionPurpose.CANCEL,
|
|
27972
27967
|
};
|
|
27973
27968
|
}
|
|
@@ -28186,6 +28181,14 @@ function getOrderbookConfig(environment) {
|
|
|
28186
28181
|
// safely instantiate a V6 provider for the V5 provider URL.
|
|
28187
28182
|
function convertToV6Provider(provider) {
|
|
28188
28183
|
const overwrittenProvider = new ethersV6.JsonRpcProvider(provider.connection.url);
|
|
28184
|
+
// eslint-disable-next-line no-console
|
|
28185
|
+
console.log('Overwritten provider getSigner method');
|
|
28186
|
+
// eslint-disable-next-line no-console
|
|
28187
|
+
console.log(overwrittenProvider.getSigner);
|
|
28188
|
+
// eslint-disable-next-line no-console
|
|
28189
|
+
console.log('Overwriter provider methods');
|
|
28190
|
+
// eslint-disable-next-line no-console
|
|
28191
|
+
console.log(JSON.stringify(Object.keys(overwrittenProvider), null, 2));
|
|
28189
28192
|
// Need to override the getSigner method to mimic V5 behaviour
|
|
28190
28193
|
overwrittenProvider.getSigner = async function getSigner(address) {
|
|
28191
28194
|
if (address == null) {
|
|
@@ -28206,14 +28209,6 @@ function convertToV6Provider(provider) {
|
|
|
28206
28209
|
// provider has access to the address as a signer.
|
|
28207
28210
|
return new ethersV6.JsonRpcSigner(this, address);
|
|
28208
28211
|
};
|
|
28209
|
-
// eslint-disable-next-line no-console
|
|
28210
|
-
console.log('Overwritten provider getSigner method');
|
|
28211
|
-
// eslint-disable-next-line no-console
|
|
28212
|
-
console.log(overwrittenProvider.getSigner);
|
|
28213
|
-
// eslint-disable-next-line no-console
|
|
28214
|
-
console.log('Overwriter provider methods');
|
|
28215
|
-
// eslint-disable-next-line no-console
|
|
28216
|
-
console.log(JSON.stringify(Object.keys(overwrittenProvider), null, 2));
|
|
28217
28212
|
return overwrittenProvider;
|
|
28218
28213
|
}
|
|
28219
28214
|
class SeaportLibFactory {
|
|
@@ -45699,7 +45694,7 @@ const flattenProperties = (properties) => {
|
|
|
45699
45694
|
};
|
|
45700
45695
|
|
|
45701
45696
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
45702
|
-
const SDK_VERSION = '1.24.0-alpha.
|
|
45697
|
+
const SDK_VERSION = '1.24.0-alpha.5';
|
|
45703
45698
|
const getReferrer = () => {
|
|
45704
45699
|
if (isNode()) {
|
|
45705
45700
|
return '';
|
|
@@ -50894,7 +50889,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
|
|
|
50894
50889
|
maxPriorityFeePerGas: ethers.BigNumber.from(10e9),
|
|
50895
50890
|
};
|
|
50896
50891
|
|
|
50897
|
-
const SDK_VERSION_MARKER = '1.24.0-alpha.
|
|
50892
|
+
const SDK_VERSION_MARKER = '1.24.0-alpha.5';
|
|
50898
50893
|
// This SDK version is replaced by the `yarn build` command ran on the root level
|
|
50899
50894
|
const globalPackageVersion = () => SDK_VERSION_MARKER;
|
|
50900
50895
|
|
package/dist/index.js
CHANGED
|
@@ -159,7 +159,7 @@ const flattenProperties$1 = (properties) => {
|
|
|
159
159
|
};
|
|
160
160
|
|
|
161
161
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
162
|
-
const SDK_VERSION$1 = '1.24.0-alpha.
|
|
162
|
+
const SDK_VERSION$1 = '1.24.0-alpha.5';
|
|
163
163
|
const getReferrer$1 = () => {
|
|
164
164
|
if (isNode$1()) {
|
|
165
165
|
return '';
|
|
@@ -13710,7 +13710,7 @@ class MultiRollupApiClients {
|
|
|
13710
13710
|
}
|
|
13711
13711
|
|
|
13712
13712
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
13713
|
-
const defaultHeaders$2 = { 'x-sdk-version': 'ts-immutable-sdk-1.24.0-alpha.
|
|
13713
|
+
const defaultHeaders$2 = { 'x-sdk-version': 'ts-immutable-sdk-1.24.0-alpha.5' };
|
|
13714
13714
|
const createConfig$1 = ({ basePath, headers, }) => {
|
|
13715
13715
|
if (!basePath.trim()) {
|
|
13716
13716
|
throw Error('basePath can not be empty');
|
|
@@ -13782,7 +13782,7 @@ class APIError extends Error {
|
|
|
13782
13782
|
|
|
13783
13783
|
/* eslint-disable implicit-arrow-linebreak */
|
|
13784
13784
|
const defaultHeaders$1 = {
|
|
13785
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.24.0-alpha.
|
|
13785
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.24.0-alpha.5',
|
|
13786
13786
|
};
|
|
13787
13787
|
/**
|
|
13788
13788
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -14256,7 +14256,7 @@ var blockchain_data = /*#__PURE__*/Object.freeze({
|
|
|
14256
14256
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
14257
14257
|
class ApiConfiguration extends index$2.Configuration {
|
|
14258
14258
|
}
|
|
14259
|
-
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.24.0-alpha.
|
|
14259
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.24.0-alpha.5' };
|
|
14260
14260
|
/**
|
|
14261
14261
|
* @dev use createImmutableXConfiguration instead
|
|
14262
14262
|
*/
|
|
@@ -14295,7 +14295,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
14295
14295
|
chainID,
|
|
14296
14296
|
coreContractAddress,
|
|
14297
14297
|
registrationContractAddress,
|
|
14298
|
-
sdkVersion: 'ts-immutable-sdk-1.24.0-alpha.
|
|
14298
|
+
sdkVersion: 'ts-immutable-sdk-1.24.0-alpha.5',
|
|
14299
14299
|
baseConfig,
|
|
14300
14300
|
});
|
|
14301
14301
|
const production = ({ baseConfig }) => createImmutableXConfiguration({
|
|
@@ -27709,12 +27709,12 @@ function getOrderComponentsFromMessage(orderMessage) {
|
|
|
27709
27709
|
// This can always be overwritten by the user signing the transaction
|
|
27710
27710
|
function prepareTransaction(transactionMethods,
|
|
27711
27711
|
// chainId is required for EIP155
|
|
27712
|
-
chainId) {
|
|
27712
|
+
chainId, callerAddress) {
|
|
27713
27713
|
return async () => {
|
|
27714
27714
|
const v6ContractTransaction = await transactionMethods.buildTransaction();
|
|
27715
27715
|
const v5PopulatedTransaction = {
|
|
27716
27716
|
to: v6ContractTransaction.to,
|
|
27717
|
-
from:
|
|
27717
|
+
from: callerAddress,
|
|
27718
27718
|
type: v6ContractTransaction.type,
|
|
27719
27719
|
maxFeePerGas: v6ContractTransaction.maxFeePerGas
|
|
27720
27720
|
? BigNumber$1.from(v6ContractTransaction.maxFeePerGas)
|
|
@@ -27722,8 +27722,6 @@ chainId) {
|
|
|
27722
27722
|
maxPriorityFeePerGas: v6ContractTransaction.maxPriorityFeePerGas
|
|
27723
27723
|
? BigNumber$1.from(v6ContractTransaction.maxPriorityFeePerGas)
|
|
27724
27724
|
: undefined,
|
|
27725
|
-
accessList: v6ContractTransaction.accessList,
|
|
27726
|
-
customData: v6ContractTransaction.customData,
|
|
27727
27725
|
value: v6ContractTransaction.value ? BigNumber$1.from(v6ContractTransaction.value) : undefined,
|
|
27728
27726
|
data: v6ContractTransaction.data,
|
|
27729
27727
|
nonce: v6ContractTransaction.nonce,
|
|
@@ -27825,7 +27823,7 @@ class Seaport {
|
|
|
27825
27823
|
listingActions.push({
|
|
27826
27824
|
type: ActionType.TRANSACTION,
|
|
27827
27825
|
purpose: TransactionPurpose.APPROVAL,
|
|
27828
|
-
buildTransaction: prepareTransaction(approvalAction.transactionMethods, (await this.provider.getNetwork()).chainId),
|
|
27826
|
+
buildTransaction: prepareTransaction(approvalAction.transactionMethods, (await this.provider.getNetwork()).chainId, offerer),
|
|
27829
27827
|
});
|
|
27830
27828
|
}
|
|
27831
27829
|
const createAction = seaportActions.find((action) => action.type === 'create');
|
|
@@ -27853,15 +27851,12 @@ class Seaport {
|
|
|
27853
27851
|
const address = await signer.getAddress();
|
|
27854
27852
|
// eslint-disable-next-line no-console
|
|
27855
27853
|
console.log(`Fulfiller address: ${address}`);
|
|
27856
|
-
// eslint-disable-next-line no-console
|
|
27857
|
-
console.log(`Provided address: ${account}`);
|
|
27858
27854
|
}
|
|
27859
27855
|
catch {
|
|
27860
27856
|
// no-op - this is for temporary debugging
|
|
27861
27857
|
}
|
|
27862
27858
|
const { actions: seaportActions } = await seaportLib.fulfillOrders({
|
|
27863
27859
|
accountAddress: account,
|
|
27864
|
-
recipientAddress: account,
|
|
27865
27860
|
fulfillOrderDetails: [
|
|
27866
27861
|
{
|
|
27867
27862
|
order: {
|
|
@@ -27878,7 +27873,7 @@ class Seaport {
|
|
|
27878
27873
|
if (approvalAction) {
|
|
27879
27874
|
fulfillmentActions.push({
|
|
27880
27875
|
type: ActionType.TRANSACTION,
|
|
27881
|
-
buildTransaction: prepareTransaction(approvalAction.transactionMethods, (await this.provider.getNetwork()).chainId),
|
|
27876
|
+
buildTransaction: prepareTransaction(approvalAction.transactionMethods, (await this.provider.getNetwork()).chainId, account),
|
|
27882
27877
|
purpose: TransactionPurpose.APPROVAL,
|
|
27883
27878
|
});
|
|
27884
27879
|
}
|
|
@@ -27888,7 +27883,7 @@ class Seaport {
|
|
|
27888
27883
|
}
|
|
27889
27884
|
fulfillmentActions.push({
|
|
27890
27885
|
type: ActionType.TRANSACTION,
|
|
27891
|
-
buildTransaction: prepareTransaction(fulfilOrderAction.transactionMethods, (await this.provider.getNetwork()).chainId),
|
|
27886
|
+
buildTransaction: prepareTransaction(fulfilOrderAction.transactionMethods, (await this.provider.getNetwork()).chainId, account),
|
|
27892
27887
|
purpose: TransactionPurpose.FULFILL_ORDER,
|
|
27893
27888
|
});
|
|
27894
27889
|
return {
|
|
@@ -27918,7 +27913,7 @@ class Seaport {
|
|
|
27918
27913
|
if (approvalAction) {
|
|
27919
27914
|
fulfillmentActions.push({
|
|
27920
27915
|
type: ActionType.TRANSACTION,
|
|
27921
|
-
buildTransaction: prepareTransaction(approvalAction.transactionMethods, (await this.provider.getNetwork()).chainId),
|
|
27916
|
+
buildTransaction: prepareTransaction(approvalAction.transactionMethods, (await this.provider.getNetwork()).chainId, account),
|
|
27922
27917
|
purpose: TransactionPurpose.APPROVAL,
|
|
27923
27918
|
});
|
|
27924
27919
|
}
|
|
@@ -27928,7 +27923,7 @@ class Seaport {
|
|
|
27928
27923
|
}
|
|
27929
27924
|
fulfillmentActions.push({
|
|
27930
27925
|
type: ActionType.TRANSACTION,
|
|
27931
|
-
buildTransaction: prepareTransaction(fulfilOrderAction.transactionMethods, (await this.provider.getNetwork()).chainId),
|
|
27926
|
+
buildTransaction: prepareTransaction(fulfilOrderAction.transactionMethods, (await this.provider.getNetwork()).chainId, account),
|
|
27932
27927
|
purpose: TransactionPurpose.FULFILL_ORDER,
|
|
27933
27928
|
});
|
|
27934
27929
|
return {
|
|
@@ -27945,7 +27940,7 @@ class Seaport {
|
|
|
27945
27940
|
const cancellationTransaction = await seaportLib.cancelOrders(orderComponents, account);
|
|
27946
27941
|
return {
|
|
27947
27942
|
type: ActionType.TRANSACTION,
|
|
27948
|
-
buildTransaction: prepareTransaction(cancellationTransaction, (await this.provider.getNetwork()).chainId),
|
|
27943
|
+
buildTransaction: prepareTransaction(cancellationTransaction, (await this.provider.getNetwork()).chainId, account),
|
|
27949
27944
|
purpose: TransactionPurpose.CANCEL,
|
|
27950
27945
|
};
|
|
27951
27946
|
}
|
|
@@ -28164,6 +28159,14 @@ function getOrderbookConfig(environment) {
|
|
|
28164
28159
|
// safely instantiate a V6 provider for the V5 provider URL.
|
|
28165
28160
|
function convertToV6Provider(provider) {
|
|
28166
28161
|
const overwrittenProvider = new JsonRpcProvider(provider.connection.url);
|
|
28162
|
+
// eslint-disable-next-line no-console
|
|
28163
|
+
console.log('Overwritten provider getSigner method');
|
|
28164
|
+
// eslint-disable-next-line no-console
|
|
28165
|
+
console.log(overwrittenProvider.getSigner);
|
|
28166
|
+
// eslint-disable-next-line no-console
|
|
28167
|
+
console.log('Overwriter provider methods');
|
|
28168
|
+
// eslint-disable-next-line no-console
|
|
28169
|
+
console.log(JSON.stringify(Object.keys(overwrittenProvider), null, 2));
|
|
28167
28170
|
// Need to override the getSigner method to mimic V5 behaviour
|
|
28168
28171
|
overwrittenProvider.getSigner = async function getSigner(address) {
|
|
28169
28172
|
if (address == null) {
|
|
@@ -28184,14 +28187,6 @@ function convertToV6Provider(provider) {
|
|
|
28184
28187
|
// provider has access to the address as a signer.
|
|
28185
28188
|
return new JsonRpcSigner(this, address);
|
|
28186
28189
|
};
|
|
28187
|
-
// eslint-disable-next-line no-console
|
|
28188
|
-
console.log('Overwritten provider getSigner method');
|
|
28189
|
-
// eslint-disable-next-line no-console
|
|
28190
|
-
console.log(overwrittenProvider.getSigner);
|
|
28191
|
-
// eslint-disable-next-line no-console
|
|
28192
|
-
console.log('Overwriter provider methods');
|
|
28193
|
-
// eslint-disable-next-line no-console
|
|
28194
|
-
console.log(JSON.stringify(Object.keys(overwrittenProvider), null, 2));
|
|
28195
28190
|
return overwrittenProvider;
|
|
28196
28191
|
}
|
|
28197
28192
|
class SeaportLibFactory {
|
|
@@ -45677,7 +45672,7 @@ const flattenProperties = (properties) => {
|
|
|
45677
45672
|
};
|
|
45678
45673
|
|
|
45679
45674
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
45680
|
-
const SDK_VERSION = '1.24.0-alpha.
|
|
45675
|
+
const SDK_VERSION = '1.24.0-alpha.5';
|
|
45681
45676
|
const getReferrer = () => {
|
|
45682
45677
|
if (isNode()) {
|
|
45683
45678
|
return '';
|
|
@@ -50872,7 +50867,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
|
|
|
50872
50867
|
maxPriorityFeePerGas: BigNumber$1.from(10e9),
|
|
50873
50868
|
};
|
|
50874
50869
|
|
|
50875
|
-
const SDK_VERSION_MARKER = '1.24.0-alpha.
|
|
50870
|
+
const SDK_VERSION_MARKER = '1.24.0-alpha.5';
|
|
50876
50871
|
// This SDK version is replaced by the `yarn build` command ran on the root level
|
|
50877
50872
|
const globalPackageVersion = () => SDK_VERSION_MARKER;
|
|
50878
50873
|
|
package/dist/orderbook.js
CHANGED
|
@@ -132,7 +132,7 @@ const flattenProperties = (properties) => {
|
|
|
132
132
|
};
|
|
133
133
|
|
|
134
134
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
135
|
-
const SDK_VERSION = '1.24.0-alpha.
|
|
135
|
+
const SDK_VERSION = '1.24.0-alpha.5';
|
|
136
136
|
const getReferrer = () => {
|
|
137
137
|
if (isNode()) {
|
|
138
138
|
return '';
|
|
@@ -1194,12 +1194,12 @@ function getOrderComponentsFromMessage(orderMessage) {
|
|
|
1194
1194
|
// This can always be overwritten by the user signing the transaction
|
|
1195
1195
|
function prepareTransaction(transactionMethods,
|
|
1196
1196
|
// chainId is required for EIP155
|
|
1197
|
-
chainId) {
|
|
1197
|
+
chainId, callerAddress) {
|
|
1198
1198
|
return async () => {
|
|
1199
1199
|
const v6ContractTransaction = await transactionMethods.buildTransaction();
|
|
1200
1200
|
const v5PopulatedTransaction = {
|
|
1201
1201
|
to: v6ContractTransaction.to,
|
|
1202
|
-
from:
|
|
1202
|
+
from: callerAddress,
|
|
1203
1203
|
type: v6ContractTransaction.type,
|
|
1204
1204
|
maxFeePerGas: v6ContractTransaction.maxFeePerGas
|
|
1205
1205
|
? BigNumber.from(v6ContractTransaction.maxFeePerGas)
|
|
@@ -1207,8 +1207,6 @@ chainId) {
|
|
|
1207
1207
|
maxPriorityFeePerGas: v6ContractTransaction.maxPriorityFeePerGas
|
|
1208
1208
|
? BigNumber.from(v6ContractTransaction.maxPriorityFeePerGas)
|
|
1209
1209
|
: undefined,
|
|
1210
|
-
accessList: v6ContractTransaction.accessList,
|
|
1211
|
-
customData: v6ContractTransaction.customData,
|
|
1212
1210
|
value: v6ContractTransaction.value ? BigNumber.from(v6ContractTransaction.value) : undefined,
|
|
1213
1211
|
data: v6ContractTransaction.data,
|
|
1214
1212
|
nonce: v6ContractTransaction.nonce,
|
|
@@ -1310,7 +1308,7 @@ class Seaport {
|
|
|
1310
1308
|
listingActions.push({
|
|
1311
1309
|
type: ActionType.TRANSACTION,
|
|
1312
1310
|
purpose: TransactionPurpose.APPROVAL,
|
|
1313
|
-
buildTransaction: prepareTransaction(approvalAction.transactionMethods, (await this.provider.getNetwork()).chainId),
|
|
1311
|
+
buildTransaction: prepareTransaction(approvalAction.transactionMethods, (await this.provider.getNetwork()).chainId, offerer),
|
|
1314
1312
|
});
|
|
1315
1313
|
}
|
|
1316
1314
|
const createAction = seaportActions.find((action) => action.type === 'create');
|
|
@@ -1338,15 +1336,12 @@ class Seaport {
|
|
|
1338
1336
|
const address = await signer.getAddress();
|
|
1339
1337
|
// eslint-disable-next-line no-console
|
|
1340
1338
|
console.log(`Fulfiller address: ${address}`);
|
|
1341
|
-
// eslint-disable-next-line no-console
|
|
1342
|
-
console.log(`Provided address: ${account}`);
|
|
1343
1339
|
}
|
|
1344
1340
|
catch {
|
|
1345
1341
|
// no-op - this is for temporary debugging
|
|
1346
1342
|
}
|
|
1347
1343
|
const { actions: seaportActions } = await seaportLib.fulfillOrders({
|
|
1348
1344
|
accountAddress: account,
|
|
1349
|
-
recipientAddress: account,
|
|
1350
1345
|
fulfillOrderDetails: [
|
|
1351
1346
|
{
|
|
1352
1347
|
order: {
|
|
@@ -1363,7 +1358,7 @@ class Seaport {
|
|
|
1363
1358
|
if (approvalAction) {
|
|
1364
1359
|
fulfillmentActions.push({
|
|
1365
1360
|
type: ActionType.TRANSACTION,
|
|
1366
|
-
buildTransaction: prepareTransaction(approvalAction.transactionMethods, (await this.provider.getNetwork()).chainId),
|
|
1361
|
+
buildTransaction: prepareTransaction(approvalAction.transactionMethods, (await this.provider.getNetwork()).chainId, account),
|
|
1367
1362
|
purpose: TransactionPurpose.APPROVAL,
|
|
1368
1363
|
});
|
|
1369
1364
|
}
|
|
@@ -1373,7 +1368,7 @@ class Seaport {
|
|
|
1373
1368
|
}
|
|
1374
1369
|
fulfillmentActions.push({
|
|
1375
1370
|
type: ActionType.TRANSACTION,
|
|
1376
|
-
buildTransaction: prepareTransaction(fulfilOrderAction.transactionMethods, (await this.provider.getNetwork()).chainId),
|
|
1371
|
+
buildTransaction: prepareTransaction(fulfilOrderAction.transactionMethods, (await this.provider.getNetwork()).chainId, account),
|
|
1377
1372
|
purpose: TransactionPurpose.FULFILL_ORDER,
|
|
1378
1373
|
});
|
|
1379
1374
|
return {
|
|
@@ -1403,7 +1398,7 @@ class Seaport {
|
|
|
1403
1398
|
if (approvalAction) {
|
|
1404
1399
|
fulfillmentActions.push({
|
|
1405
1400
|
type: ActionType.TRANSACTION,
|
|
1406
|
-
buildTransaction: prepareTransaction(approvalAction.transactionMethods, (await this.provider.getNetwork()).chainId),
|
|
1401
|
+
buildTransaction: prepareTransaction(approvalAction.transactionMethods, (await this.provider.getNetwork()).chainId, account),
|
|
1407
1402
|
purpose: TransactionPurpose.APPROVAL,
|
|
1408
1403
|
});
|
|
1409
1404
|
}
|
|
@@ -1413,7 +1408,7 @@ class Seaport {
|
|
|
1413
1408
|
}
|
|
1414
1409
|
fulfillmentActions.push({
|
|
1415
1410
|
type: ActionType.TRANSACTION,
|
|
1416
|
-
buildTransaction: prepareTransaction(fulfilOrderAction.transactionMethods, (await this.provider.getNetwork()).chainId),
|
|
1411
|
+
buildTransaction: prepareTransaction(fulfilOrderAction.transactionMethods, (await this.provider.getNetwork()).chainId, account),
|
|
1417
1412
|
purpose: TransactionPurpose.FULFILL_ORDER,
|
|
1418
1413
|
});
|
|
1419
1414
|
return {
|
|
@@ -1430,7 +1425,7 @@ class Seaport {
|
|
|
1430
1425
|
const cancellationTransaction = await seaportLib.cancelOrders(orderComponents, account);
|
|
1431
1426
|
return {
|
|
1432
1427
|
type: ActionType.TRANSACTION,
|
|
1433
|
-
buildTransaction: prepareTransaction(cancellationTransaction, (await this.provider.getNetwork()).chainId),
|
|
1428
|
+
buildTransaction: prepareTransaction(cancellationTransaction, (await this.provider.getNetwork()).chainId, account),
|
|
1434
1429
|
purpose: TransactionPurpose.CANCEL,
|
|
1435
1430
|
};
|
|
1436
1431
|
}
|
|
@@ -1649,6 +1644,14 @@ function getOrderbookConfig(environment) {
|
|
|
1649
1644
|
// safely instantiate a V6 provider for the V5 provider URL.
|
|
1650
1645
|
function convertToV6Provider(provider) {
|
|
1651
1646
|
const overwrittenProvider = new JsonRpcProvider(provider.connection.url);
|
|
1647
|
+
// eslint-disable-next-line no-console
|
|
1648
|
+
console.log('Overwritten provider getSigner method');
|
|
1649
|
+
// eslint-disable-next-line no-console
|
|
1650
|
+
console.log(overwrittenProvider.getSigner);
|
|
1651
|
+
// eslint-disable-next-line no-console
|
|
1652
|
+
console.log('Overwriter provider methods');
|
|
1653
|
+
// eslint-disable-next-line no-console
|
|
1654
|
+
console.log(JSON.stringify(Object.keys(overwrittenProvider), null, 2));
|
|
1652
1655
|
// Need to override the getSigner method to mimic V5 behaviour
|
|
1653
1656
|
overwrittenProvider.getSigner = async function getSigner(address) {
|
|
1654
1657
|
if (address == null) {
|
|
@@ -1669,14 +1672,6 @@ function convertToV6Provider(provider) {
|
|
|
1669
1672
|
// provider has access to the address as a signer.
|
|
1670
1673
|
return new JsonRpcSigner(this, address);
|
|
1671
1674
|
};
|
|
1672
|
-
// eslint-disable-next-line no-console
|
|
1673
|
-
console.log('Overwritten provider getSigner method');
|
|
1674
|
-
// eslint-disable-next-line no-console
|
|
1675
|
-
console.log(overwrittenProvider.getSigner);
|
|
1676
|
-
// eslint-disable-next-line no-console
|
|
1677
|
-
console.log('Overwriter provider methods');
|
|
1678
|
-
// eslint-disable-next-line no-console
|
|
1679
|
-
console.log(JSON.stringify(Object.keys(overwrittenProvider), null, 2));
|
|
1680
1675
|
return overwrittenProvider;
|
|
1681
1676
|
}
|
|
1682
1677
|
class SeaportLibFactory {
|
package/dist/passport.js
CHANGED
|
@@ -11446,7 +11446,7 @@ class MultiRollupApiClients {
|
|
|
11446
11446
|
}
|
|
11447
11447
|
|
|
11448
11448
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
11449
|
-
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-1.24.0-alpha.
|
|
11449
|
+
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-1.24.0-alpha.5' };
|
|
11450
11450
|
const createConfig$1 = ({ basePath, headers, }) => {
|
|
11451
11451
|
if (!basePath.trim()) {
|
|
11452
11452
|
throw Error('basePath can not be empty');
|
|
@@ -11625,7 +11625,7 @@ const flattenProperties = (properties) => {
|
|
|
11625
11625
|
};
|
|
11626
11626
|
|
|
11627
11627
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
11628
|
-
const SDK_VERSION = '1.24.0-alpha.
|
|
11628
|
+
const SDK_VERSION = '1.24.0-alpha.5';
|
|
11629
11629
|
const getReferrer = () => {
|
|
11630
11630
|
if (isNode()) {
|
|
11631
11631
|
return '';
|
|
@@ -11875,7 +11875,7 @@ const addKeysToHeadersOverride = (baseConfig, overrides) => {
|
|
|
11875
11875
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
11876
11876
|
class ApiConfiguration extends index$2.Configuration {
|
|
11877
11877
|
}
|
|
11878
|
-
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.24.0-alpha.
|
|
11878
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.24.0-alpha.5' };
|
|
11879
11879
|
/**
|
|
11880
11880
|
* @dev use createImmutableXConfiguration instead
|
|
11881
11881
|
*/
|
|
@@ -11914,7 +11914,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
11914
11914
|
chainID,
|
|
11915
11915
|
coreContractAddress,
|
|
11916
11916
|
registrationContractAddress,
|
|
11917
|
-
sdkVersion: 'ts-immutable-sdk-1.24.0-alpha.
|
|
11917
|
+
sdkVersion: 'ts-immutable-sdk-1.24.0-alpha.5',
|
|
11918
11918
|
baseConfig,
|
|
11919
11919
|
});
|
|
11920
11920
|
const production = ({ baseConfig }) => createImmutableXConfiguration({
|
package/dist/x.js
CHANGED
|
@@ -8954,7 +8954,7 @@ const flattenProperties = (properties) => {
|
|
|
8954
8954
|
};
|
|
8955
8955
|
|
|
8956
8956
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
8957
|
-
const SDK_VERSION = '1.24.0-alpha.
|
|
8957
|
+
const SDK_VERSION = '1.24.0-alpha.5';
|
|
8958
8958
|
const getReferrer = () => {
|
|
8959
8959
|
if (isNode()) {
|
|
8960
8960
|
return '';
|
|
@@ -9197,7 +9197,7 @@ const addKeysToHeadersOverride = (baseConfig, overrides) => {
|
|
|
9197
9197
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
9198
9198
|
class ApiConfiguration extends index$2.Configuration {
|
|
9199
9199
|
}
|
|
9200
|
-
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.24.0-alpha.
|
|
9200
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-1.24.0-alpha.5' };
|
|
9201
9201
|
/**
|
|
9202
9202
|
* @dev use createImmutableXConfiguration instead
|
|
9203
9203
|
*/
|
|
@@ -9236,7 +9236,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
9236
9236
|
chainID,
|
|
9237
9237
|
coreContractAddress,
|
|
9238
9238
|
registrationContractAddress,
|
|
9239
|
-
sdkVersion: 'ts-immutable-sdk-1.24.0-alpha.
|
|
9239
|
+
sdkVersion: 'ts-immutable-sdk-1.24.0-alpha.5',
|
|
9240
9240
|
baseConfig,
|
|
9241
9241
|
});
|
|
9242
9242
|
const production = ({ baseConfig }) => createImmutableXConfiguration({
|
package/package.json
CHANGED