Thanks for the sample example code (How to deploy minimal proxies using ProxyFactory in Truffle?), I was trying it on Buidler/waffle development platform.
I was getting some error message, and this message “ProxyFactory.sol:12: Contract ProxyFactory has a constructor” in stack trace is surprising me.
Am I making any error w.r.to compiler version or npm package dependency conflicit.
Code Repo
Complete Trace Log
✘ kanthasiva@tufmac1 ~/dscbox/sun/ws-020-blocks/ws-002-chainlink/sp007-ref-buid-gem/cl-chg-2020-agem master yarn run test
yarn run v1.22.4
$ yarn run test:contracts
$ cross-env SOLPP_FLAGS="FLAG_IS_TEST,FLAG_IS_DEBUG" buidler test --show-stack-traces
Compiling...
@openzeppelin/upgrades/contracts/upgradeability/ProxyFactory.sol:87:15: Warning: The "create2" instruction is only available for Constantinople-compatible VMs. You are currently compiling for "byzantium", where it will be interpreted as an invalid instruction.
addr := create2(0, add(code, 0x20), mload(code), salt)
^--------------------------------------------^
Compiled 17 contracts successfully
Token Test
1) "before all" hook for "1st Test"
0 passing (191ms)
1 failing
1) Token Test
"before all" hook for "1st Test":
Error: Contract `SimpleTokenFactory` is not upgrade safe
@openzeppelin/upgrades/contracts/upgradeability/ProxyFactory.sol:12: Contract `ProxyFactory` has a constructor
Define an initializer instead
https://zpl.in/upgrades/error-001
at Object.assertUpgradeSafe (node_modules/@openzeppelin/upgrades-core/src/validate.ts:160:11)
at Proxy.deployProxy (node_modules/@openzeppelin/buidler-upgrades/src/deploy-proxy.ts:33:5)
The example I created is to be deployed as a regular contract as ProxyFactory has a constructor. Which is why it doesn’t work when deployed as an upgradeable contract.
Good luck with the Chainlink Hackathon. It looks like you have a week left.
From your description, you want the upgradeable contract to hold the $LINK tokens that you need to use ChainLink with the ability to upgrade the logic in the implementation contract.
Hi @abcoathup, Thanks a lot. As a blockchain beginner, find it happy to see your inviting message for questions. Soon will get back with sample repo of my issue …