Sync workspace: config, docs, scripts, CI, operator rules, and submodule pointers.

- Update dbis_core, cross-chain-pmm-lps, explorer-monorepo, metamask-integration, pr-workspace/chains
- Omit embedded publish git dirs and empty placeholders from index

Made-with: Cursor
This commit is contained in:
defiQUG
2026-04-12 06:12:20 -07:00
parent 6fb6bd3993
commit dbd517b279
2935 changed files with 327972 additions and 5533 deletions

View File

@@ -0,0 +1,21 @@
#!/usr/bin/env bash
# CREATE2 smoke test on VMID 2103 (Chain 138): factory + probe, predicted vs deployed.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
HARNESS_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
PROJECT_ROOT="$(cd "$HARNESS_ROOT/.." && pwd)"
# shellcheck disable=SC1090
source "$PROJECT_ROOT/scripts/lib/load-project-env.sh"
cd "$HARNESS_ROOT"
RPC="$(bash scripts/rpc-url-2103.sh)"
if [[ -z "${PRIVATE_KEY:-}" ]]; then
echo "PRIVATE_KEY not set after load-project-env.sh" >&2
exit 2
fi
exec forge script script/Create2DeployTest.s.sol:Create2DeployTest \
--rpc-url "$RPC" \
--broadcast \
--legacy \
--with-gas-price 1000000000 \
--private-key "$PRIVATE_KEY" \
-vvv "$@"

View File

@@ -0,0 +1,21 @@
#!/usr/bin/env bash
# Broadcast Thirdweb core infra using repo dotenv (PRIVATE_KEY from smom-dbis-138/.env or secure-secrets).
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
HARNESS_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
PROJECT_ROOT="$(cd "$HARNESS_ROOT/.." && pwd)"
# shellcheck disable=SC1090
source "$PROJECT_ROOT/scripts/lib/load-project-env.sh"
cd "$HARNESS_ROOT"
RPC="$(bash scripts/rpc-url-2103.sh)"
if [[ -z "${PRIVATE_KEY:-}" ]]; then
echo "PRIVATE_KEY not set after load-project-env.sh" >&2
exit 2
fi
exec forge script script/DeployThirdwebCore.s.sol:DeployThirdwebCore \
--rpc-url "$RPC" \
--broadcast \
--legacy \
--with-gas-price 1000000000 \
--private-key "$PRIVATE_KEY" \
-vvv "$@"

View File

@@ -0,0 +1,11 @@
#!/usr/bin/env bash
# Hardhat deploy using repo dotenv (same RPC normalization as Foundry path).
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
HARNESS_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
PROJECT_ROOT="$(cd "$HARNESS_ROOT/.." && pwd)"
# shellcheck disable=SC1090
source "$PROJECT_ROOT/scripts/lib/load-project-env.sh"
export RPC_THIRDWEB_ADMIN_CORE
cd "$HARNESS_ROOT"
exec npx hardhat run scripts/deploy-thirdweb-core-hardhat.cjs --network chain138ThirdwebCore "$@"

View File

