-
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.
Merge pull request #46 from AElfProject/add-acs12-hello-world-contract
feat(acs12): added acs12 into template
- Loading branch information
Showing
4 changed files
with
75 additions
and
1 deletion.
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
35 changes: 35 additions & 0 deletions
35
templates/HelloWorldContract/src/Protobuf/reference/acs12.proto
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,35 @@ | ||
/** | ||
* AElf Standards ACS12(User Contract Standard) | ||
* | ||
* Used to manage user contract. | ||
*/ | ||
syntax = "proto3"; | ||
|
||
package acs12; | ||
|
||
import public "aelf/options.proto"; | ||
import public "google/protobuf/empty.proto"; | ||
import public "google/protobuf/wrappers.proto"; | ||
import "aelf/core.proto"; | ||
|
||
option (aelf.identity) = "acs12"; | ||
option csharp_namespace = "AElf.Standards.ACS12"; | ||
|
||
service UserContract{ | ||
|
||
} | ||
|
||
//Specified method fee for user contract. | ||
message UserContractMethodFees { | ||
// List of fees to be charged. | ||
repeated UserContractMethodFee fees = 2; | ||
// Optional based on the implementation of SetConfiguration method. | ||
bool is_size_fee_free = 3; | ||
} | ||
|
||
message UserContractMethodFee { | ||
// The token symbol of the method fee. | ||
string symbol = 1; | ||
// The amount of fees to be charged. | ||
int64 basic_fee = 2; | ||
} |
35 changes: 35 additions & 0 deletions
35
templates/HelloWorldContract/test/Protobuf/reference/acs12.proto
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,35 @@ | ||
/** | ||
* AElf Standards ACS12(User Contract Standard) | ||
* | ||
* Used to manage user contract. | ||
*/ | ||
syntax = "proto3"; | ||
|
||
package acs12; | ||
|
||
import public "aelf/options.proto"; | ||
import public "google/protobuf/empty.proto"; | ||
import public "google/protobuf/wrappers.proto"; | ||
import "aelf/core.proto"; | ||
|
||
option (aelf.identity) = "acs12"; | ||
option csharp_namespace = "AElf.Standards.ACS12"; | ||
|
||
service UserContract{ | ||
|
||
} | ||
|
||
//Specified method fee for user contract. | ||
message UserContractMethodFees { | ||
// List of fees to be charged. | ||
repeated UserContractMethodFee fees = 2; | ||
// Optional based on the implementation of SetConfiguration method. | ||
bool is_size_fee_free = 3; | ||
} | ||
|
||
message UserContractMethodFee { | ||
// The token symbol of the method fee. | ||
string symbol = 1; | ||
// The amount of fees to be charged. | ||
int64 basic_fee = 2; | ||
} |
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