@mainsail/evm 0.0.1-evm.2 → 0.0.1-evm.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +36 -5
- package/package.json +5 -5
package/index.d.ts
CHANGED
|
@@ -8,6 +8,9 @@ export interface JsTransactionContext {
|
|
|
8
8
|
/** Omit recipient when deploying a contract */
|
|
9
9
|
recipient?: string
|
|
10
10
|
gasLimit: bigint
|
|
11
|
+
gasPrice?: bigint
|
|
12
|
+
value: bigint
|
|
13
|
+
nonce: bigint
|
|
11
14
|
data: Buffer
|
|
12
15
|
txHash: string
|
|
13
16
|
blockContext: JsBlockContext
|
|
@@ -25,20 +28,38 @@ export interface JsBlockContext {
|
|
|
25
28
|
timestamp: bigint
|
|
26
29
|
validatorAddress: string
|
|
27
30
|
}
|
|
28
|
-
export interface
|
|
29
|
-
commitKey: JsCommitKey
|
|
31
|
+
export interface JsGenesisContext {
|
|
30
32
|
account: string
|
|
31
|
-
|
|
33
|
+
deployerAccount: string
|
|
34
|
+
validatorContract: string
|
|
35
|
+
initialSupply: bigint
|
|
36
|
+
}
|
|
37
|
+
export interface JsCalculateTopValidatorsContext {
|
|
38
|
+
commitKey: JsCommitKey
|
|
39
|
+
timestamp: bigint
|
|
40
|
+
activeValidators: bigint
|
|
41
|
+
validatorAddress: string
|
|
42
|
+
specId: string
|
|
43
|
+
}
|
|
44
|
+
export interface JsUpdateRewardsAndVotesContext {
|
|
45
|
+
commitKey: JsCommitKey
|
|
46
|
+
timestamp: bigint
|
|
47
|
+
blockReward: bigint
|
|
48
|
+
validatorAddress: string
|
|
49
|
+
specId: string
|
|
32
50
|
}
|
|
33
51
|
export interface JsCommitKey {
|
|
34
52
|
height: bigint
|
|
35
53
|
round: bigint
|
|
36
54
|
}
|
|
55
|
+
export interface JsPrepareNextCommitContext {
|
|
56
|
+
commitKey: JsCommitKey
|
|
57
|
+
}
|
|
37
58
|
export interface JsProcessResult {
|
|
38
59
|
receipt: JsTransactionReceipt
|
|
39
60
|
}
|
|
40
61
|
export interface JsCommitResult {
|
|
41
|
-
|
|
62
|
+
dirtyAccounts: Array<JsAccountUpdate>
|
|
42
63
|
}
|
|
43
64
|
export interface JsViewResult {
|
|
44
65
|
success: boolean
|
|
@@ -56,12 +77,22 @@ export interface JsAccountInfo {
|
|
|
56
77
|
balance: bigint
|
|
57
78
|
nonce: bigint
|
|
58
79
|
}
|
|
80
|
+
export interface JsAccountUpdate {
|
|
81
|
+
address: string
|
|
82
|
+
balance: bigint
|
|
83
|
+
nonce: bigint
|
|
84
|
+
vote?: string
|
|
85
|
+
unvote?: string
|
|
86
|
+
}
|
|
59
87
|
export type JsEvmWrapper = Evm
|
|
60
88
|
export declare class Evm {
|
|
61
89
|
constructor(path: string)
|
|
62
90
|
view(viewCtx: JsTransactionViewContext): Promise<JsViewResult>
|
|
63
91
|
process(txCtx: JsTransactionContext): Promise<JsProcessResult>
|
|
64
|
-
|
|
92
|
+
initializeGenesis(genesisCtx: JsGenesisContext): Promise<void>
|
|
93
|
+
prepareNextCommit(ctx: JsPrepareNextCommitContext): Promise<void>
|
|
94
|
+
calculateTopValidators(ctx: JsCalculateTopValidatorsContext): Promise<void>
|
|
95
|
+
updateRewardsAndVotes(ctx: JsUpdateRewardsAndVotesContext): Promise<void>
|
|
65
96
|
getAccountInfo(address: string): Promise<JsAccountInfo>
|
|
66
97
|
codeAt(address: string): Promise<string>
|
|
67
98
|
storageAt(address: string, slot: bigint): Promise<string>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mainsail/evm",
|
|
3
|
-
"version": "0.0.1-evm.
|
|
3
|
+
"version": "0.0.1-evm.3",
|
|
4
4
|
"description": "EVM for the Mainsail blockchain",
|
|
5
5
|
"license": "GPL-3.0-only",
|
|
6
6
|
"contributors": [],
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"optionalDependencies": {
|
|
28
|
-
"@mainsail/evm-linux-arm64-gnu": "0.0.1-evm.
|
|
29
|
-
"@mainsail/evm-linux-arm64-musl": "0.0.1-evm.
|
|
30
|
-
"@mainsail/evm-linux-x64-gnu": "0.0.1-evm.
|
|
31
|
-
"@mainsail/evm-linux-x64-musl": "0.0.1-evm.
|
|
28
|
+
"@mainsail/evm-linux-arm64-gnu": "0.0.1-evm.3",
|
|
29
|
+
"@mainsail/evm-linux-arm64-musl": "0.0.1-evm.3",
|
|
30
|
+
"@mainsail/evm-linux-x64-gnu": "0.0.1-evm.3",
|
|
31
|
+
"@mainsail/evm-linux-x64-musl": "0.0.1-evm.3"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"artifacts": "napi artifacts",
|