Importing Interfaces breaks deployProxy
See original GitHub issueUpdated the Box contract used on https://docs.openzeppelin.com/upgrades-plugins/1.x/truffle-upgrades
Importing a simple interface.
Makes the migrate command to throw the following contract
Error: The requested contract was not found. Make sure the source code is available for compilation
When an interface is imported, checkForImportIdConsistency
removes a contract from the input
, output
validated.
.
@openzeppelin/truffle-upgrades/dist/validate.js
// contracts/Box.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
import "contracts/Itest.sol";
contract Box {
uint256 private value;
// Emitted when the stored value changes
event ValueChanged(uint256 newValue);
// Stores a new value in the contract
function store(uint256 newValue) public {
value = newValue;
emit ValueChanged(newValue);
}
// Reads the last stored value
function retrieve() public view returns (uint256) {
return value;
}
function testing() public pure returns(bool) {
return false;
}
function test() public view returns (bool) {
Itest temp = Itest(address(this));
return temp.testing();
}
}
Oddly enough putting an inline interface presents works fine.
Issue Analytics
- State:
- Created 3 years ago
- Comments:19 (8 by maintainers)
Top Results From Across the Web
deployProxy() using `truffle migrate --reset` errors with ...
But with deployProxy() when I run truffle migrate --reset` I get the following error: `Error: ... Importing Interfaces breaks deployProxy.
Read more >OZ-Upgrades Plugins - Solidity Libraries - HackMD
If a contract contains external linked libraries, the deployment breaks due to the plugin not identifying a previously validated version of that contract ......
Read more >Upgrading Smart Contracts - Should You Do it and How?
As you can see, deployProxy does three things: ... SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <0.9.0; import ...
Read more >Deploy API proxies using the API | Apigee Edge
The deploy tool provides support for packaging and importing API proxies ... This can break other plugins and wrappers that make use of...
Read more >Renovate Bot Package Diff
import { ValidationOptions } from ' @openzeppelin/upgrades-core ';. 3. + import { DeployOptions } from ' ./utils ';. 4. 4. export interface ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi I’m using @openzeppelin/truffle-upgrades ^1.7.0 and my Computer is macbook air(m1, 2020), macOs BigSur.
I’m using truffle version of v5.3.6 and before using @openzeppelin/truffle-upgrades, it compiled and migrated well. However, when I tried to deploy my contract with deployProxy which is provided by @openzeppelin/truffle-upgrades packages, I encountered with the error like below
The error occured for the contracts that import other contract like below
Thank you for reading 👍
Thanks. I just tryied to reproduce on a new ubuntu vm and couldn’t reproduce the issue. Seems to be some kind of local issue I haven’t figured out yet.