I changed the sample.sol and use truffle compile and use normal truffle test with artifacts. Not sure if it is a hack or the correct way but it works…
const token = artifacts.require('Test.sol');
pragma solidity ^0.5.0;
import "../node_modules/@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/StandaloneERC20.sol";
contract Test is StandaloneERC20 {
function greet() public pure returns (string memory) {
return "A Test";
}
}
Now I want to upgrade the function greet in a separate testUpgrade.js file but I have no idea where to start… any help?