-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ec44caf
commit 82ff2eb
Showing
2 changed files
with
50 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.28; | ||
|
||
interface IFluentRust { | ||
// Make sure type interfaces are defined here or else there will be a compiler error. | ||
function rustLnUint256() external view returns (uint256); | ||
function rustLog10Uint256() external view returns (uint256); | ||
function rustLog2Uint256() external view returns (uint256); | ||
function rustSqrtUint256() external view returns (uint256); | ||
function rustExpUint256() external view returns (uint256); | ||
} | ||
|
||
contract FluentSdkRustPrbMathTestValues { | ||
|
||
IFluentRust public fluentRust; | ||
|
||
constructor(address FluentRustAddress) { | ||
fluentRust = IFluentRust(FluentRustAddress); | ||
} | ||
|
||
function getRustLnUint256() external view returns (uint256) { | ||
uint256 rustUint256 = fluentRust.rustLnUint256(); | ||
return rustUint256; | ||
} | ||
|
||
function getRustLog10Uint256() external view returns (uint256) { | ||
uint256 rustUint256 = fluentRust.rustLog10Uint256(); | ||
return rustUint256; | ||
} | ||
|
||
function getRustLog2Uint256() external view returns (uint256) { | ||
uint256 rustUint256 = fluentRust.rustLog2Uint256(); | ||
return rustUint256; | ||
} | ||
|
||
function getRustSqrtUint256() external view returns (uint256) { | ||
uint256 rustUint256 = fluentRust.rustSqrtUint256(); | ||
return rustUint256; | ||
} | ||
|
||
function getRustExpUint256() external view returns (uint256) { | ||
uint256 rustUint256 = fluentRust.rustExpUint256(); | ||
return rustUint256; | ||
} | ||
|
||
} |
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