Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
Moved contract wrapper abi tests into abi-gen package
Browse files Browse the repository at this point in the history
  • Loading branch information
hysz committed Jul 31, 2019
1 parent 35c3455 commit a5f7152
Show file tree
Hide file tree
Showing 15 changed files with 257 additions and 14 deletions.
5 changes: 0 additions & 5 deletions contracts/utils/CHANGELOG.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
{
"note": "Added tests for decoding log arguments when artifact dependencies are included/excluded.",
"pr": 1995
},

{
"note": "Added tests for`getABIDecodedTransactionData` and `getABIDecodedReturnData` in contract wrappers.",
"pr": 2018
}
]
},
Expand Down
1 change: 0 additions & 1 deletion contracts/utils/compiler.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"src/ReentrancyGuard.sol",
"src/SafeMath.sol",
"src/interfaces/IOwnable.sol",
"test/TestAbi.sol",
"test/TestConstants.sol",
"test/TestLibAddressArray.sol",
"test/TestLibBytes.sol",
Expand Down
2 changes: 1 addition & 1 deletion contracts/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
},
"config": {
"abis": "./generated-artifacts/@(Address|IOwnable|LibBytes|Ownable|ReentrancyGuard|SafeMath|TestAbi|TestConstants|TestLibAddressArray|TestLibBytes|TestLogDecoding|TestLogDecodingDownstream).json",
"abis": "./generated-artifacts/@(Address|IOwnable|LibBytes|Ownable|ReentrancyGuard|SafeMath|TestConstants|TestLibAddressArray|TestLibBytes|TestLogDecoding|TestLogDecodingDownstream).json",
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
},
"repository": {
Expand Down
2 changes: 0 additions & 2 deletions contracts/utils/src/artifacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import * as LibBytes from '../generated-artifacts/LibBytes.json';
import * as Ownable from '../generated-artifacts/Ownable.json';
import * as ReentrancyGuard from '../generated-artifacts/ReentrancyGuard.json';
import * as SafeMath from '../generated-artifacts/SafeMath.json';
import * as TestAbi from '../generated-artifacts/TestAbi.json';
import * as TestConstants from '../generated-artifacts/TestConstants.json';
import * as TestLibAddressArray from '../generated-artifacts/TestLibAddressArray.json';
import * as TestLibBytes from '../generated-artifacts/TestLibBytes.json';
Expand All @@ -29,5 +28,4 @@ export const artifacts = {
TestLibBytes: TestLibBytes as ContractArtifact,
TestLogDecoding: TestLogDecoding as ContractArtifact,
TestLogDecodingDownstream: TestLogDecodingDownstream as ContractArtifact,
TestAbi: TestAbi as ContractArtifact,
};
1 change: 0 additions & 1 deletion contracts/utils/src/wrappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export * from '../generated-wrappers/lib_bytes';
export * from '../generated-wrappers/ownable';
export * from '../generated-wrappers/reentrancy_guard';
export * from '../generated-wrappers/safe_math';
export * from '../generated-wrappers/test_abi';
export * from '../generated-wrappers/test_constants';
export * from '../generated-wrappers/test_lib_address_array';
export * from '../generated-wrappers/test_lib_bytes';
Expand Down
1 change: 0 additions & 1 deletion contracts/utils/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"generated-artifacts/Ownable.json",
"generated-artifacts/ReentrancyGuard.json",
"generated-artifacts/SafeMath.json",
"generated-artifacts/TestAbi.json",
"generated-artifacts/TestConstants.json",
"generated-artifacts/TestLibAddressArray.json",
"generated-artifacts/TestLibBytes.json",
Expand Down
4 changes: 4 additions & 0 deletions packages/abi-gen/CHANGELOG.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
{
"note": "Updated expected typescript output for cli tests to include `getABIDecodedTransactionData` and `getABIDecodedReturnData`",
"pr": 2018
},
{
"note": "Added tests for`getABIDecodedTransactionData` and `getABIDecodedReturnData` in contract wrappers.",
"pr": 2018
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion packages/abi-gen/compiler.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
}
}
},
"contracts": ["AbiGenDummy.sol", "LibDummy.sol", "TestLibDummy.sol"]
"contracts": ["AbiGenDummy.sol", "LibDummy.sol", "TestLibDummy.sol", "TestAbi.sol"]
}
2 changes: 1 addition & 1 deletion packages/abi-gen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"contracts:gen": "contracts-gen"
},
"config": {
"abis": "./test-cli/fixtures/artifacts/@(AbiGenDummy|LibDummy|TestLibDummy).json",
"abis": "./test-cli/fixtures/artifacts/@(AbiGenDummy|LibDummy|TestLibDummy|TestAbi).json",
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
},
"bin": {
Expand Down
245 changes: 245 additions & 0 deletions packages/abi-gen/test-cli/fixtures/artifacts/TestAbi.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions packages/abi-gen/test-cli/test_typescript/src/artifacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ import { ContractArtifact } from 'ethereum-types';
import * as AbiGenDummy from '../../fixtures/artifacts/AbiGenDummy.json';
import * as LibDummy from '../../fixtures/artifacts/LibDummy.json';
import * as TestLibDummy from '../../fixtures/artifacts/TestLibDummy.json';
import * as TestAbi from '../../fixtures/artifacts/TestAbi.json';
export const artifacts = {
AbiGenDummy: AbiGenDummy as ContractArtifact,
LibDummy: LibDummy as ContractArtifact,
TestLibDummy: TestLibDummy as ContractArtifact,
TestAbi: TestAbi as ContractArtifact,
};
1 change: 1 addition & 0 deletions packages/abi-gen/test-cli/test_typescript/src/wrappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
export * from '../../output/typescript/abi_gen_dummy';
export * from '../../output/typescript/lib_dummy';
export * from '../../output/typescript/test_lib_dummy';
export * from '../../output/typescript/test_abi';
File renamed without changes.
3 changes: 2 additions & 1 deletion packages/abi-gen/test-cli/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"files": [
"./fixtures/artifacts/AbiGenDummy.json",
"./fixtures/artifacts/LibDummy.json",
"./fixtures/artifacts/TestLibDummy.json"
"./fixtures/artifacts/TestLibDummy.json",
"./fixtures/artifacts/TestAbi.json"
],
"include": ["./output/typescript/**/*", "./test_typescript/**/*"]
}

0 comments on commit a5f7152

Please sign in to comment.