mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add abijson test for fixed point types.
This commit is contained in:
parent
cef0f1b9e1
commit
d11235a9e7
109
test/libsolidity/ABIJson/fixed_point.sol
Normal file
109
test/libsolidity/ABIJson/fixed_point.sol
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
struct S { uint a; }
|
||||||
|
contract C {
|
||||||
|
fixed public t;
|
||||||
|
ufixed32x4 public x;
|
||||||
|
mapping(fixed => ufixed) public y;
|
||||||
|
event Ev(fixed x);
|
||||||
|
error Er(fixed k);
|
||||||
|
function f(fixed[] calldata) external view returns (ufixed64x2) {}
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// :C
|
||||||
|
// [
|
||||||
|
// {
|
||||||
|
// "inputs":
|
||||||
|
// [
|
||||||
|
// {
|
||||||
|
// "internalType": "fixed128x18",
|
||||||
|
// "name": "k",
|
||||||
|
// "type": "fixed128x18"
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
// "name": "Er",
|
||||||
|
// "type": "error"
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// "anonymous": false,
|
||||||
|
// "inputs":
|
||||||
|
// [
|
||||||
|
// {
|
||||||
|
// "indexed": false,
|
||||||
|
// "internalType": "fixed128x18",
|
||||||
|
// "name": "x",
|
||||||
|
// "type": "fixed128x18"
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
// "name": "Ev",
|
||||||
|
// "type": "event"
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// "inputs":
|
||||||
|
// [
|
||||||
|
// {
|
||||||
|
// "internalType": "fixed128x18[]",
|
||||||
|
// "name": "",
|
||||||
|
// "type": "fixed128x18[]"
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
// "name": "f",
|
||||||
|
// "outputs":
|
||||||
|
// [
|
||||||
|
// {
|
||||||
|
// "internalType": "ufixed64x2",
|
||||||
|
// "name": "",
|
||||||
|
// "type": "ufixed64x2"
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
// "stateMutability": "view",
|
||||||
|
// "type": "function"
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// "inputs": [],
|
||||||
|
// "name": "t",
|
||||||
|
// "outputs":
|
||||||
|
// [
|
||||||
|
// {
|
||||||
|
// "internalType": "fixed128x18",
|
||||||
|
// "name": "",
|
||||||
|
// "type": "fixed128x18"
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
// "stateMutability": "view",
|
||||||
|
// "type": "function"
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// "inputs": [],
|
||||||
|
// "name": "x",
|
||||||
|
// "outputs":
|
||||||
|
// [
|
||||||
|
// {
|
||||||
|
// "internalType": "ufixed32x4",
|
||||||
|
// "name": "",
|
||||||
|
// "type": "ufixed32x4"
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
// "stateMutability": "view",
|
||||||
|
// "type": "function"
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// "inputs":
|
||||||
|
// [
|
||||||
|
// {
|
||||||
|
// "internalType": "fixed128x18",
|
||||||
|
// "name": "",
|
||||||
|
// "type": "fixed128x18"
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
// "name": "y",
|
||||||
|
// "outputs":
|
||||||
|
// [
|
||||||
|
// {
|
||||||
|
// "internalType": "ufixed128x18",
|
||||||
|
// "name": "",
|
||||||
|
// "type": "ufixed128x18"
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
// "stateMutability": "view",
|
||||||
|
// "type": "function"
|
||||||
|
// }
|
||||||
|
// ]
|
Loading…
Reference in New Issue
Block a user