Compare commits

...
Author SHA1 Message Date
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
cbfd445ae7 Version Packages (#1784)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-16 20:38:41 -07:00
Jonas DanielsandGitHub 137f46a547 chore(chains): fix up chain sync script (#1783) 2023-10-17 02:28:33 +00:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
1b8accde30 Version Packages (#1782)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-16 15:51:35 -07:00
Joaquim VergesandGitHub 07544252b4 [SDK] expose utility functions for abi / sources (#1781) 2023-10-16 22:43:13 +00:00
47 changed files with 292 additions and 127 deletions
+14
View File
@@ -1,5 +1,19 @@
# @thirdweb-dev/auth
## 4.0.7
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/wallets@2.0.7
## 4.0.6
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/wallets@2.0.6
## 4.0.5
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/auth",
"version": "4.0.5",
"version": "4.0.7",
"main": "dist/thirdweb-dev-auth.cjs.js",
"module": "dist/thirdweb-dev-auth.esm.js",
"browser": {
+6
View File
@@ -1,5 +1,11 @@
# @thirdweb-dev/chains
## 0.1.55
### Patch Changes
- [#1783](https://github.com/thirdweb-dev/js/pull/1783) [`137f46a5`](https://github.com/thirdweb-dev/js/commit/137f46a5470d2b5f9d7f9eda9b2d839a53ddeb64) Thanks [@jnsdls](https://github.com/jnsdls)! - sync chains
## 0.1.54
### Patch Changes
+4 -4
View File
@@ -4,13 +4,13 @@ export default {
"chainId": 100,
"explorers": [
{
"name": "gnosisscan",
"url": "https://gnosisscan.io",
"name": "blockscout",
"url": "https://gnosis.blockscout.com",
"standard": "EIP3091"
},
{
"name": "blockscout",
"url": "https://gnosis.blockscout.com",
"name": "gnosisscan",
"url": "https://gnosisscan.io",
"standard": "EIP3091"
}
],
+4 -4
View File
@@ -4,13 +4,13 @@ export default {
"chainId": 11110,
"explorers": [
{
"name": "Astra PingPub Explorer",
"url": "https://ping.astranaut.io/astra",
"name": "Astra EVM Explorer (Blockscout)",
"url": "https://explorer.astranaut.io",
"standard": "none"
},
{
"name": "Astra EVM Explorer (Blockscout)",
"url": "https://explorer.astranaut.io",
"name": "Astra PingPub Explorer",
"url": "https://ping.astranaut.io/astra",
"standard": "none"
}
],
+5 -5
View File
@@ -3,15 +3,15 @@ export default {
"chain": "Astra",
"chainId": 11115,
"explorers": [
{
"name": "Astra PingPub Explorer",
"url": "https://ping.astranaut.dev/astra",
"standard": "none"
},
{
"name": "Astra EVM Explorer",
"url": "https://explorer.astranaut.dev",
"standard": "EIP3091"
},
{
"name": "Astra PingPub Explorer",
"url": "https://ping.astranaut.dev/astra",
"standard": "none"
}
],
"faucets": [
-1
View File
@@ -19,7 +19,6 @@ export default {
},
"redFlags": [],
"rpc": [
"https://localhost.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"http://localhost:8545"
],
"shortName": "local",
+4 -4
View File
@@ -4,13 +4,13 @@ export default {
"chainId": 2023,
"explorers": [
{
"name": "Taycan Cosmos Explorer",
"url": "https://cosmoscan-test.hupayx.io",
"name": "Taycan Explorer(Blockscout)",
"url": "https://evmscan-test.hupayx.io",
"standard": "none"
},
{
"name": "Taycan Explorer(Blockscout)",
"url": "https://evmscan-test.hupayx.io",
"name": "Taycan Cosmos Explorer",
"url": "https://cosmoscan-test.hupayx.io",
"standard": "none"
}
],
-1
View File
@@ -30,7 +30,6 @@ export default {
"rpc": [
"https://kava-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://evm.testnet.kava.io",
"https://kava-evm-testnet.rpc.thirdweb.com",
"wss://wevm.testnet.kava.io"
],
"shortName": "tkava",
-1
View File
@@ -30,7 +30,6 @@ export default {
"https://evm.kava.io",
"https://evm2.kava.io",
"https://kava-rpc.gateway.pokt.network",
"https://kava-evm.rpc.thirdweb.com",
"wss://wevm.kava.io",
"wss://wevm2.kava.io",
"https://kava-evm.publicnode.com",
+4 -4
View File
@@ -4,13 +4,13 @@ export default {
"chainId": 30,
"explorers": [
{
"name": "Rootstock Explorer",
"url": "https://explorer.rsk.co",
"name": "blockscout",
"url": "https://rootstock.blockscout.com",
"standard": "EIP3091"
},
{
"name": "blockscout",
"url": "https://rootstock.blockscout.com",
"name": "Rootstock Explorer",
"url": "https://explorer.rsk.co",
"standard": "EIP3091"
}
],
+5 -5
View File
@@ -3,15 +3,15 @@ export default {
"chain": "SDN",
"chainId": 336,
"explorers": [
{
"name": "subscan",
"url": "https://shiden.subscan.io",
"standard": "none"
},
{
"name": "blockscout",
"url": "https://blockscout.com/shiden",
"standard": "EIP3091"
},
{
"name": "subscan",
"url": "https://shiden.subscan.io",
"standard": "none"
}
],
"faucets": [],
+4 -4
View File
@@ -4,13 +4,13 @@ export default {
"chainId": 369,
"explorers": [
{
"name": "otterscan",
"url": "https://otter.pulsechain.com",
"name": "blockscout",
"url": "https://scan.pulsechain.com",
"standard": "EIP3091"
},
{
"name": "blockscout",
"url": "https://scan.pulsechain.com",
"name": "otterscan",
"url": "https://otter.pulsechain.com",
"standard": "EIP3091"
}
],
+3 -3
View File
@@ -18,7 +18,7 @@ export default {
"format": "png"
},
"infoURL": "http://doschain.io/",
"name": "DOS Tesnet",
"name": "DOS Testnet",
"nativeCurrency": {
"name": "DOS",
"symbol": "DOS",
@@ -26,10 +26,10 @@ export default {
},
"redFlags": [],
"rpc": [
"https://dos-tesnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://dos-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://test.doschain.com"
],
"shortName": "dost",
"slug": "dos-tesnet",
"slug": "dos-testnet",
"testnet": true
} as const satisfies Chain;
+1 -2
View File
@@ -27,8 +27,7 @@ export default {
"redFlags": [],
"rpc": [
"https://wireshape-floripa-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
"https://rpc-floripa.wireshape.org",
"https://wireshape-floripa-testnet.rpc.thirdweb.com"
"https://rpc-floripa.wireshape.org"
],
"shortName": "floripa",
"slug": "wireshape-floripa-testnet",
+4 -4
View File
@@ -4,13 +4,13 @@ export default {
"chainId": 50,
"explorers": [
{
"name": "blocksscan",
"url": "https://xdc.blocksscan.io",
"name": "xdcscan",
"url": "https://xdcscan.io",
"standard": "EIP3091"
},
{
"name": "xdcscan",
"url": "https://xdcscan.io",
"name": "blocksscan",
"url": "https://xdc.blocksscan.io",
"standard": "EIP3091"
}
],
+4 -4
View File
@@ -4,13 +4,13 @@ export default {
"chainId": 51,
"explorers": [
{
"name": "blocksscan",
"url": "https://apothem.blocksscan.io",
"name": "xdcscan",
"url": "https://apothem.xinfinscan.com",
"standard": "EIP3091"
},
{
"name": "xdcscan",
"url": "https://apothem.xinfinscan.com",
"name": "blocksscan",
"url": "https://apothem.blocksscan.io",
"standard": "EIP3091"
}
],
+5 -5
View File
@@ -3,15 +3,15 @@ export default {
"chain": "Imversed",
"chainId": 5555555,
"explorers": [
{
"name": "Imversed Cosmos Explorer (Big Dipper)",
"url": "https://tex-c.imversed.com",
"standard": "none"
},
{
"name": "Imversed EVM explorer (Blockscout)",
"url": "https://txe.imversed.network",
"standard": "EIP3091"
},
{
"name": "Imversed Cosmos Explorer (Big Dipper)",
"url": "https://tex-c.imversed.com",
"standard": "none"
}
],
"faucets": [],
+5 -5
View File
@@ -3,15 +3,15 @@ export default {
"chain": "Imversed",
"chainId": 5555558,
"explorers": [
{
"name": "Imversed Cosmos Explorer (Big Dipper)",
"url": "https://tex-t.imversed.com",
"standard": "none"
},
{
"name": "Imversed EVM Explorer (Blockscout)",
"url": "https://txe-test.imversed.network",
"standard": "EIP3091"
},
{
"name": "Imversed Cosmos Explorer (Big Dipper)",
"url": "https://tex-t.imversed.com",
"standard": "none"
}
],
"faucets": [],
+4 -4
View File
@@ -4,13 +4,13 @@ export default {
"chainId": 59140,
"explorers": [
{
"name": "Blockscout",
"url": "https://explorer.goerli.linea.build",
"name": "Etherscan",
"url": "https://goerli.lineascan.build",
"standard": "EIP3091"
},
{
"name": "Etherscan",
"url": "https://goerli.lineascan.build",
"name": "Blockscout",
"url": "https://explorer.goerli.linea.build",
"standard": "EIP3091"
}
],
-5
View File
@@ -7,11 +7,6 @@ export default {
"name": "lineascan",
"url": "https://lineascan.build",
"standard": "EIP3091"
},
{
"name": "Linea Scan",
"url": "https://lineascan.build",
"standard": ""
}
],
"faucets": [
+5 -5
View File
@@ -3,15 +3,15 @@ export default {
"chain": "ASTR",
"chainId": 592,
"explorers": [
{
"name": "subscan",
"url": "https://astar.subscan.io",
"standard": "none"
},
{
"name": "blockscout",
"url": "https://blockscout.com/astar",
"standard": "EIP3091"
},
{
"name": "subscan",
"url": "https://astar.subscan.io",
"standard": "none"
}
],
"faucets": [],
+4 -4
View File
@@ -4,13 +4,13 @@ export default {
"chainId": 8000,
"explorers": [
{
"name": "Teleport Cosmos Explorer (Big Dipper)",
"url": "https://explorer.teleport.network",
"name": "Teleport EVM Explorer (Blockscout)",
"url": "https://evm-explorer.teleport.network",
"standard": "none"
},
{
"name": "Teleport EVM Explorer (Blockscout)",
"url": "https://evm-explorer.teleport.network",
"name": "Teleport Cosmos Explorer (Big Dipper)",
"url": "https://explorer.teleport.network",
"standard": "none"
}
],
+4 -4
View File
@@ -4,13 +4,13 @@ export default {
"chainId": 8001,
"explorers": [
{
"name": "Teleport Cosmos Explorer (Big Dipper)",
"url": "https://explorer.testnet.teleport.network",
"name": "Teleport EVM Explorer (Blockscout)",
"url": "https://evm-explorer.testnet.teleport.network",
"standard": "none"
},
{
"name": "Teleport EVM Explorer (Blockscout)",
"url": "https://evm-explorer.testnet.teleport.network",
"name": "Teleport Cosmos Explorer (Big Dipper)",
"url": "https://explorer.testnet.teleport.network",
"standard": "none"
}
],
+5 -5
View File
@@ -3,15 +3,15 @@ export default {
"chain": "ETH",
"chainId": 8453,
"explorers": [
{
"name": "basescan",
"url": "https://basescan.org",
"standard": "none"
},
{
"name": "basescout",
"url": "https://base.blockscout.com",
"standard": "EIP3091"
},
{
"name": "basescan",
"url": "https://basescan.org",
"standard": "none"
}
],
"faucets": [],
+5 -5
View File
@@ -3,15 +3,15 @@ export default {
"chain": "ETH",
"chainId": 84531,
"explorers": [
{
"name": "basescan",
"url": "https://goerli.basescan.org",
"standard": "none"
},
{
"name": "basescout",
"url": "https://base-goerli.blockscout.com",
"standard": "EIP3091"
},
{
"name": "basescan",
"url": "https://goerli.basescan.org",
"standard": "none"
}
],
"faucets": [
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/chains",
"version": "0.1.54",
"version": "0.1.55",
"main": "dist/thirdweb-dev-chains.cjs.js",
"module": "dist/thirdweb-dev-chains.esm.js",
"browser": {
+22 -24
View File
@@ -6,7 +6,7 @@ const BASE_URI = (process.env.BASE_URI as string) || "https://api.thirdweb.com";
async function getAllPaginatedChains(
chains: any[] = [],
pathname = "/v1/chains",
pathname = "/v1/chains?limit=100",
) {
const url = new URL(BASE_URI);
url.pathname = pathname;
@@ -33,31 +33,37 @@ async function sync() {
const results = await Promise.all(
allChainsInDB.map(async (chain) => {
let chainId = chain.chainId;
// try to convert to number for legacy reasons
try {
chainId = Number(chainId);
} catch {
// if we fail here then we cannot use this chain in the chains package for now, so we skip it
return null;
}
const pkgChain: Chain = {
...chain,
chainId: Number(chain.chainId),
// assing back the chainId
chainId,
// map the features to the legacy format
features: chain.features?.map((feature) => ({ name: feature })),
};
// remove all null values
Object.keys(pkgChain).forEach((key) => {
// @ts-ignore
if (pkgChain[key] === null || pkgChain[key] === undefined) {
// @ts-ignore
delete pkgChain[key];
}
});
// sort top level keys alphabetically
// @ts-ignore
const sortedChain: Chain = {};
const sortedChain = {} as Chain;
Object.keys(pkgChain)
.sort()
.forEach((key) => {
// @ts-ignore
sortedChain[key] = pkgChain[key];
});
// @ts-ignore
await fs.writeFile(
`${chainsDir}/${sortedChain.chainId}.ts`,
`import type { Chain } from "../src/types";
@@ -78,17 +84,8 @@ export default ${JSON.stringify(
exportName = `_${exportName}`;
}
// imports.push(`import c${chain.chainId} from "../chains/${chain.chainId}";`);
// exports.push(
// `export { default as ${exportName} } from "../chains/${chain.chainId}"`,
// );
const key = `c${sortedChain.chainId}`;
// exportNames.push(key);
// exportNameToChain[key] = chain;
return {
imp: `import c${sortedChain.chainId} from "../chains/${sortedChain.chainId}";`,
exp: `export { default as ${exportName} } from "../chains/${sortedChain.chainId}"`,
@@ -101,20 +98,21 @@ export default ${JSON.stringify(
const { imports, exports, exportNames, exportNameToChain } = results.reduce(
(acc, result) => {
// @ts-ignore
// if it's a null result skip it (can happen when we skip chains above because their chainID is out of bounds)
if (result === null) {
return acc;
}
acc.imports.push(result.imp);
// @ts-ignore
acc.exports.push(result.exp);
// @ts-ignore
acc.exportNames.push(result.key);
acc.exportNameToChain[result.key] = result.chain;
return acc;
},
{
imports: [],
exports: [],
exportNames: [],
exportNameToChain: {},
imports: [] as string[],
exports: [] as string[],
exportNames: [] as string[],
exportNameToChain: {} as Record<string, Chain>,
},
);
+2 -2
View File
@@ -1587,7 +1587,7 @@ export { default as Alveychain } from "../chains/3797"
export { default as Kalychain } from "../chains/3888"
export { default as KalychainTestnet } from "../chains/3889"
export { default as DracNetwork } from "../chains/3912"
export { default as DosTesnet } from "../chains/3939"
export { default as DosTestnet } from "../chains/3939"
export { default as Dyno } from "../chains/3966"
export { default as DynoTestnet } from "../chains/3967"
export { default as Yuanchain } from "../chains/3999"
@@ -3727,7 +3727,7 @@ type ChainIdsBySlug = {
"kalychain": 3888,
"kalychain-testnet": 3889,
"drac-network": 3912,
"dos-tesnet": 3939,
"dos-testnet": 3939,
"dyno": 3966,
"dyno-testnet": 3967,
"yuanchain": 3999,
+19
View File
@@ -1,5 +1,24 @@
# thirdweb
## 0.13.7
### Patch Changes
- Updated dependencies [[`137f46a5`](https://github.com/thirdweb-dev/js/commit/137f46a5470d2b5f9d7f9eda9b2d839a53ddeb64)]:
- @thirdweb-dev/chains@0.1.55
- @thirdweb-dev/sdk@4.0.6
- @thirdweb-dev/wallets@2.0.7
- @thirdweb-dev/auth@4.0.7
## 0.13.6
### Patch Changes
- Updated dependencies [[`07544252`](https://github.com/thirdweb-dev/js/commit/07544252b49163e1ae84ba2cc76b99597a1c4553)]:
- @thirdweb-dev/sdk@4.0.5
- @thirdweb-dev/wallets@2.0.6
- @thirdweb-dev/auth@4.0.6
## 0.13.5
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "thirdweb",
"main": "dist/cli/index.js",
"version": "0.13.5",
"version": "0.13.7",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/cli",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
+19
View File
@@ -1,5 +1,24 @@
# @thirdweb-dev/react-core
## 4.0.7
### Patch Changes
- Updated dependencies [[`137f46a5`](https://github.com/thirdweb-dev/js/commit/137f46a5470d2b5f9d7f9eda9b2d839a53ddeb64)]:
- @thirdweb-dev/chains@0.1.55
- @thirdweb-dev/sdk@4.0.6
- @thirdweb-dev/wallets@2.0.7
- @thirdweb-dev/auth@4.0.7
## 4.0.6
### Patch Changes
- Updated dependencies [[`07544252`](https://github.com/thirdweb-dev/js/commit/07544252b49163e1ae84ba2cc76b99597a1c4553)]:
- @thirdweb-dev/sdk@4.0.5
- @thirdweb-dev/wallets@2.0.6
- @thirdweb-dev/auth@4.0.6
## 4.0.5
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react-core",
"version": "4.0.5",
"version": "4.0.7",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-core",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
@@ -1,5 +1,9 @@
# @thirdweb-dev/react-native-compat
## 0.3.12
## 0.3.11
## 0.3.10
## 0.3.9
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@thirdweb-dev/react-native-compat",
"description": "Shims for Thirdweb in React Native Projects",
"version": "0.3.10",
"version": "0.3.12",
"author": "thirdweb eng <[email protected]>",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native-compat",
"license": "Apache-2.0",
+19
View File
@@ -1,5 +1,24 @@
# @thirdweb-dev/react-native
## 0.3.12
### Patch Changes
- Updated dependencies [[`137f46a5`](https://github.com/thirdweb-dev/js/commit/137f46a5470d2b5f9d7f9eda9b2d839a53ddeb64)]:
- @thirdweb-dev/chains@0.1.55
- @thirdweb-dev/react-core@4.0.7
- @thirdweb-dev/sdk@4.0.6
- @thirdweb-dev/wallets@2.0.7
## 0.3.11
### Patch Changes
- Updated dependencies [[`07544252`](https://github.com/thirdweb-dev/js/commit/07544252b49163e1ae84ba2cc76b99597a1c4553)]:
- @thirdweb-dev/sdk@4.0.5
- @thirdweb-dev/react-core@4.0.6
- @thirdweb-dev/wallets@2.0.6
## 0.3.10
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react-native",
"version": "0.3.10",
"version": "0.3.12",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
+19
View File
@@ -1,5 +1,24 @@
# @thirdweb-dev/react
## 4.0.7
### Patch Changes
- Updated dependencies [[`137f46a5`](https://github.com/thirdweb-dev/js/commit/137f46a5470d2b5f9d7f9eda9b2d839a53ddeb64)]:
- @thirdweb-dev/chains@0.1.55
- @thirdweb-dev/react-core@4.0.7
- @thirdweb-dev/sdk@4.0.6
- @thirdweb-dev/wallets@2.0.7
## 4.0.6
### Patch Changes
- Updated dependencies [[`07544252`](https://github.com/thirdweb-dev/js/commit/07544252b49163e1ae84ba2cc76b99597a1c4553)]:
- @thirdweb-dev/sdk@4.0.5
- @thirdweb-dev/react-core@4.0.6
- @thirdweb-dev/wallets@2.0.6
## 4.0.5
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react",
"version": "4.0.5",
"version": "4.0.7",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
+13
View File
@@ -1,5 +1,18 @@
# @thirdweb-dev/sdk
## 4.0.6
### Patch Changes
- Updated dependencies [[`137f46a5`](https://github.com/thirdweb-dev/js/commit/137f46a5470d2b5f9d7f9eda9b2d839a53ddeb64)]:
- @thirdweb-dev/chains@0.1.55
## 4.0.5
### Patch Changes
- [#1781](https://github.com/thirdweb-dev/js/pull/1781) [`07544252`](https://github.com/thirdweb-dev/js/commit/07544252b49163e1ae84ba2cc76b99597a1c4553) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Expose utility functions for fetching ABI / sources
## 4.0.4
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/sdk",
"version": "4.0.4",
"version": "4.0.6",
"description": "The main thirdweb SDK.",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/sdk",
"license": "Apache-2.0",
@@ -7,9 +7,11 @@ import {
AbiEvent,
AbiFunction,
AbiSchema,
ContractSource,
PublishedMetadata,
} from "../../schema/contracts/custom";
import { ContractWrapper } from "./contract-wrapper";
import { fetchSourceFilesFromMetadata } from "../../common";
/**
* Handles publish metadata for a contract
@@ -47,6 +49,14 @@ export class ContractPublishedMetadata<TContract extends BaseContract> {
return this._cachedMetadata;
}
/**
* @public
*/
public async extractSources(): Promise<ContractSource[]> {
const publishedMetadata = await this.get();
return fetchSourceFilesFromMetadata(publishedMetadata, this.storage);
}
/**
* @public
*/
@@ -27,6 +27,7 @@ import { buildTransactionFunction } from "../../common/transactions";
import { isIncrementalVersion } from "../../common/version-checker";
import { getContractPublisherAddress } from "../../constants/addresses/getContractPublisherAddress";
import {
Abi,
AbiFunction,
AbiSchema,
ContractParam,
@@ -41,6 +42,7 @@ import {
PublishedContract,
PublishedContractFetched,
PublishedContractSchema,
PublishedMetadata,
} from "../../schema/contracts/custom";
import { SDKOptions } from "../../schema/sdk-options";
import { AddressOrEns } from "../../schema/shared/AddressOrEnsSchema";
@@ -137,10 +139,11 @@ export class ContractPublisher extends RPCConnectionHandler {
}
/**
* @internal
* @param address
*/
public async fetchCompilerMetadataFromAddress(address: AddressOrEns) {
public async fetchCompilerMetadataFromAddress(
address: AddressOrEns,
): Promise<PublishedMetadata> {
const resolvedAddress = await resolveAddress(address);
return fetchContractMetadataFromAddress(
resolvedAddress,
@@ -217,7 +220,7 @@ export class ContractPublisher extends RPCConnectionHandler {
}
/**
* @internal
* Fetch all sources for a contract from its address
* @param address
*/
public async fetchContractSourcesFromAddress(
@@ -230,6 +233,22 @@ export class ContractPublisher extends RPCConnectionHandler {
return await fetchSourceFilesFromMetadata(metadata, this.storage);
}
/**
* Fetch ABI from a contract, or undefined if not found
* @param address
*/
public async fetchContractAbiFromAddress(
address: AddressOrEns,
): Promise<Abi | undefined> {
const resolvedAddress = await resolveAddress(address);
const meta = await fetchContractMetadataFromAddress(
resolvedAddress,
this.getProvider(),
this.storage,
);
return meta.abi;
}
/**
* @internal
* @param profileMetadata
+19
View File
@@ -1,5 +1,24 @@
# @thirdweb-dev/unity-js-bridge
## 0.2.93
### Patch Changes
- Updated dependencies [[`137f46a5`](https://github.com/thirdweb-dev/js/commit/137f46a5470d2b5f9d7f9eda9b2d839a53ddeb64)]:
- @thirdweb-dev/chains@0.1.55
- @thirdweb-dev/sdk@4.0.6
- @thirdweb-dev/wallets@2.0.7
- @thirdweb-dev/auth@4.0.7
## 0.2.92
### Patch Changes
- Updated dependencies [[`07544252`](https://github.com/thirdweb-dev/js/commit/07544252b49163e1ae84ba2cc76b99597a1c4553)]:
- @thirdweb-dev/sdk@4.0.5
- @thirdweb-dev/wallets@2.0.6
- @thirdweb-dev/auth@4.0.6
## 0.2.91
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/unity-js-bridge",
"version": "0.2.91",
"version": "0.2.93",
"main": "dist/thirdweb-unity-bridge.js",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/unity-js-bridge",
"license": "Apache-2.0",
+15
View File
@@ -1,5 +1,20 @@
# @thirdweb-dev/wallets
## 2.0.7
### Patch Changes
- Updated dependencies [[`137f46a5`](https://github.com/thirdweb-dev/js/commit/137f46a5470d2b5f9d7f9eda9b2d839a53ddeb64)]:
- @thirdweb-dev/chains@0.1.55
- @thirdweb-dev/sdk@4.0.6
## 2.0.6
### Patch Changes
- Updated dependencies [[`07544252`](https://github.com/thirdweb-dev/js/commit/07544252b49163e1ae84ba2cc76b99597a1c4553)]:
- @thirdweb-dev/sdk@4.0.5
## 2.0.5
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/wallets",
"version": "2.0.5",
"version": "2.0.7",
"main": "dist/thirdweb-dev-wallets.cjs.js",
"module": "dist/thirdweb-dev-wallets.esm.js",
"types": "dist/thirdweb-dev-wallets.cjs.d.ts",