Links
🛡

ArbPad Token ✨

To create a transparent ecosystem of DeFi services by leveraging on-chain transactions with know-your-customer (KYC) regulations. This will allow users to participate not only in late-stage IDO deals.
Category: Launchpad
Networks: Arbitrum Network
Smart Contract Details
Team KYC
Audit Certificate
Links
Token Name: ArbPad
Token Ticker: ABP
Contract Address: 0xc6A69ad47B79097CC5155c46cafa55011ad4aeeD
1
// SPDX-License-Identifier: MIT
2
3
pragma solidity ^0.8.0;
4
5
// CAUTION
6
// This version of SafeMath should only be used with Solidity 0.8 or later,
7
// because it relies on the compiler's built in overflow checks.
8
9
/**
10
* @dev Wrappers over Solidity's arithmetic operations.
11
*
12
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
13
* now has built in overflow checking.
14
*/
15
library SafeMath {
16
/**
17
* @dev Returns the addition of two unsigned integers, with an overflow flag.
18
*
19
* _Available since v3.4._
20
*/
21
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
22
unchecked {
23
uint256 c = a + b;
24
if (c < a) return (false, 0);
25
return (true, c);
26
}
27
}
28
29
/**
30
* @dev Returns the subtraction of two unsigned integers, with an overflow flag.
31
*
32
* _Available since v3.4._
33
*/
34
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
35
unchecked {
36
if (b > a) return (false, 0);
37
return (true, a - b);
38
}
39
}
40
41
/**
42
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
43
*
44
* _Available since v3.4._
45
*/
46
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
47
unchecked {
48
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
49
// benefit is lost if 'b' is also tested.
50
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
51
if (a == 0) return (true, 0);
52
uint256 c = a * b;
53
if (c / a != b) return (false, 0);
54
return (true, c);
55
}
56
}
57
58
/**
59
* @dev Returns the division of two unsigned integers, with a division by zero flag.
60
*
61
* _Available since v3.4._
62
*/
63
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
64
unchecked {
65
if (b == 0) return (false, 0);
66
return (true, a / b);
67
}
68
}
69
70
/**
71
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
72
*
73
* _Available since v3.4._
74
*/
75
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
76
unchecked {
77
if (b == 0) return (false, 0);
78
return (true, a % b);
79
}
80
}
81
82
/**
83
* @dev Returns the addition of two unsigned integers, reverting on
84
* overflow.
85
*
86
* Counterpart to Solidity's `+` operator.
87
*
88
* Requirements:
89
*
90
* - Addition cannot overflow.
91
*/
92
function add(uint256 a, uint256 b) internal pure returns (uint256) {
93
return a + b;
94
}
95
96
/**
97
* @dev Returns the subtraction of two unsigned integers, reverting on
98
* overflow (when the result is negative).
99
*
100
* Counterpart to Solidity's `-` operator.
101
*
102
* Requirements:
103
*
104
* - Subtraction cannot overflow.
105
*/
106
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
107
return a - b;
108
}
109
110
/**
111
* @dev Returns the multiplication of two unsigned integers, reverting on
112
* overflow.
113
*
114
* Counterpart to Solidity's `*` operator.
115
*
116
* Requirements:
117
*
118
* - Multiplication cannot overflow.
119
*/
120
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
121
return a * b;
122
}
123
124
/**
125
* @dev Returns the integer division of two unsigned integers, reverting on
126
* division by zero. The result is rounded towards zero.
127
*
128
* Counterpart to Solidity's `/` operator.
129
*
130
* Requirements:
131
*
132
* - The divisor cannot be zero.
133
*/
134
function div(uint256 a, uint256 b) internal pure returns (uint256) {
135
return a / b;
136
}
137
138
/**
139
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
140
* reverting when dividing by zero.
141
*
142
* Counterpart to Solidity's `%` operator. This function uses a `revert`
143
* opcode (which leaves remaining gas untouched) while Solidity uses an
144
* invalid opcode to revert (consuming all remaining gas).
145
*
146
* Requirements:
147
*
148
* - The divisor cannot be zero.
149
*/
150
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
151
return a % b;
152
}
153
154
/**
155
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
156
* overflow (when the result is negative).
157
*
158
* CAUTION: This function is deprecated because it requires allocating memory for the error
159
* message unnecessarily. For custom revert reasons use {trySub}.
160
*
161
* Counterpart to Solidity's `-` operator.
162
*
163
* Requirements:
164
*
165
* - Subtraction cannot overflow.
166
*/
167
function sub(
168
uint256 a,
169
uint256 b,
170
string memory errorMessage
171
) internal pure returns (uint256) {
172
unchecked {
173
require(b <= a, errorMessage);
174
return a - b;
175
}
176
}
177
178
/**
179
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
180
* division by zero. The result is rounded towards zero.
181
*
182
* Counterpart to Solidity's `/` operator. Note: this function uses a
183
* `revert` opcode (which leaves remaining gas untouched) while Solidity
184
* uses an invalid opcode to revert (consuming all remaining gas).
185
*
186
* Requirements:
187
*
188
* - The divisor cannot be zero.
189
*/
190
function div(
191
uint256 a,
192
uint256 b,
193
string memory errorMessage
194
) internal pure returns (uint256) {
195
unchecked {
196
require(b > 0, errorMessage);
197
return a / b;
198
}
199
}
200
201
/**
202
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
203
* reverting with custom message when dividing by zero.
204
*
205
* CAUTION: This function is deprecated because it requires allocating memory for the error
206
* message unnecessarily. For custom revert reasons use {tryMod}.
207
*
208
* Counterpart to Solidity's `%` operator. This function uses a `revert`
209
* opcode (which leaves remaining gas untouched) while Solidity uses an
210
* invalid opcode to revert (consuming all remaining gas).
211
*
212
* Requirements:
213
*
214
* - The divisor cannot be zero.
215
*/
216
function mod(
217
uint256 a,
218
uint256 b,
219
string memory errorMessage
220
) internal pure returns (uint256) {
221
unchecked {
222
require(b > 0, errorMessage);
223
return a % b;
224
}
225
}
226
}
227
228
229
230
231
pragma solidity ^0.8.0;
232
233
/**
234
* @dev Provides information about the current execution context, including the
235
* sender of the transaction and its data. While these are generally available
236
* via msg.sender and msg.data, they should not be accessed in such a direct
237
* manner, since when dealing with meta-transactions the account sending and
238
* paying for execution may not be the actual sender (as far as an application
239
* is concerned).
240
*
241
* This contract is only required for intermediate, library-like contracts.
242
*/
243
abstract contract Context {
244
function _msgSender() internal view virtual returns (address) {
245
return msg.sender;
246
}
247
248
function _msgData() internal view virtual returns (bytes calldata) {
249
return msg.data;
250
}
251
}
252
253
254
255
256
pragma solidity ^0.8.0;
257
258
/**
259
* @dev Contract module which provides a basic access control mechanism, where
260
* there is an account (an owner) that can be granted exclusive access to
261
* specific functions.
262
*
263
* By default, the owner account will be the one that deploys the contract. This
264
* can later be changed with {transferOwnership}.
265
*
266
* This module is used through inheritance. It will make available the modifier
267
* `onlyOwner`, which can be applied to your functions to restrict their use to
268
* the owner.
269
*/
270
abstract contract Ownable is Context {
271
address private _owner;
272
273
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
274
275
/**
276
* @dev Initializes the contract setting the deployer as the initial owner.
277
*/
278
constructor() {
279
_transferOwnership(_msgSender());
280
}
281
282
/**
283
* @dev Returns the address of the current owner.
284
*/
285
function owner() public view virtual returns (address) {
286
return _owner;
287
}
288
289
/**
290
* @dev Throws if called by any account other than the owner.
291
*/
292
modifier onlyOwner() {
293
require(owner() == _msgSender(), "Ownable: caller is not the owner");
294
_;
295
}
296
297
/**
298
* @dev Leaves the contract without owner. It will not be possible to call
299
* `onlyOwner` functions anymore. Can only be called by the current owner.
300
*
301
* NOTE: Renouncing ownership will leave the contract without an owner,
302
* thereby removing any functionality that is only available to the owner.
303
*/
304
function renounceOwnership() public virtual onlyOwner {
305
_transferOwnership(address(0));
306
}
307
308
/**
309
* @dev Transfers ownership of the contract to a new account (`newOwner`).
310
* Can only be called by the current owner.
311
*/
312
function transferOwnership(address newOwner) public virtual onlyOwner {
313
require(newOwner != address(0), "Ownable: new owner is the zero address");
314
_transferOwnership(newOwner);
315
}
316
317
/**
318
* @dev Transfers ownership of the contract to a new account (`newOwner`).
319
* Internal function without access restriction.
320
*/
321
function _transferOwnership(address newOwner) internal virtual {
322
address oldOwner = _owner;
323
_owner = newOwner;
324
emit OwnershipTransferred(oldOwner, newOwner);
325
}
326
}
327
328
329
330
331
pragma solidity ^0.8.0;
332
333
/**
334
* @dev Interface of the ERC20 standard as defined in the EIP.
335
*/
336
interface IERC20 {
337
/**
338
* @dev Emitted when `value` tokens are moved from one account (`from`) to
339
* another (`to`).
340
*
341
* Note that `value` may be zero.
342
*/
343
event Transfer(address indexed from, address indexed to, uint256 value);
344
345
/**
346
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
347
* a call to {approve}. `value` is the new allowance.
348
*/
349
event Approval(address indexed owner, address indexed spender, uint256 value);
350
351
/**
352
* @dev Returns the amount of tokens in existence.
353
*/
354
function totalSupply() external view returns (uint256);
355
356
/**
357
* @dev Returns the amount of tokens owned by `account`.
358
*/
359
function balanceOf(address account) external view returns (uint256);
360
361
/**
362
* @dev Moves `amount` tokens from the caller's account to `to`.
363
*
364
* Returns a boolean value indicating whether the operation succeeded.
365
*
366
* Emits a {Transfer} event.
367
*/
368
function transfer(address to, uint256 amount) external returns (bool);
369
370
/**
371
* @dev Returns the remaining number of tokens that `spender` will be
372
* allowed to spend on behalf of `owner` through {transferFrom}. This is
373
* zero by default.
374
*
375
* This value changes when {approve} or {transferFrom} are called.
376
*/
377
function allowance(address owner, address spender) external view returns (uint256);
378
379
/**
380
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
381
*
382
* Returns a boolean value indicating whether the operation succeeded.
383
*
384
* IMPORTANT: Beware that changing an allowance with this method brings the risk
385
* that someone may use both the old and the new allowance by unfortunate
386
* transaction ordering. One possible solution to mitigate this race
387
* condition is to first reduce the spender's allowance to 0 and set the
388
* desired value afterwards:
389
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
390
*
391
* Emits an {Approval} event.
392
*/
393
function approve(address spender, uint256 amount) external returns (bool);
394
395
/**
396
* @dev Moves `amount` tokens from `from` to `to` using the
397
* allowance mechanism. `amount` is then deducted from the caller's
398
* allowance.
399
*
400
* Returns a boolean value indicating whether the operation succeeded.
401
*
402
* Emits a {Transfer} event.
403
*/
404
function transferFrom(
405
address from,
406
address to,
407
uint256 amount
408
) external returns (bool);
409
}
410
411
412
413
414
pragma solidity ^0.8.0;
415
416
/**
417
* @dev Interface for the optional metadata functions from the ERC20 standard.
418
*
419
* _Available since v4.1._
420
*/
421
interface IERC20Metadata is IERC20 {
422
/**
423
* @dev Returns the name of the token.
424
*/
425
function name() external view returns (string memory);
426
427
/**
428
* @dev Returns the symbol of the token.
429
*/
430
function symbol() external view returns (string memory);
431
432
/**
433
* @dev Returns the decimals places of the token.
434
*/
435
function decimals() external view returns (uint8);
436
}
437
438
439
440
441
pragma solidity ^0.8.0;
442
443
444
445
/**
446
* @dev Implementation of the {IERC20} interface.
447
*
448
* This implementation is agnostic to the way tokens are created. This means
449
* that a supply mechanism has to be added in a derived contract using {_mint}.
450
* For a generic mechanism see {ERC20PresetMinterPauser}.
451
*
452
* TIP: For a detailed writeup see our guide
453
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
454
* to implement supply mechanisms].
455
*
456
* We have followed general OpenZeppelin Contracts guidelines: functions revert
457
* instead returning `false` on failure. This behavior is nonetheless
458
* conventional and does not conflict with the expectations of ERC20
459
* applications.
460
*
461
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
462
* This allows applications to reconstruct the allowance for all accounts just
463
* by listening to said events. Other implementations of the EIP may not emit
464
* these events, as it isn't required by the specification.
465
*
466
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
467
* functions have been added to mitigate the well-known issues around setting
468
* allowances. See {IERC20-approve}.
469
*/
470
contract ERC20 is Context, IERC20, IERC20Metadata {
471
mapping(address => uint256) private _balances;
472
473
mapping(address => mapping(address => uint256)) private _allowances;
474
475
uint256 private _totalSupply;
476
477
string private _name;
478
string private _symbol;
479
480
/**
481
* @dev Sets the values for {name} and {symbol}.
482
*
483
* The default value of {decimals} is 18. To select a different value for
484
* {decimals} you should overload it.
485
*
486
* All two of these values are immutable: they can only be set once during
487
* construction.
488
*/
489
constructor(string memory name_, string memory symbol_) {
490
_name = name_;
491
_symbol = symbol_;
492
}
493
494
/**
495
* @dev Returns the name of the token.
496
*/
497
function name() public view virtual override returns (string memory) {
498
return _name;
499
}
500
501
/**
502
* @dev Returns the symbol of the token, usually a shorter version of the
503
* name.
504
*/
505
function symbol() public view virtual override returns (string memory) {
506
return _symbol;
507
}
508
509
/**
510
* @dev Returns the number of decimals used to get its user representation.
511
* For example, if `decimals` equals `2`, a balance of `505` tokens should
512
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
513
*
514
* Tokens usually opt for a value of 18, imitating the relationship between
515
* Ether and Wei. This is the value {ERC20} uses, unless this function is
516
* overridden;
517
*
518
* NOTE: This information is only used for _display_ purposes: it in
519
* no way affects any of the arithmetic of the contract, including
520
* {IERC20-balanceOf} and {IERC20-transfer}.
521
*/
522
function decimals() public view virtual override returns (uint8) {
523
return 18;
524
}
525
526
/**
527
* @dev See {IERC20-totalSupply}.
528
*/
529
function totalSupply() public view virtual override returns (uint256) {
530
return _totalSupply;
531
}
532
533
/**
534
* @dev See {IERC20-balanceOf}.
535
*/
536
function balanceOf(address account) public view virtual override returns (uint256) {
537
return _balances[account];
538
}
539
540
/**
541
* @dev See {IERC20-transfer}.
542
*
543
* Requirements:
544
*
545
* - `to` cannot be the zero address.
546
* - the caller must have a balance of at least `amount`.
547
*/
548
function transfer(address to, uint256 amount) public virtual override returns (bool) {
549
address owner = _msgSender();
550
_transfer(owner, to, amount);
551
return true;
552
}
553
554
/**
555
* @dev See {IERC20-allowance}.
556
*/
557
function allowance(address owner, address spender) public view virtual override returns (uint256) {
558
return _allowances[owner][spender];
559
}
560
561
/**
562
* @dev See {IERC20-approve}.
563
*
564
* NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
565
* `transferFrom`. This is semantically equivalent to an infinite approval.
566
*
567
* Requirements:
568
*
569
* - `spender` cannot be the zero address.
570
*/
571
function approve(address spender, uint256 amount) public virtual override returns (bool) {
572
address owner = _msgSender();
573
_approve(owner, spender, amount);
574
return true;
575
}
576
577
/**
578
* @dev See {IERC20-transferFrom}.
579
*
580
* Emits an {Approval} event indicating the updated allowance. This is not
581
* required by the EIP. See the note at the beginning of {ERC20}.
582
*
583
* NOTE: Does not update the allowance if the current allowance
584
* is the maximum `uint256`.
585
*
586
* Requirements:
587
*
588
* - `from` and `to` cannot be the zero address.
589
* - `from` must have a balance of at least `amount`.
590
* - the caller must have allowance for ``from``'s tokens of at least
591
* `amount`.
592
*/
593
function transferFrom(
594
address from,
595
address to,
596
uint256 amount
597
) public virtual override returns (bool) {
598
address spender = _msgSender();
599
_spendAllowance(from, spender, amount);
600
_transfer(from, to, amount);
601
return true;
602
}
603
604
/**
605
* @dev Atomically increases the allowance granted to `spender` by the caller.
606
*
607
* This is an alternative to {approve} that can be used as a mitigation for
608
* problems described in {IERC20-approve}.
609
*
610
* Emits an {Approval} event indicating the updated allowance.
611
*
612
* Requirements:
613
*
614
* - `spender` cannot be the zero address.
615
*/
616
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
617
address owner = _msgSender();
618
_approve(owner, spender, allowance(owner, spender) + addedValue);
619
return true;
620
}
621
622
/**
623
* @dev Atomically decreases the allowance granted to `spender` by the caller.
624
*
625
* This is an alternative to {approve} that can be used as a mitigation for
626
* problems described in {IERC20-approve}.
627
*
628
* Emits an {Approval} event indicating the updated allowance.
629
*
630
* Requirements:
631
*
632
* - `spender` cannot be the zero address.
633
* - `spender` must have allowance for the caller of at least
634
* `subtractedValue`.
635
*/
636
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
637
address owner = _msgSender();
638
uint256 currentAllowance = allowance(owner, spender);
639
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
640
unchecked {
641
_approve(owner, spender, currentAllowance - subtractedValue);
642
}
643
644
return true;
645
}
646
647
/**
648
* @dev Moves `amount` of tokens from `sender` to `recipient`.
649
*
650
* This internal function is equivalent to {transfer}, and can be used to
651
* e.g. implement automatic token fees, slashing mechanisms, etc.
652
*
653
* Emits a {Transfer} event.
654
*
655
* Requirements:
656
*
657
* - `from` cannot be the zero address.
658
* - `to` cannot be the zero address.
659
* - `from` must have a balance of at least `amount`.
660
*/
661
function _transfer(
662
address from,
663
address to,
664
uint256 amount
665
) internal virtual {
666
require(from != address(0), "ERC20: transfer from the zero address");
667
require(to != address(0), "ERC20: transfer to the zero address");
668
669
_beforeTokenTransfer(from, to, amount);
670
671
uint256 fromBalance = _balances[from];
672
require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
673
unchecked {
674
_balances[from] = fromBalance - amount;
675
}
676
_balances[to] += amount;
677
678
emit Transfer(from, to, amount);
679
680
_afterTokenTransfer(from, to, amount);
681
}
682
683
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
684
* the total supply.
685
*
686
* Emits a {Transfer} event with `from` set to the zero address.
687
*
688
* Requirements:
689
*
690
* - `account` cannot be the zero address.
691
*/
692
function _mint(address account, uint256 amount) internal virtual {
693
require(account != address(0), "ERC20: mint to the zero address");
694
695
_beforeTokenTransfer(address(0), account, amount);
696
697
_totalSupply += amount;
698
_balances[account] += amount;
699
emit Transfer(address(0), account, amount);
700
701
_afterTokenTransfer(address(0), account, amount);
702
}
703
704
/**
705
* @dev Destroys `amount` tokens from `account`, reducing the
706
* total supply.
707
*
708
* Emits a {Transfer} event with `to` set to the zero address.
709
*
710
* Requirements:
711
*
712
* - `account` cannot be the zero address.
713
* - `account` must have at least `amount` tokens.
714
*/
715
function _burn(address account, uint256 amount) internal virtual {
716
require(account != address(0), "ERC20: burn from the zero address");
717
718
_beforeTokenTransfer(account, address(0), amount);
719
720
uint256 accountBalance = _balances[account];
721
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
722
unchecked {
723
_balances[account] = accountBalance - amount;
724
}
725
_totalSupply -= amount;
726
727
emit Transfer(account, address(0), amount);
728
729
_afterTokenTransfer(account, address(0), amount);
730
}
731
732
/**
733
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
734
*
735
* This internal function is equivalent to `approve`, and can be used to
736
* e.g. set automatic allowances for certain subsystems, etc.
737
*
738
* Emits an {Approval} event.
739
*
740
* Requirements:
741
*
742
* - `owner` cannot be the zero address.
743
* - `spender` cannot be the zero address.
744
*/
745
function _approve(
746
address owner,
747
address spender,
748
uint256 amount
749
) internal virtual {
750
require(owner != address(0), "ERC20: approve from the zero address");
751
require(spender != address(0), "ERC20: approve to the zero address");
752
753
_allowances[owner][spender] = amount;
754
emit Approval(owner, spender, amount);
755
}
756
757
/**
758
* @dev Updates `owner` s allowance for `spender` based on spent `amount`.
759
*
760
* Does not update the allowance amount in case of infinite allowance.
761
* Revert if not enough allowance is available.
762
*
763
* Might emit an {Approval} event.
764
*/
765
function _spendAllowance(
766
address owner,
767
address spender,
768
uint256 amount
769
) internal virtual {
770
uint256 currentAllowance = allowance(owner, spender);
771
if (currentAllowance != type(uint256).max) {
772
require(currentAllowance >= amount, "ERC20: insufficient allowance");
773
unchecked {
774
_approve(owner, spender, currentAllowance - amount);
775
}
776
}
777
}
778
779
/**
780
* @dev Hook that is called before any transfer of tokens. This includes
781
* minting and burning.
782
*
783
* Calling conditions:
784
*
785
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
786
* will be transferred to `to`.
787
* - when `from` is zero, `amount` tokens will be minted for `to`.
788
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
789
* - `from` and `to` are never both zero.
790
*
791
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
792
*/
793
function _beforeTokenTransfer(
794
address from,
795
address to,
796
uint256 amount
797
) internal virtual {}
798
799
/**
800
* @dev Hook that is called after any transfer of tokens. This includes
801
* minting and burning.
802
*
803
* Calling conditions:
804
*
805
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
806
* has been transferred to `to`.
807
* - when `from` is zero, `amount` tokens have been minted for `to`.
808
* - when `to` is zero, `amount` of ``from``'s tokens have been burned.
809
* - `from` and `to` are never both zero.
810
*
811
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
812
*/
813
function _afterTokenTransfer(
814
address from,
815
address to,
816
uint256 amount
817
) internal virtual {}
818
}
819
820
821
822
823
pragma solidity ^0.8.0;
824
825
interface IUniswapV2Pair {
826
event Approval(address indexed owner, address indexed spender, uint value);
827
event Transfer(address indexed from, address indexed to, uint value);
828
829
function name() external pure returns (string memory);
830
function symbol() external pure returns (string memory);
831
function decimals() external pure returns (uint8);
832
function totalSupply() external view returns (uint);
833
function balanceOf(address owner) external view returns (uint);
834
function allowance(address owner, address spender) external view returns (uint);
835
836
function approve(address spender, uint value) external returns (bool);
837
function transfer(address to, uint value) external returns (bool);
838
function transferFrom(address from, address to, uint value) external returns (bool);
839
840
function DOMAIN_SEPARATOR() external view returns (bytes32);
841
function PERMIT_TYPEHASH() external pure returns (bytes32);
842
function nonces(address owner) external view returns (uint);
843
844
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
845
846
event Mint(address indexed sender, uint amount0, uint amount1);
847
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
848
event Swap(
849
address indexed sender,
850
uint amount0In,
851
uint amount1In,
852
uint amount0Out,
853
uint amount1Out,
854
address indexed to
855
);
856
event Sync(uint112 reserve0, uint112 reserve1);
857
858
function MINIMUM_LIQUIDITY() external pure returns (uint);
859
function factory() external view returns (address);
860
function token0() external view returns (address);
861
function token1() external view returns (address);
862
function getReserves() external