-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create
IVersionable
interface (#76)
* chore: add version * chore: add version test * chore: upgrade packages * chore: remove deployed contracts * chore: sync files with all repos * chore: update scripts * chore: update package-lock.json * chore: update comments * docs: update `README.md` --------- Co-authored-by: Igor Senych <[email protected]> Co-authored-by: Igor Senych <[email protected]>
- Loading branch information
1 parent
7eab765
commit cc2e1e3
Showing
15 changed files
with
1,070 additions
and
1,745 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 |
---|---|---|
@@ -1,13 +1,14 @@ | ||
SOLIDITY_VERSION = 0.8.24 | ||
OPTIMIZER_ENABLED = true | ||
OPTIMIZER_RUNS = 1000 | ||
GAS_REPORTER_ENABLED = false | ||
HARDHAT_MNEMONIC = test test test test test test test test test test test junk | ||
GANACHE_RPC = http://127.0.0.1:7545 | ||
GANACHE_MNEMONIC = test test test test test test test test test test test junk | ||
CW_TESTNET_RPC = | ||
CW_TESTNET_PK = | ||
CW_TESTNET_MNEMONIC = | ||
CW_MAINNET_RPC = | ||
CW_MAINNET_PK = | ||
CW_MAINNET_MNEMONIC = | ||
SOLIDITY_VERSION = 0.8.24 | ||
OPTIMIZER_ENABLED = true | ||
OPTIMIZER_RUNS = 1000 | ||
GAS_REPORTER_ENABLED = false | ||
CONTRACT_SIZER_ENABLED = false | ||
HARDHAT_MNEMONIC = test test test test test test test test test test test junk | ||
GANACHE_RPC = http://127.0.0.1:7545 | ||
GANACHE_MNEMONIC = test test test test test test test test test test test junk | ||
CW_TESTNET_RPC = | ||
CW_TESTNET_PK = | ||
CW_TESTNET_MNEMONIC = | ||
CW_MAINNET_RPC = | ||
CW_MAINNET_PK = | ||
CW_MAINNET_MNEMONIC = |
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,21 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity ^0.8.0; | ||
|
||
import "../interfaces/IVersionable.sol"; | ||
|
||
/** | ||
* @title Versionable contract | ||
* @author CloudWalk Inc. (See https://cloudwalk.io) | ||
* @dev Defines the contract version. | ||
*/ | ||
abstract contract Versionable is IVersionable { | ||
// ------------------ Pure functions -------------------------- // | ||
|
||
/** | ||
* @inheritdoc IVersionable | ||
*/ | ||
function $__VERSION() external pure returns (Version memory) { | ||
return Version(2, 0, 0); | ||
} | ||
} |
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.0; | ||
|
||
/** | ||
* @title IVersionable interface | ||
* @author CloudWalk Inc. (See https://cloudwalk.io) | ||
* @dev Defines the function of getting the contract version. | ||
*/ | ||
interface IVersionable { | ||
/** | ||
* @dev The struct for the contract version. | ||
*/ | ||
struct Version { | ||
uint16 major; // -- The major version of contract | ||
uint16 minor; // -- The minor version of contract | ||
uint16 patch; // -- The patch version of contract | ||
} | ||
|
||
/** | ||
* @dev Returns the version of the contract. | ||
*/ | ||
function $__VERSION() external pure returns (Version memory); | ||
} |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.