Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gretzke committed Nov 4, 2023
1 parent 68d1a29 commit cb433f2
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 31 deletions.
16 changes: 9 additions & 7 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Description

Please include a summary of the change and which issue is fixed. Also, include relevant motivation and context. List any dependencies that are required for this change.
Please include a summary of the change and which feature was implemented or which issue was fixed. Also, include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Expand All @@ -15,24 +15,26 @@ Please describe the tests that you ran to verify your changes. Provide instructi
Before deployment

- [ ] 100% test and branch coverage
- [ ] fuzz and invariant tests when applicable
- [ ] deployment or update scripts ready
- [ ] fuzz and invariant tests (when applicable)
- [ ] formal verification (when applicable)
- [ ] deployment or upgrade scripts ready
- [ ] version management agreed upon and implemented
- [ ] documentation of work in Jira or Notion
- [ ] internal team review
- [ ] **Security Team review**

After deployment

- [ ] Update [static](https://github.com/maticnetwork/static/tree/master/network) with new contract address and/or version
- [ ] create release if necessary
- [ ] transfer ownership after deployments (when applicable)
- [ ] complete upgrade (when applicable)
- [ ] generate deployment/upgrade log files
- [ ] update [static](https://github.com/maticnetwork/static/tree/master/network) with new contract address and/or version

---

### Considerations

- I have followed the [contributing guidelines](../CONTRIBUTING.md).
- My code follows the style guidelines of this project and I have run `lint` to ensure the code style is valid
- My code follows the style guidelines of this project and I have run `forge fmt` and prettier to ensure the code style is valid
- I have performed a self-review of my own code
- I have commented my code, particularly in hard-to-understand areas
- I have made corresponding changes to the documentation
Expand Down
10 changes: 5 additions & 5 deletions docs/autogen/src/src/Counter.sol/contract.Counter.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Counter
[Git Source](https://github.com/0xPolygon/foundry-template/blob/1982945ef9a5f6e6ec018759f8fcd1f51129ed46/src/Counter.sol)
[Git Source](https://github.com/0xPolygon/foundry-template/blob/55b07186cd4779cbe55cc2f262f992aeabaf34ad/src/Counter.sol)

**Inherits:**
[ICounter](/docs/autogen/src/src/interface/ICounter.sol/interface.ICounter.md), Initializable
Expand All @@ -23,7 +23,7 @@ function initialize(uint256 initialNumber) public initializer;

### setNumber

Sets the number.
Sets the number


```solidity
Expand All @@ -33,12 +33,12 @@ function setNumber(uint256 newNumber) public;

|Name|Type|Description|
|----|----|-----------|
|`newNumber`|`uint256`|The new number.|
|`newNumber`|`uint256`|The new number|


### increment

Increments the number by 1.
Increments the number by 1


```solidity
Expand All @@ -55,6 +55,6 @@ function version() external pure returns (string memory);

|Name|Type|Description|
|----|----|-----------|
|`<none>`|`string`|The version of the contract.|
|`<none>`|`string`|The version of the contract|


Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ICounter
[Git Source](https://github.com/0xPolygon/foundry-template/blob/1982945ef9a5f6e6ec018759f8fcd1f51129ed46/src/interface/ICounter.sol)
[Git Source](https://github.com/0xPolygon/foundry-template/blob/55b07186cd4779cbe55cc2f262f992aeabaf34ad/src/interface/ICounter.sol)

**Inherits:**
[IVersioned](/docs/autogen/src/src/interface/IVersioned.sol/interface.IVersioned.md)
Expand All @@ -16,12 +16,12 @@ function number() external view returns (uint256);

|Name|Type|Description|
|----|----|-----------|
|`<none>`|`uint256`|The current number.|
|`<none>`|`uint256`|The current number|


### setNumber

Sets the number.
Sets the number


```solidity
Expand All @@ -31,12 +31,12 @@ function setNumber(uint256 newNumber) external;

|Name|Type|Description|
|----|----|-----------|
|`newNumber`|`uint256`|The new number.|
|`newNumber`|`uint256`|The new number|


### increment

Increments the number by 1.
Increments the number by 1


```solidity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# IVersioned
[Git Source](https://github.com/0xPolygon/foundry-template/blob/1982945ef9a5f6e6ec018759f8fcd1f51129ed46/src/interface/IVersioned.sol)
[Git Source](https://github.com/0xPolygon/foundry-template/blob/55b07186cd4779cbe55cc2f262f992aeabaf34ad/src/interface/IVersioned.sol)


## Functions
Expand All @@ -13,6 +13,6 @@ function version() external pure returns (string memory);

|Name|Type|Description|
|----|----|-----------|
|`<none>`|`string`|The version of the contract.|
|`<none>`|`string`|The version of the contract|


13 changes: 7 additions & 6 deletions foundry.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[profile.default]
src = 'src'
out = 'out'
libs = ['lib']
src = "src"
out = "out"
libs = ["lib"]
optimizer = true
optimize_runs = 999999
via_ir = true
solc = '0.8.22'
solc = "0.8.22"
verbosity = 2
ffi = true
fs_permissions = [
Expand All @@ -14,8 +14,9 @@ fs_permissions = [
]

remappings = [
"@openzeppelin/contracts=lib/openzeppelin-contracts/contracts",
"@openzeppelin/contracts-upgradeable=lib/openzeppelin-contracts-upgradeable/contracts"
"forge-std=lib/forge-std/src",
"@openzeppelin/contracts=lib/openzeppelin-contracts/contracts",
"@openzeppelin/contracts-upgradeable=lib/openzeppelin-contracts-upgradeable/contracts"
]

[profile.intense.fuzz]
Expand Down
8 changes: 4 additions & 4 deletions src/interface/ICounter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ pragma solidity 0.8.22;
import {IVersioned} from "./IVersioned.sol";

interface ICounter is IVersioned {
/// @return The current number.
/// @return The current number
function number() external view returns (uint256);

/// @notice Sets the number.
/// @param newNumber The new number.
/// @notice Sets the number
/// @param newNumber The new number
function setNumber(uint256 newNumber) external;

/// @notice Increments the number by 1.
/// @notice Increments the number by 1
function increment() external;
}
2 changes: 1 addition & 1 deletion src/interface/IVersioned.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
pragma solidity 0.8.22;

interface IVersioned {
/// @return The version of the contract.
/// @return The version of the contract
function version() external pure returns (string memory);
}
2 changes: 1 addition & 1 deletion test/1.0.0/Counter.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "test/util/TestHelpers.sol";

import "script/1.0.0/Deploy.s.sol";

abstract contract BeforeScript is Test, TestHelpers, CounterDeployer {
abstract contract BeforeScript is TestHelpers, CounterDeployer {
Counter internal counter;

function setUp() public {
Expand Down

0 comments on commit cb433f2

Please sign in to comment.