-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(balances): logic, tests and metadata
- Loading branch information
Showing
49 changed files
with
616 additions
and
257 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
Binary file not shown.
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,7 @@ | ||
package balances | ||
|
||
import primitives "github.com/LimeChain/gosemble/primitives/types" | ||
|
||
func callForceAdjustTotalIssuanceWeight() primitives.Weight { | ||
return primitives.WeightFromParts(6507000, 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package balances | ||
|
||
import primitives "github.com/LimeChain/gosemble/primitives/types" | ||
|
||
func callForceSetBalanceCreatingWeight(dbWeight primitives.RuntimeDbWeight) primitives.Weight { | ||
return primitives.WeightFromParts(705450000, 0). | ||
SaturatingAdd(dbWeight.Reads(2)). | ||
SaturatingAdd(dbWeight.Writes(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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package balances | ||
|
||
import primitives "github.com/LimeChain/gosemble/primitives/types" | ||
|
||
func callForceSetBalanceKillingWeight(dbWeight primitives.RuntimeDbWeight) primitives.Weight { | ||
return primitives.WeightFromParts(947950000, 0). | ||
SaturatingAdd(dbWeight.Reads(2)). | ||
SaturatingAdd(dbWeight.Writes(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
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,9 @@ | ||
package balances | ||
|
||
import primitives "github.com/LimeChain/gosemble/primitives/types" | ||
|
||
func callForceTransferWeight(dbWeight primitives.RuntimeDbWeight) primitives.Weight { | ||
return primitives.WeightFromParts(1773600000, 0). | ||
SaturatingAdd(dbWeight.Reads(2)). | ||
SaturatingAdd(dbWeight.Writes(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
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,9 @@ | ||
package balances | ||
|
||
import primitives "github.com/LimeChain/gosemble/primitives/types" | ||
|
||
func callForceUnreserveWeight(dbWeight primitives.RuntimeDbWeight) primitives.Weight { | ||
return primitives.WeightFromParts(718350000, 0). | ||
SaturatingAdd(dbWeight.Reads(1)). | ||
SaturatingAdd(dbWeight.Writes(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
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,9 @@ | ||
package balances | ||
|
||
import primitives "github.com/LimeChain/gosemble/primitives/types" | ||
|
||
func callTransferAllWeight(dbWeight primitives.RuntimeDbWeight) primitives.Weight { | ||
return primitives.WeightFromParts(2083900000, 0). | ||
SaturatingAdd(dbWeight.Reads(1)). | ||
SaturatingAdd(dbWeight.Writes(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
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,9 @@ | ||
package balances | ||
|
||
import primitives "github.com/LimeChain/gosemble/primitives/types" | ||
|
||
func callTransferAllowDeathWeight(dbWeight primitives.RuntimeDbWeight) primitives.Weight { | ||
return primitives.WeightFromParts(47297000, 3593). | ||
SaturatingAdd(dbWeight.Reads(1)). | ||
SaturatingAdd(dbWeight.Writes(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
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,9 @@ | ||
package balances | ||
|
||
import primitives "github.com/LimeChain/gosemble/primitives/types" | ||
|
||
func callTransferKeepAliveWeight(dbWeight primitives.RuntimeDbWeight) primitives.Weight { | ||
return primitives.WeightFromParts(1782050000, 0). | ||
SaturatingAdd(dbWeight.Reads(1)). | ||
SaturatingAdd(dbWeight.Writes(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
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,14 @@ | ||
package balances | ||
|
||
import ( | ||
sc "github.com/LimeChain/goscale" | ||
primitives "github.com/LimeChain/gosemble/primitives/types" | ||
) | ||
|
||
func callUpgradeAccountsWeight(dbWeight primitives.RuntimeDbWeight, length sc.U64) primitives.Weight { | ||
return primitives.WeightFromParts(16118000, 990). | ||
SaturatingAdd(primitives.WeightFromParts(13327660, 0).SaturatingMul(length)). | ||
SaturatingAdd(dbWeight.Reads(1).SaturatingMul(length)). | ||
SaturatingAdd(dbWeight.Writes(1).SaturatingMul(length)). | ||
SaturatingAdd(primitives.WeightFromParts(0, 2603).SaturatingMul(length)) | ||
} |
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.