@@ -6,68 +6,68 @@ export declare function useGas(amount: i64): void;
6
6
7
7
export declare function getGasLeft ( ) : i64 ;
8
8
9
- export declare function getAddress ( resultOffset : i32 ) : void ;
9
+ export declare function getAddress ( resultOffset : usize ) : void ;
10
10
11
- export declare function getBalance ( addressOffset : i32 , resultOffset : i32 ) : void ;
11
+ export declare function getBalance ( addressOffset : usize , resultOffset : usize ) : void ;
12
12
13
- export declare function getBlockCoinbase ( resultOffset : i32 ) : void ;
13
+ export declare function getBlockCoinbase ( resultOffset : usize ) : void ;
14
14
15
- export declare function getBlockDifficulty ( resultOffset : i32 ) : void ;
15
+ export declare function getBlockDifficulty ( resultOffset : usize ) : void ;
16
16
17
17
export declare function getBlockGasLimit ( ) : i64 ;
18
18
19
- export declare function getBlockHash ( number : i64 , resultOffset : i32 ) : void ;
19
+ export declare function getBlockHash ( number : i64 , resultOffset : usize ) : void ;
20
20
21
21
export declare function getBlockNumber ( ) : i64 ;
22
22
23
23
export declare function getBlockTimestamp ( ) : i64 ;
24
24
25
- export declare function getTxGasPrice ( valueOffset : i32 ) : void ;
25
+ export declare function getTxGasPrice ( valueOffset : usize ) : void ;
26
26
27
- export declare function getTxOrigin ( resultOffest : i32 ) : void ;
27
+ export declare function getTxOrigin ( resultOffest : usize ) : void ;
28
28
29
- export declare function log ( dataOffset : i32 , length : i32 , numberOfTopics : i32 , topic1 : i32 , topic2 : i32 , topic3 : i32 , topic4 : i32 ) : void ;
29
+ export declare function log ( dataOffset : usize , length : i32 , numberOfTopics : i32 , topic1 : i32 , topic2 : i32 , topic3 : i32 , topic4 : i32 ) : void ;
30
30
31
- export declare function call ( gas : i64 , addressOffset : i32 , valueOffset : i32 , dataOffset : i32 , dataLength : i32 ) : i32 ;
31
+ export declare function call ( gas : i64 , addressOffset : usize , valueOffset : usize , dataOffset : usize , dataLength : i32 ) : i32 ;
32
32
33
- export declare function callCode ( gas : i64 , addressOffset : i32 , valueOffset : i32 , dataOffset : i32 , dataLength : i32 ) : i32 ;
33
+ export declare function callCode ( gas : i64 , addressOffset : usize , valueOffset : usize , dataOffset : usize , dataLength : i32 ) : i32 ;
34
34
35
- export declare function callDelegate ( gas : i64 , addressOffset : i32 , dataOffset : i32 , dataLength : i32 ) : i32 ;
35
+ export declare function callDelegate ( gas : i64 , addressOffset : usize , dataOffset : usize , dataLength : i32 ) : i32 ;
36
36
37
- export declare function callStatic ( gas : i64 , addressOffset : i32 , dataOffset : i32 , dataLength : i32 ) : i32 ;
37
+ export declare function callStatic ( gas : i64 , addressOffset : usize , dataOffset : usize , dataLength : i32 ) : i32 ;
38
38
39
- export declare function create ( valueOffset : i32 , dataOffset : i32 , length : i32 , resultOffset : i32 ) : i32 ;
39
+ export declare function create ( valueOffset : usize , dataOffset : usize , length : i32 , resultOffset : usize ) : i32 ;
40
40
41
- export declare function returnDataCopy ( resultOffset : i32 , dataOffset : i32 , length : i32 ) : void ;
41
+ export declare function returnDataCopy ( resultOffset : usize , dataOffset : usize , length : i32 ) : void ;
42
42
43
43
export declare function getReturnDataSize ( ) : i32 ;
44
44
45
45
@external ( "return" )
46
- export declare function finish ( dataOffset : i32 , length : i32 ) : void ;
46
+ export declare function finish ( dataOffset : usize , length : i32 ) : void ;
47
47
48
- export declare function revert ( dataOffset : i32 , length : i32 ) : void ;
48
+ export declare function revert ( dataOffset : usize , length : i32 ) : void ;
49
49
50
- export declare function callDataCopy ( resultOffset : i32 , dataOffset : i32 , length : i32 ) : void ;
50
+ export declare function callDataCopy ( resultOffset : usize , dataOffset : usize , length : i32 ) : void ;
51
51
52
52
export declare function getCallDataSize ( ) : i32 ;
53
53
54
- export declare function getCaller ( resultOffset : i32 ) : void ;
54
+ export declare function getCaller ( resultOffset : usize ) : void ;
55
55
56
- export declare function getCallValue ( resultOffset : i32 ) : void ;
56
+ export declare function getCallValue ( resultOffset : usize ) : void ;
57
57
58
- export declare function codeCopy ( resultOffset : i32 , codeOffset : i32 , length : i32 ) : void ;
58
+ export declare function codeCopy ( resultOffset : usize , codeOffset : usize , length : i32 ) : void ;
59
59
60
60
export declare function getCodeSize ( ) : i32 ;
61
61
62
- export declare function externalCodeCopy ( addressOffset : i32 , resultOffset : i32 , codeOffset : i32 , lengh : i32 ) : void ;
62
+ export declare function externalCodeCopy ( addressOffset : usize , resultOffset : usize , codeOffset : usize , lengh : i32 ) : void ;
63
63
64
- export declare function getExternalCodeSize ( addressOffset : i32 ) : i32 ;
64
+ export declare function getExternalCodeSize ( addressOffset : usize ) : i32 ;
65
65
66
- export declare function storageStore ( pathOffset : i32 , valueOffset : i32 ) : void ;
66
+ export declare function storageStore ( pathOffset : usize , valueOffset : usize ) : void ;
67
67
68
- export declare function storageLoad ( pathOffset : i32 , resultOffset : i32 ) : void ;
68
+ export declare function storageLoad ( pathOffset : usize , resultOffset : usize ) : void ;
69
69
70
- export declare function selfDestruct ( addressOffset : i32 ) : void ;
70
+ export declare function selfDestruct ( addressOffset : usize ) : void ;
71
71
72
72
@external ( "debug" , "print32" )
73
73
export declare function print32 ( value : i32 ) : void ;
@@ -76,18 +76,16 @@ export declare function print32(value: i32): void;
76
76
export declare function print64 ( value : i64 ) : void ;
77
77
78
78
@external ( "debug" , "printMem" )
79
- export declare function printMem ( dataOffset : i32 , length : i32 ) : void ;
79
+ export declare function printMem ( dataOffset : usize , length : i32 ) : void ;
80
80
81
81
@external ( "debug" , "printMemHex" )
82
- export declare function printMemHex ( dataOffset : i32 , length : i32 ) : void ;
82
+ export declare function printMemHex ( dataOffset : usize , length : i32 ) : void ;
83
83
84
84
@external ( "debug" , "printStorage" )
85
- export declare function printStorage ( pathOffset : i32 ) : void ;
85
+ export declare function printStorage ( pathOffset : usize ) : void ;
86
86
87
87
@external ( "debug" , "printStorageHex" )
88
- export declare function printStorageHex ( pathOffset : i32 ) : void ;
88
+ export declare function printStorageHex ( pathOffset : usize ) : void ;
89
89
90
90
@external ( "debug" , "evmTrace" )
91
91
export declare function evmTrace ( pc : i32 , opcode : i32 , cost : i32 , sp : i32 ) : void ;
92
-
93
- // TODO: need to implement a nice wrapper over the native functions which use native types and handles the memory.
0 commit comments