Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b52c6bba0 | ||
|
|
e024d78ed0 | ||
|
|
a2002d1637 | ||
|
|
607ab7e860 | ||
|
|
f27989741a | ||
|
|
b2be63ada4 | ||
|
|
eee200f8d4 |
@@ -1,5 +1,19 @@
|
||||
# @thirdweb-dev/auth
|
||||
|
||||
## 4.1.42
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/wallets@2.4.20
|
||||
|
||||
## 4.1.41
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @thirdweb-dev/wallets@2.4.19
|
||||
|
||||
## 4.1.40
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/auth",
|
||||
"version": "4.1.40",
|
||||
"version": "4.1.42",
|
||||
"main": "dist/thirdweb-dev-auth.cjs.js",
|
||||
"module": "dist/thirdweb-dev-auth.esm.js",
|
||||
"browser": {
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
# thirdweb
|
||||
|
||||
## 0.13.50
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`a2002d1`](https://github.com/thirdweb-dev/js/commit/a2002d16376c41fffa59daccfd98856aba90a627)]:
|
||||
- @thirdweb-dev/sdk@4.0.45
|
||||
- @thirdweb-dev/wallets@2.4.20
|
||||
- @thirdweb-dev/auth@4.1.42
|
||||
|
||||
## 0.13.49
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`b2be63a`](https://github.com/thirdweb-dev/js/commit/b2be63ada466ea1784d680ae6244ac047a190103)]:
|
||||
- @thirdweb-dev/sdk@4.0.44
|
||||
- @thirdweb-dev/wallets@2.4.19
|
||||
- @thirdweb-dev/auth@4.1.41
|
||||
|
||||
## 0.13.48
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "thirdweb",
|
||||
"main": "dist/cli/index.js",
|
||||
"version": "0.13.48",
|
||||
"version": "0.13.50",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/cli",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
# @thirdweb-dev/react-core
|
||||
|
||||
## 4.4.18
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`a2002d1`](https://github.com/thirdweb-dev/js/commit/a2002d16376c41fffa59daccfd98856aba90a627)]:
|
||||
- @thirdweb-dev/sdk@4.0.45
|
||||
- @thirdweb-dev/wallets@2.4.20
|
||||
- @thirdweb-dev/auth@4.1.42
|
||||
|
||||
## 4.4.17
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`b2be63a`](https://github.com/thirdweb-dev/js/commit/b2be63ada466ea1784d680ae6244ac047a190103)]:
|
||||
- @thirdweb-dev/sdk@4.0.44
|
||||
- @thirdweb-dev/wallets@2.4.19
|
||||
- @thirdweb-dev/auth@4.1.41
|
||||
|
||||
## 4.4.16
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react-core",
|
||||
"version": "4.4.16",
|
||||
"version": "4.4.18",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-core",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
Binary file not shown.
@@ -1,5 +1,9 @@
|
||||
# @thirdweb-dev/react-native-compat
|
||||
|
||||
## 0.7.15
|
||||
|
||||
## 0.7.14
|
||||
|
||||
## 0.7.13
|
||||
|
||||
## 0.7.12
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react-native-compat",
|
||||
"description": "Shims for Thirdweb in React Native Projects",
|
||||
"version": "0.7.13",
|
||||
"version": "0.7.15",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native-compat",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
# @thirdweb-dev/react-native
|
||||
|
||||
## 0.7.15
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`a2002d1`](https://github.com/thirdweb-dev/js/commit/a2002d16376c41fffa59daccfd98856aba90a627)]:
|
||||
- @thirdweb-dev/sdk@4.0.45
|
||||
- @thirdweb-dev/react-core@4.4.18
|
||||
- @thirdweb-dev/wallets@2.4.20
|
||||
|
||||
## 0.7.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`b2be63a`](https://github.com/thirdweb-dev/js/commit/b2be63ada466ea1784d680ae6244ac047a190103)]:
|
||||
- @thirdweb-dev/sdk@4.0.44
|
||||
- @thirdweb-dev/react-core@4.4.17
|
||||
- @thirdweb-dev/wallets@2.4.19
|
||||
|
||||
## 0.7.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react-native",
|
||||
"version": "0.7.13",
|
||||
"version": "0.7.15",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
Binary file not shown.
@@ -1,5 +1,23 @@
|
||||
# @thirdweb-dev/react
|
||||
|
||||
## 4.4.18
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`a2002d1`](https://github.com/thirdweb-dev/js/commit/a2002d16376c41fffa59daccfd98856aba90a627)]:
|
||||
- @thirdweb-dev/sdk@4.0.45
|
||||
- @thirdweb-dev/react-core@4.4.18
|
||||
- @thirdweb-dev/wallets@2.4.20
|
||||
|
||||
## 4.4.17
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`b2be63a`](https://github.com/thirdweb-dev/js/commit/b2be63ada466ea1784d680ae6244ac047a190103)]:
|
||||
- @thirdweb-dev/sdk@4.0.44
|
||||
- @thirdweb-dev/react-core@4.4.17
|
||||
- @thirdweb-dev/wallets@2.4.19
|
||||
|
||||
## 4.4.16
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/react",
|
||||
"version": "4.4.16",
|
||||
"version": "4.4.18",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react",
|
||||
"author": "thirdweb eng <[email protected]>",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
Binary file not shown.
@@ -1,5 +1,17 @@
|
||||
# @thirdweb-dev/sdk
|
||||
|
||||
## 4.0.45
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#2469](https://github.com/thirdweb-dev/js/pull/2469) [`a2002d1`](https://github.com/thirdweb-dev/js/commit/a2002d16376c41fffa59daccfd98856aba90a627) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Better return type for getProofsForAllowListEntry
|
||||
|
||||
## 4.0.44
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#2457](https://github.com/thirdweb-dev/js/pull/2457) [`b2be63a`](https://github.com/thirdweb-dev/js/commit/b2be63ada466ea1784d680ae6244ac047a190103) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Handle l2 gas estimations when forcing gasLimit
|
||||
|
||||
## 4.0.43
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/sdk",
|
||||
"version": "4.0.43",
|
||||
"version": "4.0.45",
|
||||
"description": "The main thirdweb SDK.",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/sdk",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -115,17 +115,16 @@ export async function estimateTransactionCost(
|
||||
tx: providers.TransactionRequest,
|
||||
) {
|
||||
const chainId = (await provider.getNetwork()).chainId;
|
||||
let l1GasCost = BigNumber.from(0);
|
||||
if (isOpStackChain(chainId)) {
|
||||
const { asL2Provider } = await import("@eth-optimism/sdk");
|
||||
const l2RpcProvider = asL2Provider(provider);
|
||||
const l2GasCost = await l2RpcProvider.estimateTotalGasCost(tx);
|
||||
return l2GasCost;
|
||||
} else {
|
||||
const gasLimit = tx.gasLimit || (await provider.estimateGas(tx));
|
||||
const gasPrice = await getGasPrice(provider);
|
||||
const gasCost = BigNumber.from(gasLimit).mul(gasPrice);
|
||||
return gasCost;
|
||||
l1GasCost = await l2RpcProvider.estimateL1GasCost(tx);
|
||||
}
|
||||
const gasLimit = tx.gasLimit || (await provider.estimateGas(tx));
|
||||
const gasPrice = await getGasPrice(provider);
|
||||
const gasCost = BigNumber.from(gasLimit).mul(gasPrice);
|
||||
return gasCost.add(l1GasCost);
|
||||
}
|
||||
|
||||
function isOpStackChain(chainId: number) {
|
||||
|
||||
@@ -91,9 +91,9 @@ export async function getProofsForAllowListEntry(
|
||||
tokenDecimals: number = 18,
|
||||
version: SnapshotFormatVersion = SnapshotFormatVersion.V1,
|
||||
) {
|
||||
return merkleTree.getProof(
|
||||
hashAllowListEntry(snapshotEntry, tokenDecimals, version),
|
||||
);
|
||||
return merkleTree
|
||||
.getProof(hashAllowListEntry(snapshotEntry, tokenDecimals, version))
|
||||
.map((value) => "0x" + value.data.toString("hex"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,8 +8,6 @@ import {
|
||||
fetchContractMetadataFromAddress,
|
||||
getContractMetadataFromCache,
|
||||
} from "../../common/metadata-resolver";
|
||||
import { fetchSourceFilesFromMetadata } from "../../common/fetchSourceFilesFromMetadata";
|
||||
import { ContractSource } from "../../schema/contracts/custom";
|
||||
import { SDKOptionsOutput } from "../../schema/sdk-options";
|
||||
import type {
|
||||
DeployTransactionOptions,
|
||||
@@ -666,7 +664,6 @@ export class Transaction<
|
||||
const reason = parseRevertReason(error);
|
||||
|
||||
// Get contract sources for stack trace
|
||||
let sources: ContractSource[] | undefined = undefined;
|
||||
let contractName: string | undefined = undefined;
|
||||
try {
|
||||
const chainId = (await provider.getNetwork()).chainId;
|
||||
@@ -678,10 +675,6 @@ export class Transaction<
|
||||
if (metadata?.name) {
|
||||
contractName = metadata.name;
|
||||
}
|
||||
|
||||
if (metadata?.metadata.sources) {
|
||||
sources = await fetchSourceFilesFromMetadata(metadata, this.storage);
|
||||
}
|
||||
} catch (err) {
|
||||
// no-op
|
||||
}
|
||||
@@ -698,7 +691,6 @@ export class Transaction<
|
||||
value,
|
||||
hash,
|
||||
contractName,
|
||||
sources,
|
||||
},
|
||||
error,
|
||||
);
|
||||
|
||||
Binary file not shown.
@@ -1,5 +1,17 @@
|
||||
# @thirdweb-dev/service-utils
|
||||
|
||||
## 0.4.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#2465](https://github.com/thirdweb-dev/js/pull/2465) [`e024d78`](https://github.com/thirdweb-dev/js/commit/e024d78ed03fb2f2a618908e87af80799cb79298) Thanks [@edwardysun](https://github.com/edwardysun)! - Add pay to usageEventSchema
|
||||
|
||||
## 0.4.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#2453](https://github.com/thirdweb-dev/js/pull/2453) [`eee200f`](https://github.com/thirdweb-dev/js/commit/eee200f8d4c4d4cb954b4a8dfcd5ac433f7d2988) Thanks [@ElasticBottle](https://github.com/ElasticBottle)! - chore: allow embedded-wallet.thirdweb.com to use a given client ID for rpc request
|
||||
|
||||
## 0.4.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/service-utils",
|
||||
"version": "0.4.19",
|
||||
"version": "0.4.21",
|
||||
"main": "dist/thirdweb-dev-service-utils.cjs.js",
|
||||
"module": "dist/thirdweb-dev-service-utils.esm.js",
|
||||
"exports": {
|
||||
|
||||
@@ -24,6 +24,7 @@ const usageEventSchema = z.object({
|
||||
"connectWallet",
|
||||
"checkout",
|
||||
"engine",
|
||||
"pay",
|
||||
]),
|
||||
action: z.string(),
|
||||
|
||||
@@ -65,6 +66,10 @@ const usageEventSchema = z.object({
|
||||
msSinceQueue: z.number().nonnegative().optional(),
|
||||
msSinceSend: z.number().nonnegative().optional(),
|
||||
msTotalDuration: z.number().nonnegative().optional(),
|
||||
swapId: z.string().optional(),
|
||||
tokenAddress: z.string().optional(),
|
||||
amountWei: z.string().optional(),
|
||||
amountUSDCents: z.number().nonnegative().optional(),
|
||||
});
|
||||
export type UsageEvent = z.infer<typeof usageEventSchema>;
|
||||
|
||||
|
||||
@@ -52,7 +52,14 @@ export function authorizeClient(
|
||||
if (origin) {
|
||||
if (
|
||||
// find matching domain, or if all domains allowed
|
||||
domains.find((d) => {
|
||||
// embedded-wallet.thirdweb(-dev).com is automatically allowed
|
||||
// because the rpc is passed from user's domain to embedded-wallet.thirdweb.com iframe for use.
|
||||
// Note this doesn't allow embedded-wallets from being used if it's disabled. The service check that runs after enforces that.
|
||||
[
|
||||
...domains,
|
||||
"embedded-wallet.thirdweb.com",
|
||||
"embedded-wallet.thirdweb-dev.com",
|
||||
].find((d) => {
|
||||
// if any domain is allowed, we'll return true
|
||||
if (d === "*") {
|
||||
return true;
|
||||
|
||||
Binary file not shown.
@@ -1,5 +1,25 @@
|
||||
# @thirdweb-dev/unity-js-bridge
|
||||
|
||||
## 0.4.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#2466](https://github.com/thirdweb-dev/js/pull/2466) [`607ab7e`](https://github.com/thirdweb-dev/js/commit/607ab7e8600f7637f7e74f0990ddd2f4fb9a2730) Thanks [@0xFirekeeper](https://github.com/0xFirekeeper)! - [unity] expose sw isdeployed
|
||||
|
||||
- Updated dependencies [[`a2002d1`](https://github.com/thirdweb-dev/js/commit/a2002d16376c41fffa59daccfd98856aba90a627)]:
|
||||
- @thirdweb-dev/sdk@4.0.45
|
||||
- @thirdweb-dev/wallets@2.4.20
|
||||
- @thirdweb-dev/auth@4.1.42
|
||||
|
||||
## 0.4.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`b2be63a`](https://github.com/thirdweb-dev/js/commit/b2be63ada466ea1784d680ae6244ac047a190103)]:
|
||||
- @thirdweb-dev/sdk@4.0.44
|
||||
- @thirdweb-dev/wallets@2.4.19
|
||||
- @thirdweb-dev/auth@4.1.41
|
||||
|
||||
## 0.4.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/unity-js-bridge",
|
||||
"version": "0.4.6",
|
||||
"version": "0.4.8",
|
||||
"main": "dist/thirdweb-unity-bridge.js",
|
||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/unity-js-bridge",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -101,6 +101,7 @@ interface TWBridge {
|
||||
getBlockWithTransactions: (blockNumber: string) => Promise<string>;
|
||||
getEmail: () => Promise<string>;
|
||||
getSignerAddress: () => Promise<string>;
|
||||
smartWalletIsDeployed: () => Promise<string>;
|
||||
}
|
||||
|
||||
const w = window;
|
||||
@@ -144,7 +145,7 @@ class ThirdwebBridge implements TWBridge {
|
||||
}
|
||||
(globalThis as any).X_SDK_NAME = "UnitySDK_WebGL";
|
||||
(globalThis as any).X_SDK_PLATFORM = "unity";
|
||||
(globalThis as any).X_SDK_VERSION = "4.7.7";
|
||||
(globalThis as any).X_SDK_VERSION = "4.7.8";
|
||||
(globalThis as any).X_SDK_OS = browser?.os ?? "unknown";
|
||||
}
|
||||
this.initializedChain = chain;
|
||||
@@ -817,6 +818,15 @@ class ThirdwebBridge implements TWBridge {
|
||||
}
|
||||
}
|
||||
|
||||
public async smartWalletIsDeployed() {
|
||||
if (!this.activeWallet) {
|
||||
throw new Error("No wallet connected");
|
||||
}
|
||||
const smartWallet = this.activeWallet as SmartWallet;
|
||||
const res = await smartWallet.isDeployed();
|
||||
return JSON.stringify({ result: res }, bigNumberReplacer);
|
||||
}
|
||||
|
||||
public openPopupWindow() {
|
||||
const win = window.open("", undefined, "width=350, height=500");
|
||||
if (win) {
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# @thirdweb-dev/wallets
|
||||
|
||||
## 2.4.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`a2002d1`](https://github.com/thirdweb-dev/js/commit/a2002d16376c41fffa59daccfd98856aba90a627)]:
|
||||
- @thirdweb-dev/sdk@4.0.45
|
||||
|
||||
## 2.4.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`b2be63a`](https://github.com/thirdweb-dev/js/commit/b2be63ada466ea1784d680ae6244ac047a190103)]:
|
||||
- @thirdweb-dev/sdk@4.0.44
|
||||
|
||||
## 2.4.18
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@thirdweb-dev/wallets",
|
||||
"version": "2.4.18",
|
||||
"version": "2.4.20",
|
||||
"main": "dist/thirdweb-dev-wallets.cjs.js",
|
||||
"module": "dist/thirdweb-dev-wallets.esm.js",
|
||||
"browser": {
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user