Closed rico-mercury closed 1 year ago
@rico-mercury can you share the contents of your package.json
file to see what versions you have
see below @bxpana
{
"name": "stratum-ethereum-contracts",
"version": "0.0.1",
"repository": "git@gitlab.com:tcam-engineering/on-chain/stratum.git",
"author": "Mercury Lab Dapp team",
"license": "MIT",
"files": [
"/contracts/**/*.sol",
"/build/contracts/*.json",
"!/contracts/mocks/**/*"
],
"engines": {
"node": ">=12"
},
"scripts": {
"clean": "hardhat clean && rimraf build contracts/build",
"test": "hardhat test",
"coverage": "env COVERAGE=true hardhat coverage",
"lint": "yarn run lint:js && yarn run lint:sol",
"lint:fix": "yarn run lint:js:fix && yarn run lint:sol:fix",
"lint:js": "eslint --ignore-path .gitignore .",
"lint:js:fix": "eslint --ignore-path .gitignore . --fix",
"lint:sol": "solhint 'contracts/**/*.sol' && prettier -c 'contracts/**/*.sol'",
"lint:sol:fix": "prettier --write \"contracts/**/*.sol\"",
"gas-report": "env ENABLE_GAS_REPORT=true yarn run test",
"slither": "yarn run clean && slither . --detect reentrancy-eth,reentrancy-no-eth,reentrancy-unlimited-gas",
"compile": "hardhat compile",
"deploy:goerli": "hardhat run deploy/deploy.js --network goerli",
"deployGov:goerli": "hardhat run deploy/bridge.js --network goerli"
},
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.1.1",
"@nomiclabs/hardhat-etherscan": "^3.1.0",
"@nomiclabs/hardhat-truffle5": "^2.0.6",
"@nomiclabs/hardhat-waffle": "^2.0.3",
"@nomiclabs/hardhat-web3": "^2.0.0",
"@openzeppelin/contracts": "^4.7.3",
"@openzeppelin/test-helpers": "^0.5.15",
"chai": "^4.3.6",
"dotenv": "^16.0.1",
"eslint": "^8.22.0",
"eslint-config-prettier": "^8.5.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-mocha-no-only": "^1.1.1",
"eslint-plugin-n": "^15.2.5",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.0.1",
"ethereum-waffle": "^3.4.4",
"ethers": "^5.7.0",
"hardhat": "^2.10.2",
"hardhat-deploy": "^0.11.12",
"hardhat-gas-reporter": "^1.0.8",
"husky": "^8.0.0",
"prettier": "^2.7.1",
"prettier-plugin-solidity": "^1.0.0-beta.24",
"solc": "^0.8.17",
"solhint": "^3.3.7",
"solidity-coverage": "^0.7.21"
},
"dependencies": {
"@matterlabs/zksync-contracts": "^0.3.3",
"@openzeppelin/contracts": "^4.7.3",
"dotenv": "^16.0.1",
"zksync-web3": "^0.9.0"
}
}
@rico-mercury thank you! I'll let you know if we have any other questions and let you know when we have an update for you
thanks @bxpana . and this is calling my L2 contract here:
https://zksync2-testnet.zkscan.io/address/0xAD32f5eDD744C2c376Be17006bFfae075191A9Bd/transactions
const {Provider} = require("zksync-web3");
const hre = require('hardhat');
async function main () {
// Hardhat always runs the compile task when running scripts with its command
// line interface.
//
// If this script is run directly using `node` you may want to call compile
// manually to make sure everything is compiled
// await hre.run('compile');
// We get the contract to deploy
// Getting the current address of the zkSync L1 bridge
const l2Provider = new Provider("https://zksync2-testnet.zksync.dev");
const zkSyncAddress = await l2Provider.getMainContractAddress();
// Getting the `Contract` object of the zkSync bridge
const bridgeContract = await hre.ethers.getContractFactory('VinoBridge');
const bridge = await bridgeContract.deploy(zkSyncAddress, "0xAD32f5eDD744C2c376Be17006bFfae075191A9Bd");
await bridge.deployed();
console.log('Vino NFT bridge deployed to:', bridge.address);
}
main()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
});
@rico-mercury thanks for your patience! It's been a busy few months for us, but wanted to check on this with all the updates we've done in that time. Are you still running into the original issue here?
Describe the issue I am trying to call a contract function on ZKSync 2 test net from Goerli network but I got following error
https://zksync2-testnet.zkscan.io/tx/0x685c213917dcd5e25d846d6f882f595344b5391d2e84fb4b96c18f96660a848b/logs
Expected behavior The contract function should be invoked successfully
Minimal Reproducible Example Code
My contract code from L1 to call L2
To Reproduce Steps to reproduce the behavior: It can be re-produced with my Goerli contract as follows
Goerli Network: 0x2730297173C54c32e66D6E9826A476CB4596Bfd8