Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
BookSmartCC
Compiler Version
v0.8.13+commit.abaa5c0e
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2023-10-18
*/
/**
*Submitted for verification at Etherscan.io on 2023-08-21
*/
// File: @openzeppelin/contracts/utils/Context.sol
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
// File: @openzeppelin/contracts/access/Ownable.sol
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
// File: BookSmartCC.sol
pragma solidity ^0.8.0;
contract BookSmartCC is Ownable {
event BuyWithCard(address buyer, uint amount, uint time);
address payable public saleAdmin = payable(0x24306170c47bf14CD6C2256358B6Dc8be58DadF8);
function buyWithCard(address _buyer) external payable {
(bool sent, ) = address(saleAdmin).call{value: msg.value}("");
require(sent, "Failed to send Ether");
emit BuyWithCard(_buyer, msg.value, block.timestamp);
}
function changeSaleAdmin(address payable _admin) external onlyOwner {
saleAdmin = _admin;
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"BuyWithCard","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"_buyer","type":"address"}],"name":"buyWithCard","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_admin","type":"address"}],"name":"changeSaleAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleAdmin","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60806040527324306170c47bf14cd6c2256358b6dc8be58dadf8600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555034801561006557600080fd5b5061008261007761008760201b60201c565b61008f60201b60201c565b610153565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b610854806101626000396000f3fe6080604052600436106100555760003560e01c806319729e031461005a578063715018a6146100765780638da5cb5b1461008d578063bfa39152146100b8578063e3de9723146100e3578063f2fde38b1461010c575b600080fd5b610074600480360381019061006f9190610521565b610135565b005b34801561008257600080fd5b5061008b610242565b005b34801561009957600080fd5b506100a2610256565b6040516100af919061055d565b60405180910390f35b3480156100c457600080fd5b506100cd61027f565b6040516100da9190610599565b60405180910390f35b3480156100ef57600080fd5b5061010a600480360381019061010591906105e0565b6102a5565b005b34801561011857600080fd5b50610133600480360381019061012e9190610521565b6102f1565b005b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163460405161017d9061063e565b60006040518083038185875af1925050503d80600081146101ba576040519150601f19603f3d011682016040523d82523d6000602084013e6101bf565b606091505b5050905080610203576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101fa906106b0565b60405180910390fd5b7f0f6ee49635c97f482f5187c5ae66f66c0dd3a28a9db1cdc5bb7d28fb0da8ea9f823442604051610236939291906106e9565b60405180910390a15050565b61024a610374565b61025460006103f2565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6102ad610374565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6102f9610374565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610368576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161035f90610792565b60405180910390fd5b610371816103f2565b50565b61037c6104b6565b73ffffffffffffffffffffffffffffffffffffffff1661039a610256565b73ffffffffffffffffffffffffffffffffffffffff16146103f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103e7906107fe565b60405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600033905090565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006104ee826104c3565b9050919050565b6104fe816104e3565b811461050957600080fd5b50565b60008135905061051b816104f5565b92915050565b600060208284031215610537576105366104be565b5b60006105458482850161050c565b91505092915050565b610557816104e3565b82525050565b6000602082019050610572600083018461054e565b92915050565b6000610583826104c3565b9050919050565b61059381610578565b82525050565b60006020820190506105ae600083018461058a565b92915050565b6105bd81610578565b81146105c857600080fd5b50565b6000813590506105da816105b4565b92915050565b6000602082840312156105f6576105f56104be565b5b6000610604848285016105cb565b91505092915050565b600081905092915050565b50565b600061062860008361060d565b915061063382610618565b600082019050919050565b60006106498261061b565b9150819050919050565b600082825260208201905092915050565b7f4661696c656420746f2073656e64204574686572000000000000000000000000600082015250565b600061069a601483610653565b91506106a582610664565b602082019050919050565b600060208201905081810360008301526106c98161068d565b9050919050565b6000819050919050565b6106e3816106d0565b82525050565b60006060820190506106fe600083018661054e565b61070b60208301856106da565b61071860408301846106da565b949350505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061077c602683610653565b915061078782610720565b604082019050919050565b600060208201905081810360008301526107ab8161076f565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006107e8602083610653565b91506107f3826107b2565b602082019050919050565b60006020820190508181036000830152610817816107db565b905091905056fea2646970667358221220a5bd653414d1446db5f9ae9f1d03376c1c32c7b0f754a243642d95f76f82af1564736f6c634300080d0033
Deployed Bytecode
0x6080604052600436106100555760003560e01c806319729e031461005a578063715018a6146100765780638da5cb5b1461008d578063bfa39152146100b8578063e3de9723146100e3578063f2fde38b1461010c575b600080fd5b610074600480360381019061006f9190610521565b610135565b005b34801561008257600080fd5b5061008b610242565b005b34801561009957600080fd5b506100a2610256565b6040516100af919061055d565b60405180910390f35b3480156100c457600080fd5b506100cd61027f565b6040516100da9190610599565b60405180910390f35b3480156100ef57600080fd5b5061010a600480360381019061010591906105e0565b6102a5565b005b34801561011857600080fd5b50610133600480360381019061012e9190610521565b6102f1565b005b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163460405161017d9061063e565b60006040518083038185875af1925050503d80600081146101ba576040519150601f19603f3d011682016040523d82523d6000602084013e6101bf565b606091505b5050905080610203576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101fa906106b0565b60405180910390fd5b7f0f6ee49635c97f482f5187c5ae66f66c0dd3a28a9db1cdc5bb7d28fb0da8ea9f823442604051610236939291906106e9565b60405180910390a15050565b61024a610374565b61025460006103f2565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6102ad610374565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6102f9610374565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610368576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161035f90610792565b60405180910390fd5b610371816103f2565b50565b61037c6104b6565b73ffffffffffffffffffffffffffffffffffffffff1661039a610256565b73ffffffffffffffffffffffffffffffffffffffff16146103f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103e7906107fe565b60405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600033905090565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006104ee826104c3565b9050919050565b6104fe816104e3565b811461050957600080fd5b50565b60008135905061051b816104f5565b92915050565b600060208284031215610537576105366104be565b5b60006105458482850161050c565b91505092915050565b610557816104e3565b82525050565b6000602082019050610572600083018461054e565b92915050565b6000610583826104c3565b9050919050565b61059381610578565b82525050565b60006020820190506105ae600083018461058a565b92915050565b6105bd81610578565b81146105c857600080fd5b50565b6000813590506105da816105b4565b92915050565b6000602082840312156105f6576105f56104be565b5b6000610604848285016105cb565b91505092915050565b600081905092915050565b50565b600061062860008361060d565b915061063382610618565b600082019050919050565b60006106498261061b565b9150819050919050565b600082825260208201905092915050565b7f4661696c656420746f2073656e64204574686572000000000000000000000000600082015250565b600061069a601483610653565b91506106a582610664565b602082019050919050565b600060208201905081810360008301526106c98161068d565b9050919050565b6000819050919050565b6106e3816106d0565b82525050565b60006060820190506106fe600083018661054e565b61070b60208301856106da565b61071860408301846106da565b949350505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061077c602683610653565b915061078782610720565b604082019050919050565b600060208201905081810360008301526107ab8161076f565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006107e8602083610653565b91506107f3826107b2565b602082019050919050565b60006020820190508181036000830152610817816107db565b905091905056fea2646970667358221220a5bd653414d1446db5f9ae9f1d03376c1c32c7b0f754a243642d95f76f82af1564736f6c634300080d0033
Deployed Bytecode Sourcemap
3714:565:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3915:246;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;2840:103;;;;;;;;;;;;;:::i;:::-;;2199:87;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3820:86;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4169:105;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;3098:201;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;3915:246;3981:9;4004;;;;;;;;;;;3996:23;;4027:9;3996:45;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3980:61;;;4060:4;4052:37;;;;;;;;;;;;:::i;:::-;;;;;;;;;4106:47;4118:6;4126:9;4137:15;4106:47;;;;;;;;:::i;:::-;;;;;;;;3969:192;3915:246;:::o;2840:103::-;2085:13;:11;:13::i;:::-;2905:30:::1;2932:1;2905:18;:30::i;:::-;2840:103::o:0;2199:87::-;2245:7;2272:6;;;;;;;;;;;2265:13;;2199:87;:::o;3820:86::-;;;;;;;;;;;;;:::o;4169:105::-;2085:13;:11;:13::i;:::-;4260:6:::1;4248:9;;:18;;;;;;;;;;;;;;;;;;4169:105:::0;:::o;3098:201::-;2085:13;:11;:13::i;:::-;3207:1:::1;3187:22;;:8;:22;;::::0;3179:73:::1;;;;;;;;;;;;:::i;:::-;;;;;;;;;3263:28;3282:8;3263:18;:28::i;:::-;3098:201:::0;:::o;2364:132::-;2439:12;:10;:12::i;:::-;2428:23;;:7;:5;:7::i;:::-;:23;;;2420:68;;;;;;;;;;;;:::i;:::-;;;;;;;;;2364:132::o;3459:191::-;3533:16;3552:6;;;;;;;;;;;3533:25;;3578:8;3569:6;;:17;;;;;;;;;;;;;;;;;;3633:8;3602:40;;3623:8;3602:40;;;;;;;;;;;;3522:128;3459:191;:::o;750:98::-;803:7;830:10;823:17;;750:98;:::o;88:117:1:-;197:1;194;187:12;334:126;371:7;411:42;404:5;400:54;389:65;;334:126;;;:::o;466:96::-;503:7;532:24;550:5;532:24;:::i;:::-;521:35;;466:96;;;:::o;568:122::-;641:24;659:5;641:24;:::i;:::-;634:5;631:35;621:63;;680:1;677;670:12;621:63;568:122;:::o;696:139::-;742:5;780:6;767:20;758:29;;796:33;823:5;796:33;:::i;:::-;696:139;;;;:::o;841:329::-;900:6;949:2;937:9;928:7;924:23;920:32;917:119;;;955:79;;:::i;:::-;917:119;1075:1;1100:53;1145:7;1136:6;1125:9;1121:22;1100:53;:::i;:::-;1090:63;;1046:117;841:329;;;;:::o;1176:118::-;1263:24;1281:5;1263:24;:::i;:::-;1258:3;1251:37;1176:118;;:::o;1300:222::-;1393:4;1431:2;1420:9;1416:18;1408:26;;1444:71;1512:1;1501:9;1497:17;1488:6;1444:71;:::i;:::-;1300:222;;;;:::o;1528:104::-;1573:7;1602:24;1620:5;1602:24;:::i;:::-;1591:35;;1528:104;;;:::o;1638:142::-;1741:32;1767:5;1741:32;:::i;:::-;1736:3;1729:45;1638:142;;:::o;1786:254::-;1895:4;1933:2;1922:9;1918:18;1910:26;;1946:87;2030:1;2019:9;2015:17;2006:6;1946:87;:::i;:::-;1786:254;;;;:::o;2046:138::-;2127:32;2153:5;2127:32;:::i;:::-;2120:5;2117:43;2107:71;;2174:1;2171;2164:12;2107:71;2046:138;:::o;2190:155::-;2244:5;2282:6;2269:20;2260:29;;2298:41;2333:5;2298:41;:::i;:::-;2190:155;;;;:::o;2351:345::-;2418:6;2467:2;2455:9;2446:7;2442:23;2438:32;2435:119;;;2473:79;;:::i;:::-;2435:119;2593:1;2618:61;2671:7;2662:6;2651:9;2647:22;2618:61;:::i;:::-;2608:71;;2564:125;2351:345;;;;:::o;2702:147::-;2803:11;2840:3;2825:18;;2702:147;;;;:::o;2855:114::-;;:::o;2975:398::-;3134:3;3155:83;3236:1;3231:3;3155:83;:::i;:::-;3148:90;;3247:93;3336:3;3247:93;:::i;:::-;3365:1;3360:3;3356:11;3349:18;;2975:398;;;:::o;3379:379::-;3563:3;3585:147;3728:3;3585:147;:::i;:::-;3578:154;;3749:3;3742:10;;3379:379;;;:::o;3764:169::-;3848:11;3882:6;3877:3;3870:19;3922:4;3917:3;3913:14;3898:29;;3764:169;;;;:::o;3939:170::-;4079:22;4075:1;4067:6;4063:14;4056:46;3939:170;:::o;4115:366::-;4257:3;4278:67;4342:2;4337:3;4278:67;:::i;:::-;4271:74;;4354:93;4443:3;4354:93;:::i;:::-;4472:2;4467:3;4463:12;4456:19;;4115:366;;;:::o;4487:419::-;4653:4;4691:2;4680:9;4676:18;4668:26;;4740:9;4734:4;4730:20;4726:1;4715:9;4711:17;4704:47;4768:131;4894:4;4768:131;:::i;:::-;4760:139;;4487:419;;;:::o;4912:77::-;4949:7;4978:5;4967:16;;4912:77;;;:::o;4995:118::-;5082:24;5100:5;5082:24;:::i;:::-;5077:3;5070:37;4995:118;;:::o;5119:442::-;5268:4;5306:2;5295:9;5291:18;5283:26;;5319:71;5387:1;5376:9;5372:17;5363:6;5319:71;:::i;:::-;5400:72;5468:2;5457:9;5453:18;5444:6;5400:72;:::i;:::-;5482;5550:2;5539:9;5535:18;5526:6;5482:72;:::i;:::-;5119:442;;;;;;:::o;5567:225::-;5707:34;5703:1;5695:6;5691:14;5684:58;5776:8;5771:2;5763:6;5759:15;5752:33;5567:225;:::o;5798:366::-;5940:3;5961:67;6025:2;6020:3;5961:67;:::i;:::-;5954:74;;6037:93;6126:3;6037:93;:::i;:::-;6155:2;6150:3;6146:12;6139:19;;5798:366;;;:::o;6170:419::-;6336:4;6374:2;6363:9;6359:18;6351:26;;6423:9;6417:4;6413:20;6409:1;6398:9;6394:17;6387:47;6451:131;6577:4;6451:131;:::i;:::-;6443:139;;6170:419;;;:::o;6595:182::-;6735:34;6731:1;6723:6;6719:14;6712:58;6595:182;:::o;6783:366::-;6925:3;6946:67;7010:2;7005:3;6946:67;:::i;:::-;6939:74;;7022:93;7111:3;7022:93;:::i;:::-;7140:2;7135:3;7131:12;7124:19;;6783:366;;;:::o;7155:419::-;7321:4;7359:2;7348:9;7344:18;7336:26;;7408:9;7402:4;7398:20;7394:1;7383:9;7379:17;7372:47;7436:131;7562:4;7436:131;:::i;:::-;7428:139;;7155:419;;;:::o
Swarm Source
ipfs://a5bd653414d1446db5f9ae9f1d03376c1c32c7b0f754a243642d95f76f82af15
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.