forked from neo-project/neo-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Max_Fee as the optional for gas limit. (neo-project#74)
* Make calculation for extra gas on "send*" RPC (neo-project#70) * Make calculation for extra gas on "send*" RPC * Fix for the calculation when little overstep * Delete the dependency which is for testing purpose * Choose the max_fee between fee and extra_fee * Change error codes * Update Settings.cs * format
- Loading branch information
1 parent
ad71e7d
commit 01dcb2c
Showing
4 changed files
with
43 additions
and
3 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
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,5 @@ | ||
{ | ||
"PluginConfiguration": { | ||
"MaxFee": 0.1 | ||
} | ||
} |
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 @@ | ||
using Microsoft.Extensions.Configuration; | ||
|
||
namespace Neo.Plugins | ||
{ | ||
internal class Settings | ||
{ | ||
public Fixed8 MaxFee { get; } | ||
|
||
public static Settings Default { get; private set; } | ||
|
||
private Settings(IConfigurationSection section) | ||
{ | ||
this.MaxFee = Fixed8.Parse(section.GetValue("MaxFee", "0.1")); | ||
} | ||
|
||
public static void Load(IConfigurationSection section) | ||
{ | ||
Default = new Settings(section); | ||
} | ||
} | ||
} |