-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mirror v0.13.0 release and prepare repo (#13)
* Remove .DS_Store file from repository * mirror v0.13.0 and prepare repo * Fix test action * use only node 18 * load secrets * add dependabot for hardhat-plugin
- Loading branch information
1 parent
e69b235
commit 2cffb39
Showing
30 changed files
with
1,291 additions
and
10,761 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
name: "\U0001F41E Bug report" | ||
about: Report a bug or problem | ||
labels: Bug | ||
--- | ||
|
||
# 🐞 Bug Report | ||
|
||
### Description | ||
|
||
<!-- ✍️--> A clear and concise description of the problem... | ||
|
||
<pre> | ||
<code> | ||
|
||
</code> | ||
</pre> | ||
|
||
### Has this worked before in a previous version? | ||
|
||
<!-- Did this behavior use to work in the previous version? --> | ||
Yes, the previous version in which this bug was not present was: | ||
|
||
<pre> | ||
<code> | ||
|
||
</code> | ||
</pre> | ||
|
||
## 🔬 Minimal Reproduction | ||
|
||
<!-- ✍️--> Please let us know how we can reproduce this issue. | ||
<pre> | ||
<code> | ||
|
||
</code> | ||
</pre> | ||
|
||
## 🔥 Error | ||
<!-- ✍️--> If the issue is accompanied by an error, please share the error logs with us below. If you have a lot of logs, place make a paste bin with your logs and share the link with us here: | ||
|
||
<pre><code> | ||
|
||
|
||
</code></pre> | ||
|
||
|
||
## 🌍 Your Environment | ||
|
||
**Operating System:** | ||
|
||
<pre> | ||
<code> | ||
|
||
</code> | ||
</pre> | ||
|
||
**Anything else relevant?** | ||
|
||
<pre> | ||
<code> | ||
|
||
</code> | ||
</pre> |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
name: "✨ Feature Request" | ||
about: Suggest a new feature or enhancement | ||
labels: Enhancement | ||
--- | ||
|
||
# ✨ Feature Request | ||
|
||
### Description | ||
|
||
<!-- ✍️--> A clear and concise description of the feature you would like to see... | ||
|
||
<pre> | ||
<code> | ||
|
||
</code> | ||
</pre> | ||
|
||
### Use Case | ||
|
||
<!-- ✍️--> Explain the context and how this feature will be used... | ||
|
||
<pre> | ||
<code> | ||
|
||
</code> | ||
</pre> |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
open-pull-requests-limit: 1 | ||
commit-message: | ||
prefix: "deps" | ||
labels: | ||
- "dependencies" | ||
ignore: | ||
- dependency-name: "*" # Ignore all dependencies except the one below | ||
allow: | ||
- dependency-name: "@nilfoundation/hardhat-plugin" |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Description | ||
|
||
Please provide a detailed description of what was done in this PR | ||
|
||
# Changes include | ||
|
||
- [ ] Bugfix (non-breaking change that solves an issue) | ||
- [ ] New feature (non-breaking change that adds functionality) | ||
|
||
### Manual tests | ||
|
||
Please complete this section if you ran manual tests for this functionality, otherwise delete it |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Format | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
format: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Run Format | ||
run: npm run format |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Lint | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Run Lint | ||
run: npm run lint |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Test | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Run Tests | ||
env: | ||
NIL_RPC_ENDPOINT: ${{ secrets.NIL_RPC_ENDPOINT }} | ||
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | ||
run: npm run tests |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.11; | ||
|
||
import "./nil/Nil.sol"; | ||
|
||
contract Await { | ||
using Nil for address; | ||
|
||
uint256 public result; | ||
|
||
function call(address dst) public{ | ||
bytes memory temp; | ||
bool ok; | ||
(temp, ok) = Nil.awaitCall( | ||
dst, | ||
abi.encodeWithSignature("getValue()") | ||
); | ||
|
||
require(ok == true, "Result not true"); | ||
|
||
result = abi.decode(temp, (uint256)); | ||
} | ||
} | ||
|
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.9; | ||
|
||
import "./nil/Nil.sol"; | ||
|
||
contract Caller { | ||
using Nil for address; | ||
|
||
function call(address dst) public { | ||
Nil.asyncCall( | ||
dst, | ||
msg.sender, | ||
msg.sender, | ||
100000, | ||
0, | ||
false, | ||
0, | ||
abi.encodeWithSignature("increment()") | ||
); | ||
} | ||
} | ||
|
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.9; | ||
|
||
import "./nil/NilCurrencyBase.sol"; | ||
|
||
contract Currency is NilCurrencyBase { | ||
constructor(uint256 initialSupply) { | ||
// Mint the initial supply of tokens | ||
mintCurrencyInternal(initialSupply); | ||
} | ||
|
||
// Public function to call the parent internal function sendCurrencyInternal | ||
function transferCurrency(address to, uint256 currencyId, uint256 amount) public { | ||
sendCurrencyInternal(to, currencyId, amount); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import "./nil/NilCurrencyBase.sol"; | ||
contract IncrementerPayable is NilCurrencyBase { | ||
uint256 private value; | ||
|
||
event ValueChanged(uint256 newValue); | ||
|
||
constructor() payable {} | ||
receive() external payable {} | ||
|
||
function increment() public onlyInternal payable{ | ||
value += 1; | ||
emit ValueChanged(value); | ||
} | ||
|
||
function getValue() public view returns (uint256) { | ||
return value; | ||
} | ||
} | ||
|
Oops, something went wrong.