Compare commits
5 Commits
655cec97e0
...
4c8eb63c38
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4c8eb63c38 | ||
|
|
8adccd2739 | ||
|
|
e2ae92563e | ||
|
|
a3fd8bee16 | ||
|
|
1a91b64024 |
4
artifacts/contracts/p2pix.sol/P2PIX.dbg.json
Normal file
4
artifacts/contracts/p2pix.sol/P2PIX.dbg.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"_format": "hh-sol-dbg-1",
|
||||
"buildInfo": "../../build-info/eceac9979aa58fac0d83cf0060ae7a91.json"
|
||||
}
|
||||
1134
artifacts/contracts/p2pix.sol/P2PIX.json
Normal file
1134
artifacts/contracts/p2pix.sol/P2PIX.json
Normal file
File diff suppressed because one or more lines are too long
@@ -150,10 +150,12 @@ contract P2PIX is BaseUtils {
|
||||
uint256 bal = getBalance(args.seller, args.token);
|
||||
if (bal < args.amount) revert NotEnoughTokens();
|
||||
|
||||
uint256 c = lockCounter + 1;
|
||||
unchecked {
|
||||
lockID = ++lockCounter;
|
||||
}
|
||||
|
||||
if (
|
||||
mapLocks[c].expirationBlock >= block.number
|
||||
mapLocks[lockID].expirationBlock >= block.number
|
||||
) revert NotExpired();
|
||||
|
||||
address sender; uint256 forwarder;
|
||||
@@ -178,7 +180,7 @@ contract P2PIX is BaseUtils {
|
||||
}
|
||||
|
||||
DT.Lock memory l = DT.Lock(
|
||||
c,
|
||||
lockID,
|
||||
(block.number + defaultLockBlocks),
|
||||
_pixTarget,
|
||||
args.amount,
|
||||
@@ -383,12 +385,10 @@ contract P2PIX is BaseUtils {
|
||||
function _addLock(
|
||||
uint256 _bal,
|
||||
DT.Lock memory _l
|
||||
) internal returns(uint256 counter){
|
||||
) internal {
|
||||
mapLocks[_l.counter] = _l;
|
||||
|
||||
_decBal(_bal, _l.amount, ERC20(_l.token), _l.seller);
|
||||
++lockCounter;
|
||||
counter = _l.counter;
|
||||
|
||||
emit LockAdded(
|
||||
_l.buyerAddress,
|
||||
|
||||
Reference in New Issue
Block a user