-
Notifications
You must be signed in to change notification settings - Fork 1
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 (#87)
* chore: add version, update packages * chore: remove deployed addresses * chore: remove space * docs: update `README.md` * chore: sync files with all repos * chore: update scripts * chore: update scripts * feat: update `@author` comment * chore: update dependencies * feat: format scripts * feat: update `IVersionable` comments * feat: minor refactoring --------- Co-authored-by: Igor Senych <72256997+igorsenych-cw@users.noreply.github.com> Co-authored-by: Igor Senych <igor.senych@cloudwalk.io> Co-authored-by: Evgenii Zaitsev <evgenii@cloudwalk.io>
- Loading branch information
1 parent
ddb70af
commit c8013ee
Showing
47 changed files
with
481 additions
and
342 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
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
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
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
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://www.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(1, 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
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
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
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
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.0; | ||
|
||
/** | ||
* @title IVersionable interface | ||
* @author CloudWalk Inc. (See https://www.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 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
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
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
Oops, something went wrong.