@@ -6,68 +6,68 @@ export declare function useGas(amount: i64): void;
66
77export declare function getGasLeft ( ) : i64 ;
88
9- export declare function getAddress ( resultOffset : i32 ) : void ;
9+ export declare function getAddress ( resultOffset : usize ) : void ;
1010
11- export declare function getBalance ( addressOffset : i32 , resultOffset : i32 ) : void ;
11+ export declare function getBalance ( addressOffset : usize , resultOffset : usize ) : void ;
1212
13- export declare function getBlockCoinbase ( resultOffset : i32 ) : void ;
13+ export declare function getBlockCoinbase ( resultOffset : usize ) : void ;
1414
15- export declare function getBlockDifficulty ( resultOffset : i32 ) : void ;
15+ export declare function getBlockDifficulty ( resultOffset : usize ) : void ;
1616
1717export declare function getBlockGasLimit ( ) : i64 ;
1818
19- export declare function getBlockHash ( number : i64 , resultOffset : i32 ) : void ;
19+ export declare function getBlockHash ( number : i64 , resultOffset : usize ) : void ;
2020
2121export declare function getBlockNumber ( ) : i64 ;
2222
2323export declare function getBlockTimestamp ( ) : i64 ;
2424
25- export declare function getTxGasPrice ( valueOffset : i32 ) : void ;
25+ export declare function getTxGasPrice ( valueOffset : usize ) : void ;
2626
27- export declare function getTxOrigin ( resultOffest : i32 ) : void ;
27+ export declare function getTxOrigin ( resultOffest : usize ) : void ;
2828
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 ;
3030
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 ;
3232
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 ;
3434
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 ;
3636
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 ;
3838
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 ;
4040
41- export declare function returnDataCopy ( resultOffset : i32 , dataOffset : i32 , length : i32 ) : void ;
41+ export declare function returnDataCopy ( resultOffset : usize , dataOffset : usize , length : i32 ) : void ;
4242
4343export declare function getReturnDataSize ( ) : i32 ;
4444
4545@external ( "return" )
46- export declare function finish ( dataOffset : i32 , length : i32 ) : void ;
46+ export declare function finish ( dataOffset : usize , length : i32 ) : void ;
4747
48- export declare function revert ( dataOffset : i32 , length : i32 ) : void ;
48+ export declare function revert ( dataOffset : usize , length : i32 ) : void ;
4949
50- export declare function callDataCopy ( resultOffset : i32 , dataOffset : i32 , length : i32 ) : void ;
50+ export declare function callDataCopy ( resultOffset : usize , dataOffset : usize , length : i32 ) : void ;
5151
5252export declare function getCallDataSize ( ) : i32 ;
5353
54- export declare function getCaller ( resultOffset : i32 ) : void ;
54+ export declare function getCaller ( resultOffset : usize ) : void ;
5555
56- export declare function getCallValue ( resultOffset : i32 ) : void ;
56+ export declare function getCallValue ( resultOffset : usize ) : void ;
5757
58- export declare function codeCopy ( resultOffset : i32 , codeOffset : i32 , length : i32 ) : void ;
58+ export declare function codeCopy ( resultOffset : usize , codeOffset : usize , length : i32 ) : void ;
5959
6060export declare function getCodeSize ( ) : i32 ;
6161
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 ;
6363
64- export declare function getExternalCodeSize ( addressOffset : i32 ) : i32 ;
64+ export declare function getExternalCodeSize ( addressOffset : usize ) : i32 ;
6565
66- export declare function storageStore ( pathOffset : i32 , valueOffset : i32 ) : void ;
66+ export declare function storageStore ( pathOffset : usize , valueOffset : usize ) : void ;
6767
68- export declare function storageLoad ( pathOffset : i32 , resultOffset : i32 ) : void ;
68+ export declare function storageLoad ( pathOffset : usize , resultOffset : usize ) : void ;
6969
70- export declare function selfDestruct ( addressOffset : i32 ) : void ;
70+ export declare function selfDestruct ( addressOffset : usize ) : void ;
7171
7272@external ( "debug" , "print32" )
7373export declare function print32 ( value : i32 ) : void ;
@@ -76,18 +76,16 @@ export declare function print32(value: i32): void;
7676export declare function print64 ( value : i64 ) : void ;
7777
7878@external ( "debug" , "printMem" )
79- export declare function printMem ( dataOffset : i32 , length : i32 ) : void ;
79+ export declare function printMem ( dataOffset : usize , length : i32 ) : void ;
8080
8181@external ( "debug" , "printMemHex" )
82- export declare function printMemHex ( dataOffset : i32 , length : i32 ) : void ;
82+ export declare function printMemHex ( dataOffset : usize , length : i32 ) : void ;
8383
8484@external ( "debug" , "printStorage" )
85- export declare function printStorage ( pathOffset : i32 ) : void ;
85+ export declare function printStorage ( pathOffset : usize ) : void ;
8686
8787@external ( "debug" , "printStorageHex" )
88- export declare function printStorageHex ( pathOffset : i32 ) : void ;
88+ export declare function printStorageHex ( pathOffset : usize ) : void ;
8989
9090@external ( "debug" , "evmTrace" )
9191export 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