Closed jasperanders closed 11 months ago
@dzbo @Esanim any ideas about the issue?
From quick look I noticed this miss additional execute
wrapping before passing to KM contract.
Can you try with something like this:
const { keyManagerContract, universalProfileContract } = await getContracts(
profileAddress
); // helper function that returns the contracts, for reference, see below.
+const executeAbiPayload = universalProfileContract.methods
+ .execute(
+ 0, // operation type, CALL = 0, CREATE = 1
+ beneficiaryAddress,
+ '0x0',
+ abiPayload
+ )
+ .encodeABI()
- const result = await keyManagerContract.methods.execute(abiPayload).send({
+ const result = await keyManagerContract.methods.execute(executeAbiPayload).send({
from: allowedEOA,
gasLimit: 300_000,
});
return result;
Closing as stale and no activity. @jasperanders feel free to re-open if you are still experiencing the issue
Current Behavior
I am trying to restrict
SET_DATA
permissions to a specific address. This works fine when using a wallet address added to web3js with:const {address} = web3.eth.accounts.wallet.add(PRIVATE_KEY);
, when I try the same thing using the Metamask provider (const accounts = await window.ethereum.request({method: "eth_requestAccounts"});
), the transaction fails with an Error:Error encountered during contract execution [execution reverted]
See on testnet.Background
Below, you find the Code that I used to restrict the access:
Expected Behavior
It is expected, that it should also work using Metamask and a more descriptive error would be very helpful.
Thanks for the help Cheers