Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Init project #1

Merged
merged 11 commits into from
Mar 12, 2024
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
13 changes: 11 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
node_modules
.env

# Hardhat files
cache
artifacts
/cache
/artifacts

# TypeChain files
/typechain
/typechain-types

# solidity-coverage files
/coverage
/coverage.json
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
23 changes: 23 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"printWidth": 100,
"singleQuote": true,
"tabWidth": 4,
"trailingComma": "all",
"endOfLine": "auto",
"plugins": [
"prettier-plugin-organize-imports",
"prettier-plugin-solidity"
],
"pluginsComments": {
"prettier-plugin-organize-import": "Supports .ts files (not .sol)",
"prettier-plugin-solidity": "Does not support imports sorting yet. See prettier-solidity/prettier-plugin-solidity#918"
},
"overrides": [
{
"files": "*.sol",
"options": {
"singleQuote": false
}
}
]
}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Changelog

## vNEXT
- Init project. (#1)
18 changes: 16 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
stage('Init') {
echo 'Initializing'
// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH <[email protected]>
// SPDX-License-Identifier: Apache-2.0

node {
stage('Clone') {
checkoutInfo = checkout(scm)
echo "git checkout: ${checkoutInfo}"
}
docker.image('node:20-alpine').inside {
stage('Init') {
sh 'npm ci'
}
stage('Test') {
sh 'npm run test'
}
}
}
14 changes: 14 additions & 0 deletions contracts/VoucherHub.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH <[email protected]>
// SPDX-License-Identifier: Apache-2.0

pragma solidity ^0.8.20;

contract VoucherHub {
event VoucherCreated();

constructor() {}

function createVoucher() public {
emit VoucherCreated();
}
}
11 changes: 11 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH <[email protected]>
// SPDX-License-Identifier: Apache-2.0

import '@nomicfoundation/hardhat-toolbox';
import { HardhatUserConfig } from 'hardhat/config';

const config: HardhatUserConfig = {
solidity: '0.8.24',
};

export default config;
Loading