@@ -0,0 +1,100 @@
/**
* Deploy Thirdweb infra on Chain 138 using bytecode/ABI from `forge build` (avoids Hardhat compiling
* Thirdweb's duplicate `library Address` from OZ vs thirdweb/lib).
*/
require("dotenv").config();
const fs = require("fs");
const path = require("path");
const hre = require("hardhat");
function findForgeArtifact(contractName) {
const outDir = path.join(__dirname, "..", "out");
const matches = [];
function walk(dir) {
if (!fs.existsSync(dir)) return;
for (const ent of fs.readdirSync(dir, { withFileTypes: true })) {
const p = path.join(dir, ent.name);
if (ent.isDirectory()) walk(p);
else if (ent.name === `${contractName}.json`) matches.push(p);
}
}
walk(outDir);
if (matches.length === 0) {
throw new Error(
`No forge artifact for ${contractName} under out/. Run: cd thirdweb-core-2103-test && forge build`
);
}
if (matches.length > 1) {
throw new Error(`Multiple ${contractName}.json artifacts: ${matches.join(", ")}`);
}
const raw = fs.readFileSync(matches[0], "utf8");
return JSON.parse(raw);
}
async function main() {
const signers = await hre.ethers.getSigners();
if (signers.length === 0) {
throw new Error(
"No signer: set PRIVATE_KEY (32-byte hex) in .env for chain138ThirdwebCore."
);
}
const deployer = signers[0];
console.log("Deployer", deployer.address);
const gasPrice = 1_000_000_000n;
const opts = { gasPrice };
const ForwarderArt = findForgeArtifact("Forwarder");
const TWRegistryArt = findForgeArtifact("TWRegistry");
const TWFactoryArt = findForgeArtifact("TWFactory");
const ContractPublisherArt = findForgeArtifact("ContractPublisher");
const Forwarder = new hre.ethers.ContractFactory(
ForwarderArt.abi,
ForwarderArt.bytecode.object,
deployer
);
const forwarder = await Forwarder.deploy(opts);
await forwarder.waitForDeployment();
const forwarderAddr = await forwarder.getAddress();
console.log("Forwarder", forwarderAddr);
const TWRegistry = new hre.ethers.ContractFactory(
TWRegistryArt.abi,
TWRegistryArt.bytecode.object,
deployer
);
const registry = await TWRegistry.deploy(forwarderAddr, opts);
await registry.waitForDeployment();
const registryAddr = await registry.getAddress();
console.log("TWRegistry", registryAddr);
const TWFactory = new hre.ethers.ContractFactory(
TWFactoryArt.abi,
TWFactoryArt.bytecode.object,
deployer
);
const factory = await TWFactory.deploy(forwarderAddr, registryAddr, opts);
await factory.waitForDeployment();
console.log("TWFactory", await factory.getAddress());
const ContractPublisher = new hre.ethers.ContractFactory(
ContractPublisherArt.abi,
ContractPublisherArt.bytecode.object,
deployer
);
const publisher = await ContractPublisher.deploy(
deployer.address,
forwarderAddr,
hre.ethers.ZeroAddress,
opts
);
await publisher.waitForDeployment();
console.log("ContractPublisher", await publisher.getAddress());
}
main().catch((e) => {
console.error(e);
process.exit(1);
});

View File

@@ -0,0 +1,31 @@
#!/usr/bin/env bash
# Print JSON-RPC URL for VMID 2103 (besu-rpc-core-thirdweb).
#
# Default: NPM HTTPS FQDN (E2E verified: eth_chainId 0x8a, forge script dry-run OK).
# LAN direct: set RPC_THIRDWEB_ADMIN_LAN_ONLY=1 or pass a full URL via RPC_URL_2103.
#
# Precedence: RPC_URL_2103 → RPC_TW_CORE_HTTP → RPC_THIRDWEB_ADMIN_CORE (if already http(s) URL)
# → if RPC_THIRDWEB_ADMIN_LAN_ONLY=1 then http://<RPC_THIRDWEB_ADMIN_CORE or 192.168.11.217>:8545
# → else https://rpc.tw-core.d-bis.org
set -euo pipefail
if [[ -n "${RPC_URL_2103:-}" ]]; then
printf '%s\n' "$RPC_URL_2103"
exit 0
fi
if [[ -n "${RPC_TW_CORE_HTTP:-}" ]]; then
printf '%s\n' "$RPC_TW_CORE_HTTP"
exit 0
fi
raw="${RPC_THIRDWEB_ADMIN_CORE:-}"
if [[ "$raw" =~ ^https?:// ]]; then
printf '%s\n' "$raw"
exit 0
fi
if [[ "${RPC_THIRDWEB_ADMIN_LAN_ONLY:-}" == "1" || "${RPC_THIRDWEB_ADMIN_LAN_ONLY:-}" == "true" ]]; then
host="${raw:-192.168.11.217}"
host="${host#http://}"
host="${host#https://}"
printf 'http://%s:8545\n' "$host"
exit 0
fi
printf '%s\n' "https://rpc.tw-core.d-bis.org"