false
true
0
PulseChain Testnet v4
Blockchain
Blocks
Blocks
Uncles
Forked Blocks (Reorgs)
Transactions
Confirmed
Pending
Verified contracts
Tokens
All
tPLS
APIs
GraphQL
RPC
Eth RPC
Apps
Testnet V4 Beacon Explorer
PulseX
PulseChain Bridge
Testnet V4 Faucet
Become a Validator
PulseChain
Testnets
Testnet V4
/
Search
/
Search
Connection Lost
New Solidity Smart Contract Verification
Contract Address
The 0x address supplied on contract creation.
Is Yul contract
No
Yes
Select Yes if you want to verify Yul contract.
Contract Name
Must match the name specified in the code. For example, in
contract MyContract {..}
MyContract
is the contract name.
Include nightly builds
No
Yes
Select yes if you want to show nightly builds.
Compiler
The compiler version is specified in
pragma solidity X.X.X
. Use the compiler version rather than the nightly build. If using the Solidity compiler, run
solc —version
to check.
EVM Version
homestead
tangerineWhistle
spuriousDragon
byzantium
constantinople
petersburg
istanbul
berlin
london
paris
shanghai
default
The EVM version the contract is written for. If the bytecode does not match the version, we try to verify using the latest EVM version.
EVM version details
.
Optimization
No
Yes
If you enabled optimization during compilation, select yes.
Optimization runs
Enter the Solidity Contract Code
// SPDX-License-Identifier: MIT pragma solidity 0.6.11; import './Interfaces/IActivePool.sol'; import "./Dependencies/SafeMath.sol"; import "./Dependencies/Ownable.sol"; import "./Dependencies/CheckContract.sol"; import "./Dependencies/console.sol"; /* * The Active Pool holds the PLS collateral and USDL debt (but not USDL tokens) for all active vaults. * * When a vault is liquidated, it's PLS and USDL debt are transferred from the Active Pool, to either the * Stability Pool, the Default Pool, or both, depending on the liquidation conditions. * */ contract ActivePool is Ownable, CheckContract, IActivePool { using SafeMath for uint256; string constant public NAME = "ActivePool"; address public borrowerOperationsAddress; address public vaultManagerAddress; address public stabilityPoolAddress; address public defaultPoolAddress; uint256 internal PLS; // deposited pulse tracker uint256 internal USDLDebt; // --- Events --- event BorrowerOperationsAddressChanged(address _newBorrowerOperationsAddress); event VaultManagerAddressChanged(address _newVaultManagerAddress); event ActivePoolUSDLDebtUpdated(uint _USDLDebt); event ActivePoolPLSBalanceUpdated(uint _PLS); // --- Contract setters --- function setAddresses( address _borrowerOperationsAddress, address _vaultManagerAddress, address _stabilityPoolAddress, address _defaultPoolAddress ) external onlyOwner { checkContract(_borrowerOperationsAddress); checkContract(_vaultManagerAddress); checkContract(_stabilityPoolAddress); checkContract(_defaultPoolAddress); borrowerOperationsAddress = _borrowerOperationsAddress; vaultManagerAddress = _vaultManagerAddress; stabilityPoolAddress = _stabilityPoolAddress; defaultPoolAddress = _defaultPoolAddress; emit BorrowerOperationsAddressChanged(_borrowerOperationsAddress); emit VaultManagerAddressChanged(_vaultManagerAddress); emit StabilityPoolAddressChanged(_stabilityPoolAddress); emit DefaultPoolAddressChanged(_defaultPoolAddress); _renounceOwnership(); } // --- Getters for public variables. Required by IPool interface --- /* * Returns the PLS state variable. * *Not necessarily equal to the the contract's raw PLS balance - pulse can be forcibly sent to contracts. */ function getPLS() external view override returns (uint) { return PLS; } function getUSDLDebt() external view override returns (uint) { return USDLDebt; } // --- Pool functionality --- function sendPLS(address _account, uint _amount) external override { _requireCallerIsBOorVaultMorSP(); PLS = PLS.sub(_amount); emit ActivePoolPLSBalanceUpdated(PLS); emit PulseSent(_account, _amount); (bool success, ) = _account.call{ value: _amount }(""); require(success, "ActivePool: sending PLS failed"); } function increaseUSDLDebt(uint _amount) external override { _requireCallerIsBOorVaultM(); USDLDebt = USDLDebt.add(_amount); ActivePoolUSDLDebtUpdated(USDLDebt); } function decreaseUSDLDebt(uint _amount) external override { _requireCallerIsBOorVaultMorSP(); USDLDebt = USDLDebt.sub(_amount); ActivePoolUSDLDebtUpdated(USDLDebt); } // --- 'require' functions --- function _requireCallerIsBorrowerOperationsOrDefaultPool() internal view { require( msg.sender == borrowerOperationsAddress || msg.sender == defaultPoolAddress, "ActivePool: Caller is neither BO nor Default Pool"); } function _requireCallerIsBOorVaultMorSP() internal view { require( msg.sender == borrowerOperationsAddress || msg.sender == vaultManagerAddress || msg.sender == stabilityPoolAddress, "ActivePool: Caller is neither BorrowerOperations nor VaultManager nor StabilityPool"); } function _requireCallerIsBOorVaultM() internal view { require( msg.sender == borrowerOperationsAddress || msg.sender == vaultManagerAddress, "ActivePool: Caller is neither BorrowerOperations nor VaultManager"); } // --- Fallback function --- receive() external payable { _requireCallerIsBorrowerOperationsOrDefaultPool(); PLS = PLS.add(msg.value); emit ActivePoolPLSBalanceUpdated(PLS); } } // 2022 Liquid Loans
We recommend using flattened code. This is necessary if your code utilizes a library or inherits dependencies. Use the
POA solidity flattener or the
truffle flattener
.
Try to fetch constructor arguments automatically
No
Yes
ABI-encoded Constructor Arguments (if required by the contract)
Add arguments in
ABI hex encoded form
. Constructor arguments are written right to left, and will be found at the end of the input created bytecode. They may also be
parsed here.
Add Contract Libraries
Contract Libraries
Library 1 Name
A library name called in the .sol file. Multiple libraries (up to 10) may be added for each contract. Click the Add Library button to add an additional one.
Library 1 Address
The 0x library address. This can be found in the generated json file or Truffle output (if using truffle).
Library 2 Name
Library 2 Address
Library 3 Name
Library 3 Address
Library 4 Name
Library 4 Address
Library 5 Name
Library 5 Address
Library 6 Name
Library 6 Address
Library 7 Name
Library 7 Address
Library 8 Name
Library 8 Address
Library 9 Name
Library 9 Address
Library 10 Name
Library 10 Address
Add Library
Loading...
Verify & publish
Cancel
Ok
Ok
Ok
No
Yes