Works! @spalladino thanks for pointing that out! I guess the issue was with the contract itself instead of how i was setting up the scripts, or that it was mumbai.
Antoher roadblock I ran into was when I tried verifying the signature of my own UpgradeableProxy Contract function call. I am getting an invalid request yet again with this change. Do you think EIP712 struct is different from upgradeable contracts in @openzeppelin/upgradeable-contracts
package? Seems UpgradeableMinimalForwarder
also has the same domain separator MinimalForwarder
(https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/master/contracts/metatx/MinimalForwarderUpgradeable.sol). Is it even possible to use meta transactions for upgradeable contracts?
Heres my package.json
, where I just added @openzeppelin/upgradeable-contracts
:
{
"name": "workshop-meta-txs",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"local:start": "hardhat node",
"local:deploy": "hardhat run scripts/deploy.js --network local",
"local:sign": "hardhat run scripts/sign.js --network local",
"deploy": "hardhat run scripts/deploy.js --network mumbai",
"sign": "hardhat run scripts/sign.js --network mumbai",
"events": "hardhat run scripts/events.js --network mumbai",
"verify": "hardhat run scripts/verify.js --network mumbai",
"build": "rollup -c",
"invoke": "bash ./scripts/invoke.sh",
"upload": "yarn build && node scripts/upload.js",
"relay": "node scripts/relay.js",
"test": "NODE_ENV=test hardhat test"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.0.1",
"@nomiclabs/hardhat-waffle": "^2.0.1",
"@openzeppelin/contracts": "^4.4.1",
"@rollup/plugin-commonjs": "^17.1.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^11.1.1",
"builtin-modules": "^3.2.0",
"chai": "^4.3.0",
"chai-as-promised": "^7.1.1",
"create-react-app": "^4.0.2",
"defender-autotask-client": "^1.4.1",
"dotenv": "^8.2.0",
"ethereum-waffle": "^3.2.2",
"ethers": "^5.0.30",
"hardhat": "^2.0.8",
"rollup": "^2.38.5"
},
"dependencies": {
"@openzeppelin/contracts-upgradeable": "^4.4.1",
"defender-relay-client": "^1.3.1",
"eth-sig-util": "^3.0.1"
}
}
I also updated the branch master
in my repo for reproducing purposes. Thanks so much!