🔗 Diamond Connector Tool — REAL cross-Diamond wiring ⚠️ MAINNET
Tool v1.0.0
⚠️ Wiring only — this tool never deploys anything.
It calls real onlyOwner setters on Diamonds you have already deployed
(with pay-diamond-deploy.html / aff-diamond-deploy.html / le-diamond-deploy.html
or by any other means — this tool doesn't care how). Paste the three Diamond
addresses below once they exist; every button stays usable forever, including
after any future single-Diamond redeploy — just reconnect with this tool alone.
Step 1 — Connect wallet, verify OWNER + network
Strict OWNER gate, same as every other tool in this project — if the
connected wallet isn't exactly OWNER, every write button stays disabled. Read-only
verify buttons work without a connected wallet too, but still need Arbitrum One's
public RPC — connect first for simplicity.
Step 2 — Diamond addresses
Enter whichever of the three Diamonds you have deployed so far. Saved to this
browser (localStorage key 'diamondConnectorV1') — no need to re-enter on your next visit.
Leave any blank that aren't deployed yet; buttons needing a missing address stay disabled.
Step 3 — Connections
One button per real connection call — not a combined action. Each reads the
addresses from Step 2, encodes the real call live via ethers.js (selector derived from the
real ABI, never hardcoded), and sends it via your wallet. A matching read-only "Verify" button
sits next to each write — call it any time (before or after wiring) to confirm what is
currently stored on-chain.
Payment ↔ Affiliate
Set Affiliate on Payment — calls PAY_DIAMOND.setAffiliateContract(AFF_DIAMOND)
Set Payment on Affiliate — calls AFF_DIAMOND.setPaymentContract(PAY_DIAMOND)
Payment ↔ Learn & Earn
Set Learn&Earn on Payment — calls PAY_DIAMOND.setLearnEarnContract(LE_DIAMOND)
Affiliate ↔ Learn & Earn
Set Affiliate on Learn&Earn — calls LE_DIAMOND.setAffiliateContract(AFF_DIAMOND)
Note: LearnAndEarn doesn't call into Affiliate in today's live v8.6.0 contracts — this
field/setter was added to LearnAndEarnAdminFacet.sol this session specifically so this
connector has something real to wire once a use for it exists. Wiring it now is harmless (it just
records an address) but has no functional effect yet.
Gaps checked, none found: every wiring field above (Payment's affiliateContract/
learnEarnContract, Affiliate's paymentContract, Learn&Earn's
affiliateContract) has both a real onlyOwner setter and a matching real
read-only getter in the corresponding ViewFacet — confirmed by reading
PaymentViewFacet.sol/AffiliateViewFacet.sol/LearnAndEarnViewFacet.sol
directly, not assumed. The only cross-Diamond-shaped setter NOT wired here is Payment's
setAffiliateCommWallet(address) — it configures a payout WALLET address, not a Diamond
address, so it's out of scope for a Diamond-to-Diamond connector.