Skip to content

Commit

Permalink
support create smart contract interface (intellij-solidity#332)
Browse files Browse the repository at this point in the history
  • Loading branch information
carter-ya authored Nov 9, 2022
1 parent 4b2bb60 commit b2cf6a4
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class SolCreateFileAction : CreateFileFromTemplateAction(CAPTION, "", SolidityIc
) {
builder.setTitle(CAPTION)
.addKind("Smart contract", SolidityIcons.FILE_ICON, SMART_CONTRACT_TEMPLATE)
.addKind("Smart contract interface", SolidityIcons.FILE_ICON, "Solidity Contract Interface")
.addKind("Solidity library", SolidityIcons.FILE_ICON, "Solidity Library")
.setValidator(object : InputValidatorEx {
override fun checkInput(inputString: String): Boolean {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

interface ${NAME} {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<html>
<body>
Empty Solidity smart contract interface.
</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

contract ${NAME} {
function ${NAME}(){
constructor(){

}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

library ${NAME} {
Expand Down

0 comments on commit b2cf6a4

Please sign in to comment.