Hi guys,
Trying to deploy a contract via openzeppelin create
i get:
> Artifacts written to /Users/raul/Development/gitrepos/EthicHub/platform-contracts/build/contracts
> Compiled successfully using:
- solc: 0.5.13+commit.5b0b510c.Emscripten.clang
? Pick a contract to instantiate EthicHubDepositManager
? Pick a network kovan
Error while validating contract EthicHubDepositManager: Error: Cannot find source data for contract Context (base contract of EthicHubDepositManager). This often happens because either:
- An incremental compilation step went wrong. Clear your build folder and recompile.
- There is more than one contract named Context in your project (including dependencies). Make sure all contracts have a unique name, and that you are not importing dependencies with duplicated contract names (for example, openzeppelin-eth and openzeppelin-solidity).
âś“ Linked dependency @openzeppelin/contracts-ethereum-package 2.3.0
âś“ Contract EthicHubDepositManager deployed
All contracts have been deployed
No AST nodes of type ContractDefinition with id 6122 found.
So it actually deploys a contract to kovan, but does not prompt for initialize function (which we need). This would be less fun in mainnet, since it would spend some Eth.
I tried deleting build folder, even .openzeppelin/kovan.json, same thing happens.
The contract is a GSNRecipient, which I guess is where the Context thing comes
pragma solidity 0.5.13;
import "@openzeppelin/upgrades/contracts/Initializable.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/GSN/GSNRecipient.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/ownership/Ownable.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/IERC20.sol";
import "../interfaces/IContributionTarget.sol";
import "../storage/EthicHubStorageInterface.sol";
contract EthicHubDepositManager is Initializable, Ownable, GSNRecipient {
Afterwards, since I noted there is an entry with a contract and an address in .openzeppelin/kovan.json
{
“contracts”: {
“EthicHubDepositManager”: {
“address”: “0xD2e9036f4367416958E621bdF96be41C8ef38178”,
“constructorCode”: “60806040526116df806100136000396000f3fe”,
“bodyBytecodeHash”: “d1fca208461a31df0ad1c1508fc820a60c010334f571a8391017eea94aca6f46”,
“localBytecodeHash”: “5051b1f479e5f5255d1a0ca992f0a8fe9878876929dfcadad7b71507ca4a39a2”,
“deployedBytecodeHash”: “5051b1f479e5f5255d1a0ca992f0a8fe9878876929dfcadad7b71507ca4a39a2”,
“types”: null,
“storage”: null
}
},
“solidityLibs”: {},
“proxies”: {},
“manifestVersion”: “2.2”,
“version”: “0.1.7”,
“dependencies”: {
“@openzeppelin/contracts-ethereum-package”: {
“package”: “0xB6F8F11b166D526932ee04ffe4D25B810f619E34”,
“version”: “2.3.0”
}
}
}
I tried to use send-tx to call initialize:
âžś platform-contracts git:(test/upgradeability) openzeppelin send-tx
? Pick a network kovan
A contract address must be specified.
Ok, no helpful prompts this time?
Tried with arguments:
âžś platform-contracts git:(test/upgradeability) openzeppelin send-tx --to 0xD2e9036f4367416958E621bdF96be41C8ef38178 --method initialize --args 0x33...,0x022.. -n kovan
Proxy at address 0xD2e9036f4367416958E621bdF96be41C8ef38178 not found.
Which I guess makes sense because the proxy object is empty in kovan.json
Project in:
Any ideas on what is happening?
Thanks in advance!
PS: quick feedback, earlier when trying to deploy it failed silently after picking network in the create prompt. Turns out my dumb ass was using an incorrect Infura URL, but adding a “Network Error” message or similar in the cli would help.