Overview
S Balance
S Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
11772154 | 37 hrs ago | Contract Creation | 0 S |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
PoolBoosterSwapxSingle
Compiler Version
v0.8.28+commit.7893614a
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { IBribe } from "../interfaces/poolBooster/ISwapXAlgebraBribe.sol"; import { IPoolBooster } from "../interfaces/poolBooster/IPoolBooster.sol"; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; /** * @title Pool booster for SwapX for Classic Stable Pools and Classic Volatile Pools * @author Origin Protocol Inc */ contract PoolBoosterSwapxSingle is IPoolBooster { // @notice address of the Bribes.sol(Bribe) contract IBribe public immutable bribeContract; // @notice address of the OS token IERC20 public immutable osToken; // @notice if balance under this amount the bribe action is skipped uint256 public constant MIN_BRIBE_AMOUNT = 1e10; constructor(address _bribeContract, address _osToken) { require(_bribeContract != address(0), "Invalid bribeContract address"); bribeContract = IBribe(_bribeContract); // Abstract factory already validates this is not a zero address osToken = IERC20(_osToken); } function bribe() external override { uint256 balance = osToken.balanceOf(address(this)); // balance too small, do no bribes if (balance < MIN_BRIBE_AMOUNT) { return; } osToken.approve(address(bribeContract), balance); bribeContract.notifyRewardAmount(address(osToken), balance); emit BribeExecuted(balance); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IPoolBooster { event BribeExecuted(uint256 amount); /// @notice Execute the bribe action function bribe() external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IBribe { /// @notice Notify a bribe amount /// @dev Rewards are saved into NEXT EPOCH mapping. function notifyRewardAmount(address _rewardsToken, uint256 reward) external; }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_bribeContract","type":"address"},{"internalType":"address","name":"_osToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BribeExecuted","type":"event"},{"inputs":[],"name":"MIN_BRIBE_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bribe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"bribeContract","outputs":[{"internalType":"contract IBribe","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"osToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60c060405234801561001057600080fd5b506040516104bb3803806104bb83398101604081905261002f916100bc565b6001600160a01b0382166100895760405162461bcd60e51b815260206004820152601d60248201527f496e76616c6964206272696265436f6e74726163742061646472657373000000604482015260640160405180910390fd5b6001600160a01b039182166080521660a0526100ef565b80516001600160a01b03811681146100b757600080fd5b919050565b600080604083850312156100cf57600080fd5b6100d8836100a0565b91506100e6602084016100a0565b90509250929050565b60805160a0516103876101346000396000818160560152818160f8015281816101c3015261024801526000818160be01528181610194015261027701526103876000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806312c587c51461005157806337d0208c146100955780633978033f1461009f578063ae554cf9146100b9575b600080fd5b6100787f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b61009d6100e0565b005b6100ab6402540be40081565b60405190815260200161008c565b6100787f000000000000000000000000000000000000000000000000000000000000000081565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610147573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061016b919061030f565b90506402540be40081101561017d5750565b60405163095ea7b360e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b3906044016020604051808303816000875af115801561020c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102309190610328565b5060405163b66503cf60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063b66503cf90604401600060405180830381600087803b1580156102bb57600080fd5b505af11580156102cf573d6000803e3d6000fd5b505050507f1424c3a24f9b1f30558ab0a7b48e07ce9f7d85b293a69a90356e1478504232eb8160405161030491815260200190565b60405180910390a150565b60006020828403121561032157600080fd5b5051919050565b60006020828403121561033a57600080fd5b8151801515811461034a57600080fd5b939250505056fea2646970667358221220be3423dc8d0fbed78fac4a9ba9ffffd1ce160afea5edaffbc157983105ac7d9764736f6c634300081c00330000000000000000000000002726be050f22b9aff2b582758aeea504cda6fa62000000000000000000000000b1e25689d55734fd3fffc939c4c3eb52dff8a794
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806312c587c51461005157806337d0208c146100955780633978033f1461009f578063ae554cf9146100b9575b600080fd5b6100787f000000000000000000000000b1e25689d55734fd3fffc939c4c3eb52dff8a79481565b6040516001600160a01b0390911681526020015b60405180910390f35b61009d6100e0565b005b6100ab6402540be40081565b60405190815260200161008c565b6100787f0000000000000000000000002726be050f22b9aff2b582758aeea504cda6fa6281565b6040516370a0823160e01b81523060048201526000907f000000000000000000000000b1e25689d55734fd3fffc939c4c3eb52dff8a7946001600160a01b0316906370a0823190602401602060405180830381865afa158015610147573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061016b919061030f565b90506402540be40081101561017d5750565b60405163095ea7b360e01b81526001600160a01b037f0000000000000000000000002726be050f22b9aff2b582758aeea504cda6fa6281166004830152602482018390527f000000000000000000000000b1e25689d55734fd3fffc939c4c3eb52dff8a794169063095ea7b3906044016020604051808303816000875af115801561020c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102309190610328565b5060405163b66503cf60e01b81526001600160a01b037f000000000000000000000000b1e25689d55734fd3fffc939c4c3eb52dff8a79481166004830152602482018390527f0000000000000000000000002726be050f22b9aff2b582758aeea504cda6fa62169063b66503cf90604401600060405180830381600087803b1580156102bb57600080fd5b505af11580156102cf573d6000803e3d6000fd5b505050507f1424c3a24f9b1f30558ab0a7b48e07ce9f7d85b293a69a90356e1478504232eb8160405161030491815260200190565b60405180910390a150565b60006020828403121561032157600080fd5b5051919050565b60006020828403121561033a57600080fd5b8151801515811461034a57600080fd5b939250505056fea2646970667358221220be3423dc8d0fbed78fac4a9ba9ffffd1ce160afea5edaffbc157983105ac7d9764736f6c634300081c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000002726be050f22b9aff2b582758aeea504cda6fa62000000000000000000000000b1e25689d55734fd3fffc939c4c3eb52dff8a794
-----Decoded View---------------
Arg [0] : _bribeContract (address): 0x2726Be050f22B9aFF2b582758aeEa504cDa6fA62
Arg [1] : _osToken (address): 0xb1e25689D55734FD3ffFc939c4C3Eb52DFf8A794
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000002726be050f22b9aff2b582758aeea504cda6fa62
Arg [1] : 000000000000000000000000b1e25689d55734fd3fffc939c4c3eb52dff8a794
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.