Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Build
run: npm run build
- name: Check storage layout
run: npm run test-storage-layout
run: npm run check-storage-layout
- name: Test deployment
run: npm run deploy
- name: Test Timelock deployment
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- [x] `IexecPoco2Delegate.sol`

### Features
- Housekeeping (#207, )
- Add Halborn "Poco v5.5 & Voucher v1.0" audit report (#205)
- Refactor Factory deployer (#206)
- Enable native tests on CI (#204)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ PoCo smart contracts come with a test suite in the `./test` folder. You can star

```
npm install
npm run autotest
npm run test
```

Additionally, you can produce a coverage report using the following command:
Expand All @@ -108,7 +108,7 @@ The automatic testing command uses the Hardhat network by default to run the tes
```
- Or run any other blockchain client.
2. **[Optional]** Update the configuration

If your blockchain listen to a port that is not 8545, or if the blockchain is on a different node, update the `hardhat.config.ts` configuration (network ports, accounts with mnemonic, ..) accordingly to the [Hardhat Configuration](https://hardhat.org/hardhat-runner/docs/config) documentation.
3. Run tests
```
Expand Down
16 changes: 0 additions & 16 deletions checkCopyright.sh

This file was deleted.

9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@
"build": "npx hardhat compile",
"deploy": "npx hardhat deploy",
"deploy:timelock": "hardhat run scripts/deploy-timelock.ts",
"test-storage-layout": "npx hardhat run scripts/test-storage.ts",
"check-storage-layout": "npx hardhat run scripts/check-storage.ts",
"test": "REPORT_GAS=true npx hardhat test",
"test:native": "TEST__IS_NATIVE_CHAIN=true npx hardhat test test/byContract/IexecEscrow/IexecEscrowNative.test.ts",
"autotest": "./test.sh",
"coverage": "npx hardhat coverage",
"verify": "npx hardhat verify",
"format": "npx prettier --write",
"uml": "npm run sol-to-uml && npm run puml-to-links && npm run storage-to-diagrams",
"sol-to-uml": "npx zx tools/sol-to-uml.mjs",
"puml-to-links": "npx zx tools/puml-to-links.mjs",
"storage-to-diagrams": "npx zx tools/storage-to-diagrams.mjs",
"sol-to-uml": "npx zx scripts/tools/sol-to-uml.mjs",
"puml-to-links": "npx zx scripts/tools/puml-to-links.mjs",
"storage-to-diagrams": "npx zx scripts/tools/storage-to-diagrams.mjs",
"doc": "npx hardhat docgen"
},
"lint-staged": {
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions tools/puml-to-links.mjs → scripts/tools/puml-to-links.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
// TODO: Add this script to pre-commit hook in order to keep up-to-date links

// Render .puml files (referenced in markdown comments) to web links
// Usage: "npm run puml2links" or "npx zx tools/puml-to-links.mjs"
// Usage: "npm run puml2links" or "npx zx scripts/tools/puml-to-links.mjs"
// Note:
// Using server-side rendering with `puml-for-markdown` since `node-plantuml``
// Using server-side rendering with `puml-for-markdown` since `node-plantuml``
// requires Java on host. See https://github.com/danielyaa5/puml-for-markdown
// Note:
// To ensure freshness of a parent diagram, it might be necessary to
// To ensure freshness of a parent diagram, it might be necessary to
// remove everything before <!--![ABC](./abc.puml)--> from
// [![ABC](https://tinyurl.com/abcdef)](https://tinyurl.com/abcdef)<!--![ABC](./abc.puml)-->
// in order to force recreation of this parent diagram made of updated and
// in order to force recreation of this parent diagram made of updated and
// included child diagrams.


Expand Down
10 changes: 5 additions & 5 deletions tools/sol-to-uml.mjs → scripts/tools/sol-to-uml.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env zx

// Usage: "npm run sol-to-uml" or "npx zx tools/solidity-to-uml.mjs"
// Usage: "npm run sol-to-uml" or "npx zx scripts/tools/solidity-to-uml.mjs"
// For sol2uml documentation, see https://github.com/naddison36/sol2uml#usage


Expand Down Expand Up @@ -37,7 +37,7 @@ await generateClassDiagramOfContracts(

/**
* Generate UML class diagrams for contracts in a given directory.
* @param directory
* @param directory
*/
async function generateClassDiagramOfDirectory(directory) {
console.log(`Generating class diagram for directory : ${directory}`);
Expand All @@ -48,13 +48,13 @@ async function generateClassDiagramOfDirectory(directory) {

/**
* Generate UML class diagrams for a set of given contracts.
* @param contractsList
* @param diagramName
* @param contractsList
* @param diagramName
*/
async function generateClassDiagramOfContracts(contractsList, diagramName) {
console.log(`Generating class diagram for contracts : ${contractsList}`);
const baseContracts = contractsList.join(','); // => c1,c2,c3
// -b, --baseContractNames <name1,name2>
// -b, --baseContractNames <name1,name2>
// only output contracts connected to these comma separated base contract names
await $`cd ${projectRootDir}/ &&
npx sol2uml class contracts/ -b ${baseContracts} -o docs/uml/class-uml-${diagramName}.svg`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env zx

// Usage: "npm run storage-to-diagrams" or "npx zx tools/storage-to-diagrams"
// Usage: "npm run storage-to-diagrams" or "npx zx scripts/tools/storage-to-diagrams"
// Check sol2uml documentation at https://github.com/naddison36/sol2uml#storage-usage.


Expand All @@ -11,10 +11,10 @@ generateStorageDiagram('IexecPocoBoostDelegate')

/**
* Generate storage diagram of a given contract.
* @param contractName
* @param contractName
*/
async function generateStorageDiagram(contractName) {
console.log(`Generating storage diagram for contract : ${contractName}`);
await $`cd ${projectRootDir} &&
await $`cd ${projectRootDir} &&
npx sol2uml storage -c ${contractName} -o docs/uml/storage-${contractName}.svg .`
}
26 changes: 0 additions & 26 deletions test.sh

This file was deleted.

Loading