-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: rely on local npm installation (#171)
Showing
6 changed files
with
143 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,16 +127,14 @@ contract CommonTestBase is Test { | |
string memory beforePath = string(abi.encodePacked('./reports/', reportBefore, '.json')); | ||
string memory afterPath = string(abi.encodePacked('./reports/', reportAfter, '.json')); | ||
|
||
string[] memory inputs = new string[](9); | ||
string[] memory inputs = new string[](7); | ||
inputs[0] = 'npx'; | ||
inputs[1] = '--yes'; | ||
inputs[2] = '-s'; | ||
inputs[3] = '@bgd-labs/[email protected]'; | ||
inputs[4] = 'diff-snapshots'; | ||
inputs[5] = beforePath; | ||
inputs[6] = afterPath; | ||
inputs[7] = '-o'; | ||
inputs[8] = outPath; | ||
inputs[1] = '@bgd-labs/[email protected]'; | ||
inputs[2] = 'diff-snapshots'; | ||
inputs[3] = beforePath; | ||
inputs[4] = afterPath; | ||
inputs[5] = '-o'; | ||
inputs[6] = outPath; | ||
vm.ffi(inputs); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,17 +89,15 @@ library GovV3Helpers { | |
uint256 proposalId, | ||
address voter | ||
) internal returns (IVotingMachineWithProofs.VotingBalanceProof[] memory) { | ||
string[] memory inputs = new string[](10); | ||
string[] memory inputs = new string[](8); | ||
inputs[0] = 'npx'; | ||
inputs[1] = '--yes'; | ||
inputs[2] = '-s'; | ||
inputs[3] = '@bgd-labs/[email protected]'; | ||
inputs[4] = 'governance'; | ||
inputs[5] = 'getVotingProofs'; | ||
inputs[6] = '--proposalId'; | ||
inputs[7] = vm.toString(proposalId); | ||
inputs[8] = '--voter'; | ||
inputs[9] = vm.toString(voter); | ||
inputs[1] = '@bgd-labs/[email protected]'; | ||
inputs[2] = 'governance'; | ||
inputs[3] = 'getVotingProofs'; | ||
inputs[4] = '--proposalId'; | ||
inputs[5] = vm.toString(proposalId); | ||
inputs[6] = '--voter'; | ||
inputs[7] = vm.toString(voter); | ||
Vm.FfiResult memory f = vm.tryFfi(inputs); | ||
if (f.exitCode != 0) { | ||
console2.logString(string(f.stderr)); | ||
|
@@ -117,15 +115,13 @@ library GovV3Helpers { | |
Vm vm, | ||
uint256 proposalId | ||
) internal returns (StorageRootResponse[] memory) { | ||
string[] memory inputs = new string[](8); | ||
string[] memory inputs = new string[](6); | ||
inputs[0] = 'npx'; | ||
inputs[1] = '--yes'; | ||
inputs[2] = '-s'; | ||
inputs[3] = '@bgd-labs/[email protected]'; | ||
inputs[4] = 'governance'; | ||
inputs[5] = 'getStorageRoots'; | ||
inputs[6] = '--proposalId'; | ||
inputs[7] = vm.toString(proposalId); | ||
inputs[1] = '@bgd-labs/[email protected]'; | ||
inputs[2] = 'governance'; | ||
inputs[3] = 'getStorageRoots'; | ||
inputs[4] = '--proposalId'; | ||
inputs[5] = vm.toString(proposalId); | ||
Vm.FfiResult memory f = vm.tryFfi(inputs); | ||
if (f.exitCode != 0) { | ||
console2.logString(string(f.stderr)); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,15 +7,13 @@ library IpfsUtils { | |
error FfiFailed(); | ||
|
||
function ipfsHashFile(Vm vm, string memory filePath, bool upload) internal returns (bytes32) { | ||
string[] memory inputs = new string[](7); | ||
string[] memory inputs = new string[](5); | ||
inputs[0] = 'npx'; | ||
inputs[1] = '--yes'; | ||
inputs[2] = '-s'; | ||
inputs[3] = '@bgd-labs/[email protected]'; | ||
inputs[4] = 'ipfs'; | ||
inputs[5] = filePath; | ||
inputs[1] = '@bgd-labs/[email protected]'; | ||
inputs[2] = 'ipfs'; | ||
inputs[3] = filePath; | ||
if (upload) { | ||
inputs[6] = '-u'; | ||
inputs[4] = '-u'; | ||
} | ||
Vm.FfiResult memory f = vm.tryFfi(inputs); | ||
if (f.exitCode != 0) { | ||
|
Oops, something went wrong.