Skip to content
Verified contractExactUNLICENSED

ToHellWithCurve

Address0xb7feb17fb0b0fdfbc762e1fdee5d8863f2f0a201
Balance

0 ETH

 

Transactions

1

 

Compiler

solc 0.8.38

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.38+commit.1835d247
Language
solidity
Optimization
Yes, 10,000 runs
EVM version
osaka
Via IR
yes
License
UNLICENSED
Match
Exactcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
26,465,098
Creation transaction
0x8aa5d3be3d…76cb554cba

solidity/src/modules/ToHellWithCurve.sol

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.37;

// `PythReportBank`'s entry point, `0xb6603da5`.
interface IPythReportBank {
    function deliver_report(bytes calldata update) external payable;
}

/// @notice Routes a signed Pyth Pro update from module `0x04` to Yield Basis's
///  `PythReportBank`. `0x04` calls `deliver_oracle_report(bytes)` on whatever address
///  its instruction names; named there, this contract hands the update and the value
///  to the bank's `deliver_report`. The wire is `0x04`'s:
///  `[0x04][this:20][value:32][len:2][update:len]`. Not a module: it is deployed from
///  any key and called, never registered. See `docs/yield-basis-oracle.md`.
contract ToHellWithCurve {
    IPythReportBank public constant BANK =
        IPythReportBank(0x8a0f866de34631311b7745C5f4eec7Bf1F6849dB);
    // AmmSwapper V9: `0x04` runs under its `delegatecall`, so the call comes from it.
    address public constant AMM_SWAPPER = 0xE41698520E4817B55C1841859a36847d50F0c82F;

    /// @notice Delivers `update` to the bank with all of `msg.value`, for the swapper
    ///  only. A bank revert reverts the caller; a feed not newer than the bank's is
    ///  skipped, not reverted.
    function deliver_oracle_report(bytes calldata update) external payable {
        require(msg.sender == AMM_SWAPPER);
        BANK.deliver_report{value: msg.value}(update);
    }
}
Compiler settingsShow
{
  "viaIR": true,
  "metadata": {
    "appendCBOR": true,
    "bytecodeHash": "ipfs",
    "useLiteralContent": false
  },
  "libraries": {},
  "optimizer": {
    "runs": 10000,
    "enabled": true
  },
  "viaSSACFG": false,
  "evmVersion": "osaka",
  "remappings": [
    "forge-std/=solidity/lib/forge-std/src/"
  ],
  "experimental": false
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.