Diff
checker
टेक्स्ट
टेक्स्ट
छवियां
दस्तावेज़
Excel
फ़ोल्डर्स
Legal
Enterprise
डेस्कटॉप
मूल्य
साइन इन करें
Diffchecker डेस्कटॉप डाउनलोड करें
टेक्स्ट की तुलना करें
दो टेक्स्ट फ़ाइलों के बीच अंतर ढूंढें
उपकरण
इतिहास
रियल-टाइम एडिटर
अपरिवर्तित संक्षिप्त करें
लाइन रैप बंद
लेआउट
विभाजित
संयुक्त
परिवर्तन हाइलाइट करें
स्मार्ट
शब्द
अक्षर
सिंटैक्स हाइलाइटिंग
सिंटैक्स चुनें
अनदेखा करें
टेक्स्ट बदलें
पहले अंतर पर जाएँ
इनपुट संपादित करें
Diffchecker Desktop
Diffchecker चलाने का सबसे सुरक्षित तरीका। Diffchecker Desktop ऐप पाएं: आपके diffs कभी आपके कंप्यूटर से बाहर नहीं जाते!
Desktop पाएं
BFactory.sol
बनाया गया
6 वर्ष पहले
Diff कभी समाप्त नहीं होता
साफ़
निर्यात करें
शेयर करें
समझाएं
5 हटाए गए
लाइनें
कुल
हटाया गया
अक्षर
कुल
हटाया गया
इस सुविधा का उपयोग जारी रखने के लिए, अपग्रेड करें
Diff
checker
Pro
मूल्य देखें
80 लाइनें
सभी को कॉपी करें
59 जोड़े गए
लाइनें
कुल
जोड़ा गया
अक्षर
कुल
जोड़ा गया
इस सुविधा का उपयोग जारी रखने के लिए, अपग्रेड करें
Diff
checker
Pro
मूल्य देखें
136 लाइनें
सभी को कॉपी करें
// This program is free software: you can redistribute it and/or modify
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// (at your option) any later version.
// This program is disstributed in the hope that it will be useful,
// This program is disstributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// along with this program. If not, see <http://www.gnu.org/licenses/>.
pragma solidity 0.5.12;
pragma solidity 0.5.12;
// Builds new BPools, logging their addresses and providing `isBPool(address) -> (bool)`
// Builds new BPools, logging their addresses and providing `isBPool(address) -> (bool)`
import "./BPool.sol";
import "./BPool.sol";
contract BFactory is BBronze {
contract BFactory is BBronze {
event LOG_NEW_POOL(
event LOG_NEW_POOL(
address indexed caller,
address indexed caller,
address indexed pool
address indexed pool
);
);
event LOG_BLABS(
event LOG_BLABS(
address indexed caller,
address indexed caller,
address indexed blabs
address indexed blabs
);
);
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
event LOG_RESERVES_ADDRESS(
address indexed caller,
address indexed reservesAddress
);
event LOG_ALLOW_NON_ADMIN_POOL(
address indexed caller,
bool allow
);
mapping(address=>bool) private _isBPool;
mapping(address=>bool) private _isBPool;
function isBPool(address b)
function isBPool(address b)
external view returns (bool)
external view returns (bool)
{
{
return _isBPool[b];
return _isBPool[b];
}
}
function newBPool()
function newBPool()
external
external
returns (BPool)
returns (BPool)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (!_allowNonAdminPool) {
require(msg.sender == _blabs);
}
BPool bpool = new BPool();
BPool bpool = new BPool();
_isBPool[address(bpool)] = true;
_isBPool[address(bpool)] = true;
emit LOG_NEW_POOL(msg.sender, address(bpool));
emit LOG_NEW_POOL(msg.sender, address(bpool));
bpool.setController(msg.sender);
bpool.setController(msg.sender);
return bpool;
return bpool;
}
}
address private _blabs;
address private _blabs;
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
address private _reservesAddress;
bool private _allowNonAdminPool;
constructor() public {
constructor() public {
_blabs = msg.sender;
_blabs = msg.sender;
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
_reservesAddress = msg.sender;
_allowNonAdminPool = false;
}
function getAllowNonAdminPool()
external view
returns (bool)
{
return _allowNonAdminPool;
}
function setAllowNonAdminPool(bool b)
external
{
require(msg.sender == _blabs, "ERR_NOT_BLABS");
emit LOG_ALLOW_NON_ADMIN_POOL(msg.sender, b);
_allowNonAdminPool = b;
}
}
function getBLabs()
function getBLabs()
external view
external view
returns (address)
returns (address)
{
{
return _blabs;
return _blabs;
}
}
function setBLabs(address b)
function setBLabs(address b)
external
external
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
require(msg.sender == _blabs
, "ERR_NOT_BLABS"
);
require(msg.sender == _blabs
);
emit LOG_BLABS(msg.sender, b);
emit LOG_BLABS(msg.sender, b);
_blabs = b;
_blabs = b;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
function getReservesAddress()
external view
returns (address)
{
return _reservesAddress;
}
function setReservesAddress(address a)
external
{
require(msg.sender == _blabs);
emit LOG_RESERVES_ADDRESS(msg.sender, a);
_reservesAddress = a;
}
function collect(BPool pool)
function collect(BPool pool)
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
external
external
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
require(msg.sender == _blabs
, "ERR_NOT_BLABS"
);
require(msg.sender == _blabs
);
require(_isBPool[address(pool)]
);
uint collected = IERC20(pool).balanceOf(address(this));
uint collected = IERC20(pool).balanceOf(address(this));
bool xfer = pool.transfer(_blabs, collected);
bool xfer = pool.transfer(_blabs, collected);
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
require(xfer
, "ERR_ERC20_FAILED");
require(xfer
);
}
function collectTokenReserves(BPool pool)
external
{
require(msg.sender == _blabs);
require(_isBPool[address(pool)]);
pool.drainTotalReserves(_reservesAddress);
}
}
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
सेव किए गए Diffs
ऑरिजनल टेक्स्ट
फ़ाइल खोलें
// This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is disstributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. pragma solidity 0.5.12; // Builds new BPools, logging their addresses and providing `isBPool(address) -> (bool)` import "./BPool.sol"; contract BFactory is BBronze { event LOG_NEW_POOL( address indexed caller, address indexed pool ); event LOG_BLABS( address indexed caller, address indexed blabs ); mapping(address=>bool) private _isBPool; function isBPool(address b) external view returns (bool) { return _isBPool[b]; } function newBPool() external returns (BPool) { BPool bpool = new BPool(); _isBPool[address(bpool)] = true; emit LOG_NEW_POOL(msg.sender, address(bpool)); bpool.setController(msg.sender); return bpool; } address private _blabs; constructor() public { _blabs = msg.sender; } function getBLabs() external view returns (address) { return _blabs; } function setBLabs(address b) external { require(msg.sender == _blabs, "ERR_NOT_BLABS"); emit LOG_BLABS(msg.sender, b); _blabs = b; } function collect(BPool pool) external { require(msg.sender == _blabs, "ERR_NOT_BLABS"); uint collected = IERC20(pool).balanceOf(address(this)); bool xfer = pool.transfer(_blabs, collected); require(xfer, "ERR_ERC20_FAILED"); } }
परिवर्तित टेक्स्ट
फ़ाइल खोलें
// This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is disstributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. pragma solidity 0.5.12; // Builds new BPools, logging their addresses and providing `isBPool(address) -> (bool)` import "./BPool.sol"; contract BFactory is BBronze { event LOG_NEW_POOL( address indexed caller, address indexed pool ); event LOG_BLABS( address indexed caller, address indexed blabs ); event LOG_RESERVES_ADDRESS( address indexed caller, address indexed reservesAddress ); event LOG_ALLOW_NON_ADMIN_POOL( address indexed caller, bool allow ); mapping(address=>bool) private _isBPool; function isBPool(address b) external view returns (bool) { return _isBPool[b]; } function newBPool() external returns (BPool) { if (!_allowNonAdminPool) { require(msg.sender == _blabs); } BPool bpool = new BPool(); _isBPool[address(bpool)] = true; emit LOG_NEW_POOL(msg.sender, address(bpool)); bpool.setController(msg.sender); return bpool; } address private _blabs; address private _reservesAddress; bool private _allowNonAdminPool; constructor() public { _blabs = msg.sender; _reservesAddress = msg.sender; _allowNonAdminPool = false; } function getAllowNonAdminPool() external view returns (bool) { return _allowNonAdminPool; } function setAllowNonAdminPool(bool b) external { require(msg.sender == _blabs, "ERR_NOT_BLABS"); emit LOG_ALLOW_NON_ADMIN_POOL(msg.sender, b); _allowNonAdminPool = b; } function getBLabs() external view returns (address) { return _blabs; } function setBLabs(address b) external { require(msg.sender == _blabs); emit LOG_BLABS(msg.sender, b); _blabs = b; } function getReservesAddress() external view returns (address) { return _reservesAddress; } function setReservesAddress(address a) external { require(msg.sender == _blabs); emit LOG_RESERVES_ADDRESS(msg.sender, a); _reservesAddress = a; } function collect(BPool pool) external { require(msg.sender == _blabs); require(_isBPool[address(pool)]); uint collected = IERC20(pool).balanceOf(address(this)); bool xfer = pool.transfer(_blabs, collected); require(xfer); } function collectTokenReserves(BPool pool) external { require(msg.sender == _blabs); require(_isBPool[address(pool)]); pool.drainTotalReserves(_reservesAddress); } }
अंतर खोजें