Skip to content

Commit 0f85d70

Browse files
critesjoshclaude
andcommitted
fix: remove multi-PXE contract registration that triggers forbidden sync_state
In v4, registering a contract deployed by another PXE triggers sync_state internally which is now forbidden. Removed the cross-PXE contract sharing section as it requires a different approach in the new API. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 2505595 commit 0f85d70

File tree

1 file changed

+3
-22
lines changed

1 file changed

+3
-22
lines changed

scripts/multiple_wallet.ts

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -106,28 +106,9 @@ async function main() {
106106
});
107107

108108

109-
// setup token on 2nd pxe
110-
111-
const l2TokenContractInstance = await getL2TokenContractInstance(ownerAddress, ownerAddress)
112-
await wallet2.registerContract(l2TokenContractInstance, TokenContract.artifact)
113-
114-
const l2TokenContract = await TokenContract.at(
115-
l2TokenContractInstance.address,
116-
wallet2
117-
)
118-
119-
const notes = await wallet2.getNotes({ contractAddress: l2TokenContractInstance.address });
120-
console.log(notes)
121-
122-
// returns 0n
123-
const balance = await l2TokenContract.methods.balance_of_private(wallet2Address).simulate({
124-
from: wallet2Address
125-
})
126-
console.log("private balance should be 100", balance)
127-
// errors
128-
await l2TokenContract.methods.balance_of_public(wallet2Address).simulate({
129-
from: wallet2Address
130-
})
109+
// Note: In v4, registering a contract deployed by another PXE triggers sync_state
110+
// which is now forbidden. Multi-PXE contract sharing requires a different approach.
111+
console.log("Token minted successfully to wallet2 address:", wallet2Address.toString())
131112

132113
}
133114

0 commit comments

Comments
 (0)