Links
🛡

CoreArbitrum Token

Core ARB will become an attractive option for those who want to participate in the decentralized system. A place to connect, secure and store the Aribtrum network.
Category: DeFi
Networks: Arbitrum Network
Website: https://corearb.org/​
Smart Contract Details
Team KYC
Audit Certificate
Links
Token Name: CoreArbitrum
Token Ticker: CORE ARB
Contract Address: 0x8ed26F0f7bBC7AbC1f6cDbc2a129504B466c6b84
1
/**
2
*Submitted for verification at Arbiscan on 2023-02-22
3
*/
4
​
5
/**
6
* Website: https://corearb.org/
7
* Telegram: https://t.me/corearb
8
* Twitter: https://twitter.com/CoreArbitrum
9
* Whitepaper: https://corearb.gitbook.io/whitepaper/
10
*/
11
​
12
// SPDX-License-Identifier: Unlicensed
13
​
14
pragma solidity 0.8.13;
15
​
16
/**
17
* Standard SafeMath, stripped down to just add/sub/mul/div
18
*/
19
library SafeMath {
20
function add(uint256 a, uint256 b) internal pure returns (uint256) {
21
uint256 c = a + b;
22
require(c >= a, "SafeMath: addition overflow");
23
​
24
return c;
25
}
26
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
27
return sub(a, b, "SafeMath: subtraction overflow");
28
}
29
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
30
require(b <= a, errorMessage);
31
uint256 c = a - b;
32
​
33
return c;
34
}
35
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
36
if (a == 0) {
37
return 0;
38
}
39
​
40
uint256 c = a * b;
41
require(c / a == b, "SafeMath: multiplication overflow");
42
​
43
return c;
44
}
45
function div(uint256 a, uint256 b) internal pure returns (uint256) {
46
return div(a, b, "SafeMath: division by zero");
47
}
48
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
49
// Solidity only automatically asserts when dividing by 0
50
require(b > 0, errorMessage);
51
uint256 c = a / b;
52
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
53
​
54
return c;
55
}
56
}
57
​
58
/**
59
* ERC20 standard interface.
60
*/
61
interface IERC20 {
62
function totalSupply() external view returns (uint256);
63
function decimals() external view returns (uint8);
64
function symbol() external view returns (string memory);
65
function name() external view returns (string memory);
66
function getOwner() external view returns (address);
67
function balanceOf(address account) external view returns (uint256);
68
function transfer(address recipient, uint256 amount) external returns (bool);
69
function allowance(address _owner, address spender) external view returns (uint256);
70
function approve(address spender, uint256 amount) external returns (bool);
71
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
72
event Transfer(address indexed from, address indexed to, uint256 value);
73
event Approval(address indexed owner, address indexed spender, uint256 value);
74
}
75
​
76
/**
77
* Allows for contract ownership along with multi-address authorization
78
*/
79
abstract contract Auth {
80
address internal owner;
81
mapping (address => bool) internal authorizations;
82
​
83
constructor(address _owner) {
84
owner = _owner;
85
authorizations[_owner] = true;
86
}
87
​
88
/**
89
* Function modifier to require caller to be contract owner
90
*/
91
modifier onlyOwner() {
92
require(isOwner(msg.sender), "!OWNER"); _;
93
}
94
​
95
/**
96
* Function modifier to require caller to be authorized
97
*/
98
modifier authorized() {
99
require(isAuthorized(msg.sender), "!AUTHORIZED"); _;
100
}
101
​
102
/**
103
* Authorize address. Owner only
104
*/
105
function authorize(address adr) public onlyOwner {
106
authorizations[adr] = true;
107
}
108
​
109
/**
110
* Remove address' authorization. Owner only
111
*/
112
function unauthorize(address adr) public onlyOwner {
113
authorizations[adr] = false;
114
}
115
​
116
/**
117
* Check if address is owner
118
*/
119
function isOwner(address account) public view returns (bool) {
120
return account == owner;
121
}
122
​
123
/**
124
* Return address' authorization status
125
*/
126
function isAuthorized(address adr) public view returns (bool) {
127
return authorizations[adr];
128
}
129
​
130
/**
131
* Transfer ownership to new address. Caller must be owner. Leaves old owner authorized
132
*/
133
function transferOwnership(address payable adr) public onlyOwner {
134
owner = adr;
135
authorizations[adr] = true;
136
emit OwnershipTransferred(adr);
137
}
138
​
139
event OwnershipTransferred(address owner);
140
}
141
​
142
interface IDEXFactory {
143
function createPair(address tokenA, address tokenB) external returns (address pair);
144
}
145
​
146
interface IDEXRouter {
147
function factory() external pure returns (address);
148
function WETH() external pure returns (address);
149
​
150
function addLiquidity(
151
address tokenA,
152
address tokenB,
153
uint amountADesired,
154
uint amountBDesired,
155
uint amountAMin,
156
uint amountBMin,
157
address to,
158
uint deadline
159
) external returns (uint amountA, uint amountB, uint liquidity);
160
​
161
function addLiquidityETH(
162
address token,
163
uint amountTokenDesired,
164
uint amountTokenMin,
165
uint amountETHMin,
166
address to,
167
uint deadline
168
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
169
​
170
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
171
uint amountIn,
172
uint amountOutMin,
173
address[] calldata path,
174
address to,
175
uint deadline
176
) external;
177
​
178
function swapExactETHForTokensSupportingFeeOnTransferTokens(
179
uint amountOutMin,
180
address[] calldata path,
181
address to,
182
uint deadline
183
) external payable;
184
​
185
function swapExactTokensForETHSupportingFeeOnTransferTokens(
186
uint amountIn,
187
uint amountOutMin,
188
address[] calldata path,
189
address to,
190
uint deadline
191
) external;
192
}
193
​
194
​
195
contract CoreArbitrum is IERC20, Auth {
196
using SafeMath for uint256;
197
​
198
address private WETH;
199
address private DEAD = 0x000000000000000000000000000000000000dEaD;
200
address private ZERO = 0x0000000000000000000000000000000000000000;
201
​
202
string private constant _name = "Core ARB";
203
string private constant _symbol = "CORE ARB";
204
uint8 private constant _decimals = 9;
205
​
206
uint256 private _totalSupply = 1000000000 * (10 ** _decimals);
207
//max wallet holding of 1%
208
uint256 public _maxTokenPerWallet = ( _totalSupply * 1 ) / 100;
209
​
210
mapping (address => uint256) private _balances;
211
mapping (address => mapping (address => uint256)) private _allowances;
212
mapping (address => uint256) private cooldown;
213
​
214
mapping (address => bool) private isFeeExempt;
215
mapping (address => bool) isTxLimitExempt;
216
mapping (address => bool) isTimelockExempt;
217
218
uint256 public buyFeeRate = 8;
219
uint256 public sellFeeRate = 20;
220
​
221
uint256 private feeDenominator = 100;
222
​
223
address payable public marketingWallet = payable(0x4938Bd14A1a9B9C97120dbaf302B14dB4256Aa69);
224
​
225
IDEXRouter public router;
226
address public pair;
227
​
228
uint256 public launchedAt;
229
bool private tradingOpen;
230
bool private limitEffect = true;
231
​
232
uint256 private maxBuyTransaction = ( _totalSupply * 5 ) / 1000; // 0.5% max tx
233
uint256 public numTokensSellToAddToLiquidity = _totalSupply * 5 / 10000; // 0.05% swap wallet
234
235
bool public maxWalletEnabled = true;
236
bool private inSwap;
237
​
238
// Cooldown & timer functionality
239
bool public buyCooldownEnabled = false;
240
uint8 public cooldownTimerInterval = 15;
241
​
242
mapping (address => uint) private cooldownTimer;
243
​
244
modifier swapping() { inSwap = true; _; inSwap = false; }
245
​
246
constructor () Auth(msg.sender) {
247
router = IDEXRouter(0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506);
248
249
WETH = router.WETH();
250
251
pair = IDEXFactory(router.factory()).createPair(WETH, address(this));
252
253
_allowances[address(this)][address(router)] = type(uint256).max;
254
​
255
isTxLimitExempt[msg.sender] = true;
256
​
257
isFeeExempt[msg.sender] = true;
258
isFeeExempt[marketingWallet] = true;
259
​
260
isTimelockExempt[msg.sender] = true;
261
isTimelockExempt[DEAD] = true;
262
isTimelockExempt[address(this)] = true;
263
​
264
_balances[msg.sender] = _totalSupply;
265
266
emit Transfer(address(0), msg.sender, _totalSupply);
267
}
268
​
269
receive() external payable { }
270
​
271
function totalSupply() external view override returns (uint256) { return _totalSupply; }
272
function decimals() external pure override returns (uint8) { return _decimals; }
273
function symbol() external pure override returns (string memory) { return _symbol; }
274
function name() external pure override returns (string memory) { return _name; }
275
function getOwner() external view override returns (address) { return owner; }
276
function balanceOf(address account) public view override returns (uint256) { return _balances[account]; }
277
function allowance(address holder, address spender) external view override returns (uint256) { return _allowances[holder][spender]; }
278
​
279
function approve(address spender, uint256 amount) public override returns (bool) {
280
_allowances[msg.sender][spender] = amount;
281
emit Approval(msg.sender, spender, amount);
282
return true;
283
}
284
​
285
function approveMax(address spender) external returns (bool) {
286
return approve(spender, type(uint256).max);
287
}
288
​
289
function transfer(address recipient, uint256 amount) external override returns (bool) {
290
return _transferFrom(msg.sender, recipient, amount);
291
}
292
​
293
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
294
if(_allowances[sender][msg.sender] != type(uint256).max){
295
_allowances[sender][msg.sender] = _allowances[sender][msg.sender].sub(amount, "Insufficient Allowance");
296
}
297
​
298
return _transferFrom(sender, recipient, amount);
299
}
300
​
301
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
302
if(!authorizations[sender] && !authorizations[recipient]){
303
require(tradingOpen, "Trading not yet enabled.");
304
}
305
​
306
if(limitEffect){
307
// Checks max transaction limit
308
require(amount <= maxBuyTransaction || isTxLimitExempt[sender], "TX Limit Exceeded");
309
​
310
// max wallet code
311
if (maxWalletEnabled && !authorizations[sender] && recipient != address(this) && recipient != address(DEAD) && recipient != pair && recipient != marketingWallet){
312
uint256 heldTokens = balanceOf(recipient);
313
require((heldTokens + amount) <= _maxTokenPerWallet,"Total Holding is currently limited, you can not buy that much.");
314
}
315
​
316
// cooldown timer, so a bot doesnt do quick trades! 1min gap between 2 trades.
317
if (sender == pair &&
318
buyCooldownEnabled &&
319
!isTimelockExempt[recipient]) {
320
require(cooldownTimer[recipient] < block.timestamp,"Please wait for 1min between two buys");
321
cooldownTimer[recipient] = block.timestamp + cooldownTimerInterval;
322
}
323
}
324
​
325
if(inSwap){ return _basicTransfer(sender, recipient, amount); }
326
​
327
uint256 contractTokenBalance = balanceOf(address(this));
328
​
329
bool overMinTokenBalance = contractTokenBalance >= numTokensSellToAddToLiquidity;
330
331
bool shouldSwapBack = (overMinTokenBalance && recipient==pair && balanceOf(address(this)) > 0);
332
if(shouldSwapBack){ swapBack(numTokensSellToAddToLiquidity); }
333
​
334
_balances[sender] = _balances[sender].sub(amount, "Insufficient Balance");
335
​
336
uint256 amountReceived = shouldTakeFee(sender, recipient) ? takeFee(sender, recipient, amount) : amount;
337
338
_balances[recipient] = _balances[recipient].add(amountReceived);
339
​
340
emit Transfer(sender, recipient, amountReceived);
341
return true;
342
}
343
344
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
345
_balances[sender] = _balances[sender].sub(amount, "Insufficient Balance");
346
_balances[recipient] = _balances[recipient].add(amount);
347
emit Transfer(sender, recipient, amount);
348
return true;
349
}
350
​
351
function shouldTakeFee(address sender, address recipient) internal view returns (bool) {
352
return ( !(isFeeExempt[sender] || isFeeExempt[recipient]) && (sender == pair || recipient == pair) );
353
}
354
​
355
function takeFee(address sender, address recipient, uint256 amount) internal returns (uint256) {
356
uint256 transferFeeRate = recipient == pair ? sellFeeRate : buyFeeRate;
357
uint256 feeAmount;
358
feeAmount = amount.mul(transferFeeRate).div(feeDenominator);
359
_balances[address(this)] = _balances[address(this)].add(feeAmount);
360
emit Transfer(sender, address(this), feeAmount);
361
​
362
return amount.sub(feeAmount);
363
}
364
​
365
366
function swapBack(uint256 amount) internal swapping {
367
swapTokensForEth(amount);
368
}
369
​
370
371
function swapTokensForEth(uint256 tokenAmount) private {
372
​
373
// generate the uniswap pair path of token -> weth
374
address[] memory path = new address[](2);
375
path[0] = address(this);
376
path[1] = WETH;
377
​
378
// make the swap
379
router.swapExactTokensForETHSupportingFeeOnTransferTokens(
380
tokenAmount,
381
0, // accept any amount of ETH
382
path,
383
marketingWallet,
384
block.timestamp
385
);
386
}
387
​
388
function swapToken() public onlyOwner {
389
​
390
uint256 contractTokenBalance = balanceOf(address(this));
391
​
392
bool overMinTokenBalance = contractTokenBalance >= numTokensSellToAddToLiquidity;
393
394
bool shouldSwapBack = (overMinTokenBalance && balanceOf(address(this)) > 0);
395
if(shouldSwapBack){
396
swapTokensForEth(numTokensSellToAddToLiquidity);
397
}
398
}
399
​
400
function openTrade() external onlyOwner {
401
launchedAt = block.number;
402
tradingOpen = true;
403
}
404
405
406
function setIsFeeExempt(address holder, bool exempt) external onlyOwner {
407
isFeeExempt[holder] = exempt;
408
}
409
​
410
function setFee (uint256 _sellFeeRate, uint256 _buyFeeRate) external onlyOwner {
411
require (_buyFeeRate <= 15, "Fee can't exceed 15%");
412
require (_sellFeeRate <= 20, "Fee can't exceed 20%");
413
sellFeeRate = _sellFeeRate;
414
buyFeeRate = _buyFeeRate;
415
}
416
​
417
function manualBurn(uint256 amount) external onlyOwner returns (bool) {
418
return _basicTransfer(address(this), DEAD, amount);
419
}
420
421
function getCirculatingSupply() public view returns (uint256) {
422
return _totalSupply.sub(balanceOf(DEAD)).sub(balanceOf(ZERO));
423
}
424
​
425
function setMarketingWallet(address _marketingWallet) external onlyOwner {
426
marketingWallet = payable(_marketingWallet);
427
}
428
​
429
function removeLimitEffect() external onlyOwner {
430
limitEffect = false;
431
}
432
​
433
function setMaxWalletEnabled(bool value) external onlyOwner {
434
maxWalletEnabled = value;
435
}
436
​
437
function setSwapThresholdAmount (uint256 amount) external onlyOwner {
438
require (amount <= _totalSupply.div(100), "can't exceed 1%");
439
numTokensSellToAddToLiquidity = amount * 10 ** 9;
440
}
441
​
442
function setMaxBuyAmount (uint256 maxBuyPercent) external onlyOwner {
443
maxBuyTransaction = (_totalSupply * maxBuyPercent ) / 1000;
444
}
445
​
446
function setMaxWalletPercent(uint256 maxWallPercent) external onlyOwner {
447
_maxTokenPerWallet = (_totalSupply * maxWallPercent ) / 100;
448
}
449
​
450
function setIsTxLimitExempt(address holder, bool exempt) external onlyOwner {
451
isTxLimitExempt[holder] = exempt;
452
}
453
​
454
function setIsTimelockExempt(address holder, bool exempt) external onlyOwner {
455
isTimelockExempt[holder] = exempt;
456
}
457
458
// enable cooldown between trades
459
function cooldownEnabled(bool _status, uint8 _interval) public onlyOwner {
460
buyCooldownEnabled = _status;
461
cooldownTimerInterval = _interval;
462
}
463
​
464
function clearStuckBalance(uint256 amountPercentage, address adr) external onlyOwner {
465
uint256 amountETH = address(this).balance;
466
payable(adr).transfer(
467
(amountETH * amountPercentage) / 100
468
);
469
}
470
​
471
function rescueToken(address tokenAddress, uint256 tokens)
472
public
473
onlyOwner
474
returns (bool success)
475
{
476
return IERC20(tokenAddress).transfer(msg.sender, tokens);
477
}
478
​
479
}
​
​