@soma-finance/core-contracts
Version:
SOMA Finance core contracts
488 lines • 9.79 kB
JSON
[
{
"inputs": [
{
"components": [
{
"internalType": "uint224",
"name": "_x",
"type": "uint224"
}
],
"internalType": "struct FixedPoint.uq112x112",
"name": "self",
"type": "tuple"
}
],
"name": "decode",
"outputs": [
{
"internalType": "uint112",
"name": "",
"type": "uint112"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "uint256",
"name": "_x",
"type": "uint256"
}
],
"internalType": "struct FixedPoint.uq144x112",
"name": "self",
"type": "tuple"
}
],
"name": "decode144",
"outputs": [
{
"internalType": "uint144",
"name": "",
"type": "uint144"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "uint224",
"name": "_x",
"type": "uint224"
}
],
"internalType": "struct FixedPoint.uq112x112",
"name": "self",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint224",
"name": "_x",
"type": "uint224"
}
],
"internalType": "struct FixedPoint.uq112x112",
"name": "other",
"type": "tuple"
}
],
"name": "divuq",
"outputs": [
{
"components": [
{
"internalType": "uint224",
"name": "_x",
"type": "uint224"
}
],
"internalType": "struct FixedPoint.uq112x112",
"name": "",
"type": "tuple"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint112",
"name": "x",
"type": "uint112"
}
],
"name": "encode",
"outputs": [
{
"components": [
{
"internalType": "uint224",
"name": "_x",
"type": "uint224"
}
],
"internalType": "struct FixedPoint.uq112x112",
"name": "",
"type": "tuple"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint144",
"name": "x",
"type": "uint144"
}
],
"name": "encode144",
"outputs": [
{
"components": [
{
"internalType": "uint256",
"name": "_x",
"type": "uint256"
}
],
"internalType": "struct FixedPoint.uq144x112",
"name": "",
"type": "tuple"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "numerator",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "denominator",
"type": "uint256"
}
],
"name": "fraction",
"outputs": [
{
"components": [
{
"internalType": "uint224",
"name": "_x",
"type": "uint224"
}
],
"internalType": "struct FixedPoint.uq112x112",
"name": "",
"type": "tuple"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "uint224",
"name": "_x",
"type": "uint224"
}
],
"internalType": "struct FixedPoint.uq112x112",
"name": "self",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint224",
"name": "_x",
"type": "uint224"
}
],
"internalType": "struct FixedPoint.uq112x112",
"name": "other",
"type": "tuple"
}
],
"name": "getGasCostOfDivuq",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "numerator",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "denominator",
"type": "uint256"
}
],
"name": "getGasCostOfFraction",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "uint224",
"name": "_x",
"type": "uint224"
}
],
"internalType": "struct FixedPoint.uq112x112",
"name": "self",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint224",
"name": "_x",
"type": "uint224"
}
],
"internalType": "struct FixedPoint.uq112x112",
"name": "other",
"type": "tuple"
}
],
"name": "getGasCostOfMuluq",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "uint224",
"name": "_x",
"type": "uint224"
}
],
"internalType": "struct FixedPoint.uq112x112",
"name": "self",
"type": "tuple"
}
],
"name": "getGasCostOfSqrt",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "uint224",
"name": "_x",
"type": "uint224"
}
],
"internalType": "struct FixedPoint.uq112x112",
"name": "self",
"type": "tuple"
},
{
"internalType": "uint256",
"name": "y",
"type": "uint256"
}
],
"name": "mul",
"outputs": [
{
"components": [
{
"internalType": "uint256",
"name": "_x",
"type": "uint256"
}
],
"internalType": "struct FixedPoint.uq144x112",
"name": "",
"type": "tuple"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "uint224",
"name": "_x",
"type": "uint224"
}
],
"internalType": "struct FixedPoint.uq112x112",
"name": "self",
"type": "tuple"
},
{
"internalType": "int256",
"name": "y",
"type": "int256"
}
],
"name": "muli",
"outputs": [
{
"internalType": "int256",
"name": "",
"type": "int256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "uint224",
"name": "_x",
"type": "uint224"
}
],
"internalType": "struct FixedPoint.uq112x112",
"name": "self",
"type": "tuple"
},
{
"components": [
{
"internalType": "uint224",
"name": "_x",
"type": "uint224"
}
],
"internalType": "struct FixedPoint.uq112x112",
"name": "other",
"type": "tuple"
}
],
"name": "muluq",
"outputs": [
{
"components": [
{
"internalType": "uint224",
"name": "_x",
"type": "uint224"
}
],
"internalType": "struct FixedPoint.uq112x112",
"name": "",
"type": "tuple"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "uint224",
"name": "_x",
"type": "uint224"
}
],
"internalType": "struct FixedPoint.uq112x112",
"name": "self",
"type": "tuple"
}
],
"name": "reciprocal",
"outputs": [
{
"components": [
{
"internalType": "uint224",
"name": "_x",
"type": "uint224"
}
],
"internalType": "struct FixedPoint.uq112x112",
"name": "",
"type": "tuple"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "uint224",
"name": "_x",
"type": "uint224"
}
],
"internalType": "struct FixedPoint.uq112x112",
"name": "self",
"type": "tuple"
}
],
"name": "sqrt",
"outputs": [
{
"components": [
{
"internalType": "uint224",
"name": "_x",
"type": "uint224"
}
],
"internalType": "struct FixedPoint.uq112x112",
"name": "",
"type": "tuple"
}
],
"stateMutability": "pure",
"type": "function"
}
]