Merge pull request #3 from PedroCailleret/p2pix-ts
📝 Documentation Added
This commit is contained in:
commit
da18941198
22
README.md
22
README.md
@ -2,6 +2,28 @@
|
|||||||
|
|
||||||
**Repository for P2Pix EVM contracts to be imported by the project.**
|
**Repository for P2Pix EVM contracts to be imported by the project.**
|
||||||
|
|
||||||
|
## SM Dependency Tree
|
||||||
|
|
||||||
|
```rs
|
||||||
|
./contracts/
|
||||||
|
├── DataTypes.sol
|
||||||
|
├── EventAndErrors.sol
|
||||||
|
├── lib
|
||||||
|
│ ├── auth
|
||||||
|
│ │ └── Owned.sol
|
||||||
|
│ ├── mock
|
||||||
|
│ │ └── mockToken.sol
|
||||||
|
│ ├── tokens
|
||||||
|
│ │ └── ERC20.sol
|
||||||
|
│ └── utils
|
||||||
|
│ ├── Counters.sol
|
||||||
|
│ ├── ReentrancyGuard.sol
|
||||||
|
│ └── SafeTransferLib.sol
|
||||||
|
└── p2pix.sol
|
||||||
|
```
|
||||||
|
## Callgraph
|
||||||
|

|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
### Pre Requisites
|
### Pre Requisites
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"_format": "hh-sol-dbg-1",
|
"_format": "hh-sol-dbg-1",
|
||||||
"buildInfo": "../../build-info/6c9bcd31e56d59a208be7520d57707e6.json"
|
"buildInfo": "../../build-info/0d20d1f12753266e5824cbfb8a85b2b2.json"
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"_format": "hh-sol-dbg-1",
|
"_format": "hh-sol-dbg-1",
|
||||||
"buildInfo": "../../build-info/6c9bcd31e56d59a208be7520d57707e6.json"
|
"buildInfo": "../../build-info/0d20d1f12753266e5824cbfb8a85b2b2.json"
|
||||||
}
|
}
|
||||||
|
@ -69,12 +69,6 @@
|
|||||||
"name": "token",
|
"name": "token",
|
||||||
"type": "address"
|
"type": "address"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"indexed": false,
|
|
||||||
"internalType": "uint256",
|
|
||||||
"name": "premium",
|
|
||||||
"type": "uint256"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"indexed": false,
|
"indexed": false,
|
||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
@ -129,6 +123,25 @@
|
|||||||
"name": "DepositWithdrawn",
|
"name": "DepositWithdrawn",
|
||||||
"type": "event"
|
"type": "event"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"anonymous": false,
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"indexed": false,
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "owner",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"indexed": false,
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "amount",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "FundsWithdrawn",
|
||||||
|
"type": "event"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"anonymous": false,
|
"anonymous": false,
|
||||||
"inputs": [
|
"inputs": [
|
||||||
@ -197,25 +210,6 @@
|
|||||||
],
|
],
|
||||||
"name": "LockReturned",
|
"name": "LockReturned",
|
||||||
"type": "event"
|
"type": "event"
|
||||||
},
|
|
||||||
{
|
|
||||||
"anonymous": false,
|
|
||||||
"inputs": [
|
|
||||||
{
|
|
||||||
"indexed": false,
|
|
||||||
"internalType": "address",
|
|
||||||
"name": "owner",
|
|
||||||
"type": "address"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"indexed": false,
|
|
||||||
"internalType": "uint256",
|
|
||||||
"name": "amount",
|
|
||||||
"type": "uint256"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"name": "PremiumsWithdrawn",
|
|
||||||
"type": "event"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"bytecode": "0x",
|
"bytecode": "0x",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"_format": "hh-sol-dbg-1",
|
"_format": "hh-sol-dbg-1",
|
||||||
"buildInfo": "../../../../build-info/6c9bcd31e56d59a208be7520d57707e6.json"
|
"buildInfo": "../../../../build-info/0d20d1f12753266e5824cbfb8a85b2b2.json"
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"_format": "hh-sol-dbg-1",
|
"_format": "hh-sol-dbg-1",
|
||||||
"buildInfo": "../../../../build-info/6c9bcd31e56d59a208be7520d57707e6.json"
|
"buildInfo": "../../../../build-info/0d20d1f12753266e5824cbfb8a85b2b2.json"
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"_format": "hh-sol-dbg-1",
|
"_format": "hh-sol-dbg-1",
|
||||||
"buildInfo": "../../../../build-info/6c9bcd31e56d59a208be7520d57707e6.json"
|
"buildInfo": "../../../../build-info/0d20d1f12753266e5824cbfb8a85b2b2.json"
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"_format": "hh-sol-dbg-1",
|
"_format": "hh-sol-dbg-1",
|
||||||
"buildInfo": "../../../../build-info/6c9bcd31e56d59a208be7520d57707e6.json"
|
"buildInfo": "../../../../build-info/0d20d1f12753266e5824cbfb8a85b2b2.json"
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"_format": "hh-sol-dbg-1",
|
"_format": "hh-sol-dbg-1",
|
||||||
"buildInfo": "../../../../build-info/6c9bcd31e56d59a208be7520d57707e6.json"
|
"buildInfo": "../../../../build-info/0d20d1f12753266e5824cbfb8a85b2b2.json"
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"_format": "hh-sol-dbg-1",
|
"_format": "hh-sol-dbg-1",
|
||||||
"buildInfo": "../../../../build-info/6c9bcd31e56d59a208be7520d57707e6.json"
|
"buildInfo": "../../../../build-info/0d20d1f12753266e5824cbfb8a85b2b2.json"
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"_format": "hh-sol-dbg-1",
|
"_format": "hh-sol-dbg-1",
|
||||||
"buildInfo": "../../build-info/6c9bcd31e56d59a208be7520d57707e6.json"
|
"buildInfo": "../../build-info/0d20d1f12753266e5824cbfb8a85b2b2.json"
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
@ -5,8 +5,6 @@ library DataTypes {
|
|||||||
struct Deposit {
|
struct Deposit {
|
||||||
/// @dev Remaining tokens available.
|
/// @dev Remaining tokens available.
|
||||||
uint256 remaining;
|
uint256 remaining;
|
||||||
/// @dev Premium paid in ETH for priority.
|
|
||||||
uint256 premium;
|
|
||||||
/// @dev The PIX account for the seller receive transactions.
|
/// @dev The PIX account for the seller receive transactions.
|
||||||
string pixTarget;
|
string pixTarget;
|
||||||
address seller;
|
address seller;
|
||||||
@ -24,7 +22,7 @@ library DataTypes {
|
|||||||
uint256 amount;
|
uint256 amount;
|
||||||
/// @dev If not paid at this block will be expired.
|
/// @dev If not paid at this block will be expired.
|
||||||
uint256 expirationBlock;
|
uint256 expirationBlock;
|
||||||
/// @dev Where goes the tokens when validated.
|
/// @dev Where the tokens are sent the when order gets validated.
|
||||||
address targetAddress;
|
address targetAddress;
|
||||||
/// @dev Relayer address that facilitated this transaction.
|
/// @dev Relayer address that facilitated this transaction.
|
||||||
address relayerAddress;
|
address relayerAddress;
|
||||||
|
@ -9,7 +9,6 @@ interface EventAndErrors {
|
|||||||
address indexed seller,
|
address indexed seller,
|
||||||
uint256 depositID,
|
uint256 depositID,
|
||||||
address token,
|
address token,
|
||||||
uint256 premium,
|
|
||||||
uint256 amount
|
uint256 amount
|
||||||
);
|
);
|
||||||
event DepositClosed(
|
event DepositClosed(
|
||||||
@ -35,7 +34,7 @@ interface EventAndErrors {
|
|||||||
address indexed buyer,
|
address indexed buyer,
|
||||||
bytes32 lockId
|
bytes32 lockId
|
||||||
);
|
);
|
||||||
event PremiumsWithdrawn(
|
event FundsWithdrawn(
|
||||||
address owner,
|
address owner,
|
||||||
uint256 amount
|
uint256 amount
|
||||||
);
|
);
|
||||||
@ -49,6 +48,7 @@ interface EventAndErrors {
|
|||||||
/// @dev 0x85d1f726
|
/// @dev 0x85d1f726
|
||||||
error OnlySeller();
|
error OnlySeller();
|
||||||
/// @dev Lock not expired or already released.
|
/// @dev Lock not expired or already released.
|
||||||
|
/// @dev Another lock with same ID is not expired yet.
|
||||||
/// @dev 0xd0404f85
|
/// @dev 0xd0404f85
|
||||||
error NotExpired();
|
error NotExpired();
|
||||||
/// @dev Loop bounds have overflowed.
|
/// @dev Loop bounds have overflowed.
|
||||||
@ -63,7 +63,7 @@ interface EventAndErrors {
|
|||||||
/// @dev Lock already released or returned.
|
/// @dev Lock already released or returned.
|
||||||
/// @dev 0x63b4904e
|
/// @dev 0x63b4904e
|
||||||
error AlreadyReleased();
|
error AlreadyReleased();
|
||||||
/// @dev Transaction already used to unlock payment
|
/// @dev Transaction already used to unlock payment.
|
||||||
/// @dev 0xf490a6ea
|
/// @dev 0xf490a6ea
|
||||||
error TxAlreadyUsed();
|
error TxAlreadyUsed();
|
||||||
/// @dev Signer is not a valid signer.
|
/// @dev Signer is not a valid signer.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
pragma solidity >=0.8.4;
|
pragma solidity >=0.8.4;
|
||||||
|
|
||||||
|
@ -66,26 +66,30 @@ contract P2PIX is
|
|||||||
|
|
||||||
/// ███ Public FX ██████████████████████████████████████████████████████████
|
/// ███ Public FX ██████████████████████████████████████████████████████████
|
||||||
|
|
||||||
// Vendedor precisa mandar token para o smart contract + chave PIX destino. Retorna um DepositID.
|
/// @notice Creates a deposit order based on a seller's
|
||||||
|
/// offer of an amount of ERC20 tokens.
|
||||||
|
/// @dev Seller needs to send his tokens to the P2PIX smart contract.
|
||||||
|
/// @param _pixTarget Pix key destination provided by the offer's seller.
|
||||||
|
/// @return depositID The `uint256` return value provided
|
||||||
|
/// as the deposit identifier.
|
||||||
|
/// @dev Function sighash: 0xbfe07da6.
|
||||||
function deposit(
|
function deposit(
|
||||||
address token,
|
address _token,
|
||||||
uint256 amount,
|
uint256 _amount,
|
||||||
string calldata pixTarget
|
string calldata _pixTarget
|
||||||
)
|
)
|
||||||
public
|
public
|
||||||
payable
|
|
||||||
returns (uint256 depositID)
|
returns (uint256 depositID)
|
||||||
{
|
{
|
||||||
(depositID) = _encodeDepositID();
|
(depositID) = _encodeDepositID();
|
||||||
ERC20 t = ERC20(token);
|
ERC20 t = ERC20(_token);
|
||||||
|
|
||||||
DT.Deposit memory d =
|
DT.Deposit memory d =
|
||||||
DT.Deposit({
|
DT.Deposit({
|
||||||
remaining: amount,
|
remaining: _amount,
|
||||||
premium: msg.value,
|
pixTarget: _pixTarget,
|
||||||
pixTarget: pixTarget,
|
|
||||||
seller: msg.sender,
|
seller: msg.sender,
|
||||||
token: token,
|
token: _token,
|
||||||
valid: true
|
valid: true
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -98,7 +102,7 @@ contract P2PIX is
|
|||||||
t,
|
t,
|
||||||
msg.sender,
|
msg.sender,
|
||||||
address(this),
|
address(this),
|
||||||
amount
|
_amount
|
||||||
);
|
);
|
||||||
|
|
||||||
clearReentrancyGuard();
|
clearReentrancyGuard();
|
||||||
@ -106,14 +110,16 @@ contract P2PIX is
|
|||||||
emit DepositAdded(
|
emit DepositAdded(
|
||||||
msg.sender,
|
msg.sender,
|
||||||
depositID,
|
depositID,
|
||||||
token,
|
_token,
|
||||||
msg.value,
|
_amount
|
||||||
amount
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Vendedor pode invalidar da ordem de venda impedindo novos
|
/// @notice Enables seller to invalidate future
|
||||||
// locks na mesma (isso não afeta nenhum lock que esteja ativo).
|
/// locks made to his/her token offering order.
|
||||||
|
/// @dev This function does not affect any ongoing active locks.
|
||||||
|
/// @dev Function sighash: 0x72fada5c.
|
||||||
|
|
||||||
function cancelDeposit(
|
function cancelDeposit(
|
||||||
uint256 depositID
|
uint256 depositID
|
||||||
) public {
|
) public {
|
||||||
@ -125,12 +131,20 @@ contract P2PIX is
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Relayer interaje adicionando um “lock” na ordem de venda.
|
/// @notice Public method designed to lock an remaining amount of
|
||||||
// O lock precisa incluir address do comprador + address do relayer + reembolso/premio relayer + valor.
|
/// the deposit order of a seller.
|
||||||
// **Só poder ter um lock em aberto para cada (ordem de venda, valor)**.
|
/// @dev This method can be performed by either an order's seller,
|
||||||
// Só pode fazer lock de ordens que não estão invalidadas(Passo 5).
|
/// relayer, or buyer.
|
||||||
// Essa etapa pode ser feita pelo vendedor conjuntamente com a parte 1.
|
/// @dev There can only exist a lock per each `_amount` partitioned
|
||||||
// Retorna um LockID.
|
/// from the total `remaining` value.
|
||||||
|
/// @dev Locks can only be performed in valid orders.
|
||||||
|
/// @param _targetAddress The address of the buyer of a `_depositID`.
|
||||||
|
/// @param _relayerAddress The relayer's address.
|
||||||
|
/// @param _relayerPremium The refund/premium owed to a relayer.
|
||||||
|
/// @param expiredLocks An array of `bytes32` identifiers to be
|
||||||
|
/// provided so to unexpire locks using this transaction gas push.
|
||||||
|
/// @return lockID The `bytes32` value returned as the lock identifier.
|
||||||
|
/// @dev Function sighash: 0x03aaf306.
|
||||||
function lock(
|
function lock(
|
||||||
uint256 _depositID,
|
uint256 _depositID,
|
||||||
address _targetAddress,
|
address _targetAddress,
|
||||||
@ -180,9 +194,11 @@ contract P2PIX is
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Relayer interage com o smart contract, colocando no calldata o comprovante do PIX realizado.
|
/// @notice Lock release method that liquidate lock
|
||||||
// Smart contract valida o comprovante, manda os tokens para o endereço do pagador,
|
// orders and distributes relayer fees.
|
||||||
// e reembolsa o custo do gás para o endereço do relayer especificado na parte (2).
|
/// @dev This method can be called by either an
|
||||||
|
/// order's seller, relayer, or buyer.
|
||||||
|
/// @dev Function sighash: 0x4e1389ed.
|
||||||
function release(
|
function release(
|
||||||
bytes32 lockID,
|
bytes32 lockID,
|
||||||
uint256 pixTimestamp,
|
uint256 pixTimestamp,
|
||||||
@ -193,12 +209,13 @@ contract P2PIX is
|
|||||||
public
|
public
|
||||||
nonReentrant
|
nonReentrant
|
||||||
{
|
{
|
||||||
// TODO **Prevenir que um Pix não relacionado ao APP seja usado pois tem o mesmo destino
|
/// @todo Prevent a PIX non-related to the app from
|
||||||
|
/// getting targeted, due to both sharing the same destination.
|
||||||
DT.Lock storage l = mapLocks[lockID];
|
DT.Lock storage l = mapLocks[lockID];
|
||||||
|
|
||||||
if(
|
if(
|
||||||
l.expirationBlock <= block.number
|
l.expirationBlock <= block.number ||
|
||||||
&& l.amount <= 0
|
l.amount <= 0
|
||||||
) revert
|
) revert
|
||||||
AlreadyReleased();
|
AlreadyReleased();
|
||||||
|
|
||||||
@ -264,7 +281,10 @@ contract P2PIX is
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Unlock expired locks
|
/// @notice Unlocks expired locks.
|
||||||
|
/// @dev Triggered in the callgraph by both `lock` and `withdraw` functions.
|
||||||
|
/// @dev This method can also have any public actor as its `tx.origin`.
|
||||||
|
/// @dev Function sighash: 0x8e2749d6.
|
||||||
function unlockExpired(
|
function unlockExpired(
|
||||||
bytes32[] calldata lockIDs
|
bytes32[] calldata lockIDs
|
||||||
) public {
|
) public {
|
||||||
@ -307,7 +327,10 @@ contract P2PIX is
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Após os locks expirarem, vendedor pode interagir c/ o contrato e recuperar os tokens de um depósito específico.
|
/// @notice Seller's expired deposit fund sweeper.
|
||||||
|
/// @dev A seller may use this method to recover
|
||||||
|
/// tokens from expired deposits.
|
||||||
|
/// @dev Function sighash: 0x36317972.
|
||||||
function withdraw(
|
function withdraw(
|
||||||
uint256 depositID,
|
uint256 depositID,
|
||||||
bytes32[] calldata expiredLocks
|
bytes32[] calldata expiredLocks
|
||||||
@ -347,15 +370,16 @@ contract P2PIX is
|
|||||||
|
|
||||||
/// ███ Owner Only █████████████████████████████████████████████████████████
|
/// ███ Owner Only █████████████████████████████████████████████████████████
|
||||||
|
|
||||||
// O dono do contrato pode sacar os premiums pagos
|
/// @dev Contract's balance withdraw method.
|
||||||
function withdrawPremiums() external onlyOwner {
|
/// @dev Function sighash: 0x5fd8c710.
|
||||||
|
function withdrawBalance() external onlyOwner {
|
||||||
uint256 balance =
|
uint256 balance =
|
||||||
address(this).balance;
|
address(this).balance;
|
||||||
SafeTransferLib.safeTransferETH(
|
SafeTransferLib.safeTransferETH(
|
||||||
msg.sender,
|
msg.sender,
|
||||||
balance
|
balance
|
||||||
);
|
);
|
||||||
emit PremiumsWithdrawn(
|
emit FundsWithdrawn(
|
||||||
msg.sender,
|
msg.sender,
|
||||||
balance
|
balance
|
||||||
);
|
);
|
||||||
@ -363,6 +387,12 @@ contract P2PIX is
|
|||||||
|
|
||||||
/// ███ Helper FX ██████████████████████████████████████████████████████████
|
/// ███ Helper FX ██████████████████████████████████████████████████████████
|
||||||
|
|
||||||
|
// solhint-disable-next-line no-empty-blocks
|
||||||
|
receive() external payable {}
|
||||||
|
|
||||||
|
/// @notice Access control private view method that
|
||||||
|
/// performs auth check on an deposit's seller.
|
||||||
|
/// @dev Function sighash: 0x4125a4d9.
|
||||||
function _onlySeller(uint256 _depositID)
|
function _onlySeller(uint256 _depositID)
|
||||||
private
|
private
|
||||||
view
|
view
|
||||||
@ -374,6 +404,10 @@ contract P2PIX is
|
|||||||
OnlySeller();
|
OnlySeller();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// @notice Private view auxiliar logic that reverts
|
||||||
|
/// on a not expired lock passed as argument of the function.
|
||||||
|
/// @dev Called exclusively by the `unlockExpired` method.
|
||||||
|
/// @dev Function sighash: 0x74e2a0bb.
|
||||||
function _notExpired(DT.Lock storage _l)
|
function _notExpired(DT.Lock storage _l)
|
||||||
private
|
private
|
||||||
view
|
view
|
||||||
@ -385,31 +419,35 @@ contract P2PIX is
|
|||||||
_l.amount <= 0
|
_l.amount <= 0
|
||||||
) revert
|
) revert
|
||||||
NotExpired();
|
NotExpired();
|
||||||
|
/*
|
||||||
|
// Custom Error Yul Impl
|
||||||
|
assembly {
|
||||||
|
if iszero(iszero(
|
||||||
|
or(
|
||||||
|
or(
|
||||||
|
lt(number(), sload(add(_l.slot, 3))),
|
||||||
|
eq(sload(add(_l.slot, 3)), number())
|
||||||
|
),
|
||||||
|
iszero(sload(add(_l.slot, 2)))
|
||||||
|
)))
|
||||||
|
{
|
||||||
|
mstore(0x00, 0xd0404f85)
|
||||||
|
revert(0x1c, 0x04)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Custom Error Yul Impl
|
// Require Error Solidity Impl
|
||||||
// assembly {
|
require(
|
||||||
// if iszero(iszero(
|
_l.expirationBlock < block.number &&
|
||||||
// or(
|
_l.amount > 0,
|
||||||
// or(
|
"P2PIX: Lock not expired or already released"
|
||||||
// lt(number(), sload(add(_l.slot, 3))),
|
);
|
||||||
// eq(sload(add(_l.slot, 3)), number())
|
*/
|
||||||
// ),
|
|
||||||
// iszero(sload(add(_l.slot, 2)))
|
|
||||||
// )))
|
|
||||||
// {
|
|
||||||
// mstore(0x00, 0xd0404f85)
|
|
||||||
// revert(0x1c, 0x04)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Require Error Solidity Impl
|
|
||||||
// require(
|
|
||||||
// _l.expirationBlock < block.number &&
|
|
||||||
// _l.amount > 0,
|
|
||||||
// "P2PIX: Lock not expired or already released"
|
|
||||||
// );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// @notice Internal view auxiliar logic that returns a new valid `_depositID`.
|
||||||
|
/// @dev It reverts on an already valid counter (`uint256`) value.
|
||||||
|
/// @dev Function sighash: 0xdb51d697.
|
||||||
function _encodeDepositID()
|
function _encodeDepositID()
|
||||||
internal
|
internal
|
||||||
view
|
view
|
||||||
@ -423,6 +461,12 @@ contract P2PIX is
|
|||||||
DepositAlreadyExists();
|
DepositAlreadyExists();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// @notice Private view auxiliar logic that encodes/returns
|
||||||
|
/// the `bytes32` identifier of an lock.
|
||||||
|
/// @dev reverts on a not expired lock with the same ID passed
|
||||||
|
/// as argument of the function.
|
||||||
|
/// @dev Called exclusively by the `lock` method.
|
||||||
|
/// @dev Function sighash: 0x3fc5fb52.
|
||||||
function _encodeLockID(
|
function _encodeLockID(
|
||||||
uint256 _depositID,
|
uint256 _depositID,
|
||||||
uint256 _amount,
|
uint256 _amount,
|
||||||
@ -441,6 +485,9 @@ contract P2PIX is
|
|||||||
NotExpired();
|
NotExpired();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// @notice Public method that handles `address`
|
||||||
|
/// to `uint256` safe type casting.
|
||||||
|
/// @dev Function sighash: 0x4b2ae980.
|
||||||
function _castAddrToKey(address _addr)
|
function _castAddrToKey(address _addr)
|
||||||
public
|
public
|
||||||
pure
|
pure
|
||||||
|
12
docs/DataTypes.md
Normal file
12
docs/DataTypes.md
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# DataTypes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
241
docs/EventAndErrors.md
Normal file
241
docs/EventAndErrors.md
Normal file
@ -0,0 +1,241 @@
|
|||||||
|
# EventAndErrors
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Events
|
||||||
|
|
||||||
|
### DepositAdded
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
event DepositAdded(address indexed seller, uint256 depositID, address token, uint256 amount)
|
||||||
|
```
|
||||||
|
|
||||||
|
███ Events ████████████████████████████████████████████████████████████
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| seller `indexed` | address | undefined |
|
||||||
|
| depositID | uint256 | undefined |
|
||||||
|
| token | address | undefined |
|
||||||
|
| amount | uint256 | undefined |
|
||||||
|
|
||||||
|
### DepositClosed
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
event DepositClosed(address indexed seller, uint256 depositID)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| seller `indexed` | address | undefined |
|
||||||
|
| depositID | uint256 | undefined |
|
||||||
|
|
||||||
|
### DepositWithdrawn
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
event DepositWithdrawn(address indexed seller, uint256 depositID, uint256 amount)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| seller `indexed` | address | undefined |
|
||||||
|
| depositID | uint256 | undefined |
|
||||||
|
| amount | uint256 | undefined |
|
||||||
|
|
||||||
|
### FundsWithdrawn
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
event FundsWithdrawn(address owner, uint256 amount)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| owner | address | undefined |
|
||||||
|
| amount | uint256 | undefined |
|
||||||
|
|
||||||
|
### LockAdded
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
event LockAdded(address indexed buyer, bytes32 indexed lockID, uint256 depositID, uint256 amount)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| buyer `indexed` | address | undefined |
|
||||||
|
| lockID `indexed` | bytes32 | undefined |
|
||||||
|
| depositID | uint256 | undefined |
|
||||||
|
| amount | uint256 | undefined |
|
||||||
|
|
||||||
|
### LockReleased
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
event LockReleased(address indexed buyer, bytes32 lockId)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| buyer `indexed` | address | undefined |
|
||||||
|
| lockId | bytes32 | undefined |
|
||||||
|
|
||||||
|
### LockReturned
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
event LockReturned(address indexed buyer, bytes32 lockId)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| buyer `indexed` | address | undefined |
|
||||||
|
| lockId | bytes32 | undefined |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Errors
|
||||||
|
|
||||||
|
### AlreadyReleased
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
error AlreadyReleased()
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*Lock already released or returned.0x63b4904e*
|
||||||
|
|
||||||
|
|
||||||
|
### DepositAlreadyExists
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
error DepositAlreadyExists()
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*Deposit already exist and it is still valid.0xc44bd765*
|
||||||
|
|
||||||
|
|
||||||
|
### InvalidDeposit
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
error InvalidDeposit()
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*Deposit not valid anymore.0xb2e532de*
|
||||||
|
|
||||||
|
|
||||||
|
### InvalidSigner
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
error InvalidSigner()
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*Signer is not a valid signer.0x815e1d64*
|
||||||
|
|
||||||
|
|
||||||
|
### LoopOverflow
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
error LoopOverflow()
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*Loop bounds have overflowed.0xdfb035c9*
|
||||||
|
|
||||||
|
|
||||||
|
### NotEnoughTokens
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
error NotEnoughTokens()
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*Not enough token remaining on deposit.0x22bbb43c*
|
||||||
|
|
||||||
|
|
||||||
|
### NotExpired
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
error NotExpired()
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*Lock not expired or already released.Another lock with same ID is not expired yet.0xd0404f85*
|
||||||
|
|
||||||
|
|
||||||
|
### OnlySeller
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
error OnlySeller()
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*Only seller could call this function.0x85d1f726*
|
||||||
|
|
||||||
|
|
||||||
|
### TxAlreadyUsed
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
error TxAlreadyUsed()
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*Transaction already used to unlock payment.0xf490a6ea*
|
||||||
|
|
||||||
|
|
||||||
|
|
567
docs/P2PIX.md
Normal file
567
docs/P2PIX.md
Normal file
@ -0,0 +1,567 @@
|
|||||||
|
# P2PIX
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### _castAddrToKey
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function _castAddrToKey(address _addr) external pure returns (uint256 _key)
|
||||||
|
```
|
||||||
|
|
||||||
|
Public method that handles `address` to `uint256` safe type casting.
|
||||||
|
|
||||||
|
*Function sighash: 0x4b2ae980.*
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _addr | address | undefined |
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _key | uint256 | undefined |
|
||||||
|
|
||||||
|
### cancelDeposit
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function cancelDeposit(uint256 depositID) external nonpayable
|
||||||
|
```
|
||||||
|
|
||||||
|
Enables seller to invalidate future locks made to his/her token offering order.
|
||||||
|
|
||||||
|
*This function does not affect any ongoing active locks.Function sighash: 0x72fada5c.*
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| depositID | uint256 | undefined |
|
||||||
|
|
||||||
|
### defaultLockBlocks
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function defaultLockBlocks() external view returns (uint256)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*Default blocks that lock will hold tokens.*
|
||||||
|
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | uint256 | undefined |
|
||||||
|
|
||||||
|
### deposit
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function deposit(address _token, uint256 _amount, string _pixTarget) external nonpayable returns (uint256 depositID)
|
||||||
|
```
|
||||||
|
|
||||||
|
Creates a deposit order based on a seller's offer of an amount of ERC20 tokens.
|
||||||
|
|
||||||
|
*Seller needs to send his tokens to the P2PIX smart contract.Function sighash: 0xbfe07da6.*
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _token | address | undefined |
|
||||||
|
| _amount | uint256 | undefined |
|
||||||
|
| _pixTarget | string | Pix key destination provided by the offer's seller. |
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| depositID | uint256 | The `uint256` return value provided as the deposit identifier. |
|
||||||
|
|
||||||
|
### depositCount
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function depositCount() external view returns (uint256 _val)
|
||||||
|
```
|
||||||
|
|
||||||
|
███ Storage ████████████████████████████████████████████████████████████
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _val | uint256 | undefined |
|
||||||
|
|
||||||
|
### lock
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function lock(uint256 _depositID, address _targetAddress, address _relayerAddress, uint256 _relayerPremium, uint256 _amount, bytes32[] expiredLocks) external nonpayable returns (bytes32 lockID)
|
||||||
|
```
|
||||||
|
|
||||||
|
Public method designed to lock an remaining amount of the deposit order of a seller.
|
||||||
|
|
||||||
|
*This method can be performed by either an order's seller, relayer, or buyer.There can only exist a lock per each `_amount` partitioned from the total `remaining` value.Locks can only be performed in valid orders.Function sighash: 0x03aaf306.*
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _depositID | uint256 | undefined |
|
||||||
|
| _targetAddress | address | The address of the buyer of a `_depositID`. |
|
||||||
|
| _relayerAddress | address | The relayer's address. |
|
||||||
|
| _relayerPremium | uint256 | The refund/premium owed to a relayer. |
|
||||||
|
| _amount | uint256 | undefined |
|
||||||
|
| expiredLocks | bytes32[] | An array of `bytes32` identifiers to be provided so to unexpire locks using this transaction gas push. |
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| lockID | bytes32 | The `bytes32` value returned as the lock identifier. |
|
||||||
|
|
||||||
|
### mapDeposits
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function mapDeposits(uint256) external view returns (uint256 remaining, string pixTarget, address seller, address token, bool valid)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*Seller list of deposits*
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | uint256 | undefined |
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| remaining | uint256 | undefined |
|
||||||
|
| pixTarget | string | undefined |
|
||||||
|
| seller | address | undefined |
|
||||||
|
| token | address | undefined |
|
||||||
|
| valid | bool | undefined |
|
||||||
|
|
||||||
|
### mapLocks
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function mapLocks(bytes32) external view returns (uint256 depositID, uint256 relayerPremium, uint256 amount, uint256 expirationBlock, address targetAddress, address relayerAddress)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*List of Locks.*
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | bytes32 | undefined |
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| depositID | uint256 | undefined |
|
||||||
|
| relayerPremium | uint256 | undefined |
|
||||||
|
| amount | uint256 | undefined |
|
||||||
|
| expirationBlock | uint256 | undefined |
|
||||||
|
| targetAddress | address | undefined |
|
||||||
|
| relayerAddress | address | undefined |
|
||||||
|
|
||||||
|
### owner
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function owner() external view returns (address)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | address | undefined |
|
||||||
|
|
||||||
|
### release
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function release(bytes32 lockID, uint256 pixTimestamp, bytes32 r, bytes32 s, uint8 v) external nonpayable
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*This method can be called by either an order's seller, relayer, or buyer.Function sighash: 0x4e1389ed.*
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| lockID | bytes32 | undefined |
|
||||||
|
| pixTimestamp | uint256 | undefined |
|
||||||
|
| r | bytes32 | undefined |
|
||||||
|
| s | bytes32 | undefined |
|
||||||
|
| v | uint8 | undefined |
|
||||||
|
|
||||||
|
### setOwner
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function setOwner(address newOwner) external nonpayable
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| newOwner | address | undefined |
|
||||||
|
|
||||||
|
### unlockExpired
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function unlockExpired(bytes32[] lockIDs) external nonpayable
|
||||||
|
```
|
||||||
|
|
||||||
|
Unlocks expired locks.
|
||||||
|
|
||||||
|
*Triggered in the callgraph by both `lock` and `withdraw` functions.This method can also have any public actor as its `tx.origin`.Function sighash: 0x8e2749d6.*
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| lockIDs | bytes32[] | undefined |
|
||||||
|
|
||||||
|
### validBacenSigners
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function validBacenSigners(uint256) external view returns (bool)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*List of valid Bacen signature addresses*
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | uint256 | undefined |
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | bool | undefined |
|
||||||
|
|
||||||
|
### withdraw
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function withdraw(uint256 depositID, bytes32[] expiredLocks) external nonpayable
|
||||||
|
```
|
||||||
|
|
||||||
|
Seller's expired deposit fund sweeper.
|
||||||
|
|
||||||
|
*A seller may use this method to recover tokens from expired deposits.Function sighash: 0x36317972.*
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| depositID | uint256 | undefined |
|
||||||
|
| expiredLocks | bytes32[] | undefined |
|
||||||
|
|
||||||
|
### withdrawBalance
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function withdrawBalance() external nonpayable
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*Contract's balance withdraw method. Function sighash: 0x5fd8c710.*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Events
|
||||||
|
|
||||||
|
### DepositAdded
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
event DepositAdded(address indexed seller, uint256 depositID, address token, uint256 amount)
|
||||||
|
```
|
||||||
|
|
||||||
|
███ Events ████████████████████████████████████████████████████████████
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| seller `indexed` | address | undefined |
|
||||||
|
| depositID | uint256 | undefined |
|
||||||
|
| token | address | undefined |
|
||||||
|
| amount | uint256 | undefined |
|
||||||
|
|
||||||
|
### DepositClosed
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
event DepositClosed(address indexed seller, uint256 depositID)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| seller `indexed` | address | undefined |
|
||||||
|
| depositID | uint256 | undefined |
|
||||||
|
|
||||||
|
### DepositWithdrawn
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
event DepositWithdrawn(address indexed seller, uint256 depositID, uint256 amount)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| seller `indexed` | address | undefined |
|
||||||
|
| depositID | uint256 | undefined |
|
||||||
|
| amount | uint256 | undefined |
|
||||||
|
|
||||||
|
### FundsWithdrawn
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
event FundsWithdrawn(address owner, uint256 amount)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| owner | address | undefined |
|
||||||
|
| amount | uint256 | undefined |
|
||||||
|
|
||||||
|
### LockAdded
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
event LockAdded(address indexed buyer, bytes32 indexed lockID, uint256 depositID, uint256 amount)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| buyer `indexed` | address | undefined |
|
||||||
|
| lockID `indexed` | bytes32 | undefined |
|
||||||
|
| depositID | uint256 | undefined |
|
||||||
|
| amount | uint256 | undefined |
|
||||||
|
|
||||||
|
### LockReleased
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
event LockReleased(address indexed buyer, bytes32 lockId)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| buyer `indexed` | address | undefined |
|
||||||
|
| lockId | bytes32 | undefined |
|
||||||
|
|
||||||
|
### LockReturned
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
event LockReturned(address indexed buyer, bytes32 lockId)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| buyer `indexed` | address | undefined |
|
||||||
|
| lockId | bytes32 | undefined |
|
||||||
|
|
||||||
|
### OwnerUpdated
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
event OwnerUpdated(address indexed user, address indexed newOwner)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| user `indexed` | address | undefined |
|
||||||
|
| newOwner `indexed` | address | undefined |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Errors
|
||||||
|
|
||||||
|
### AlreadyReleased
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
error AlreadyReleased()
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*Lock already released or returned.0x63b4904e*
|
||||||
|
|
||||||
|
|
||||||
|
### DepositAlreadyExists
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
error DepositAlreadyExists()
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*Deposit already exist and it is still valid.0xc44bd765*
|
||||||
|
|
||||||
|
|
||||||
|
### InvalidDeposit
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
error InvalidDeposit()
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*Deposit not valid anymore.0xb2e532de*
|
||||||
|
|
||||||
|
|
||||||
|
### InvalidSigner
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
error InvalidSigner()
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*Signer is not a valid signer.0x815e1d64*
|
||||||
|
|
||||||
|
|
||||||
|
### LoopOverflow
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
error LoopOverflow()
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*Loop bounds have overflowed.0xdfb035c9*
|
||||||
|
|
||||||
|
|
||||||
|
### NotEnoughTokens
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
error NotEnoughTokens()
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*Not enough token remaining on deposit.0x22bbb43c*
|
||||||
|
|
||||||
|
|
||||||
|
### NotExpired
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
error NotExpired()
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*Lock not expired or already released.Another lock with same ID is not expired yet.0xd0404f85*
|
||||||
|
|
||||||
|
|
||||||
|
### OnlySeller
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
error OnlySeller()
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*Only seller could call this function.0x85d1f726*
|
||||||
|
|
||||||
|
|
||||||
|
### Reentrancy
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
error Reentrancy()
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### TxAlreadyUsed
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
error TxAlreadyUsed()
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*Transaction already used to unlock payment.0xf490a6ea*
|
||||||
|
|
||||||
|
|
||||||
|
|
537
docs/callgraph.svg
Normal file
537
docs/callgraph.svg
Normal file
@ -0,0 +1,537 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="805pt" height="1504pt" viewBox="0.00 0.00 804.77 1504.00">
|
||||||
|
<g id="graph0" class="graph" transform="translate(4,1500) scale(1)" data-name="G">
|
||||||
|
|
||||||
|
<polygon fill="#2e3e56" stroke="none" points="-4,4 -4,-1500 800.77,-1500 800.77,4 -4,4" style=""/>
|
||||||
|
<g id="clust1" class="cluster" data-name="clusterP2PIX">
|
||||||
|
|
||||||
|
<path fill="#445773" stroke="#445773" d="M20,-370C20,-370 776.77,-370 776.77,-370 782.77,-370 788.77,-376 788.77,-382 788.77,-382 788.77,-1339 788.77,-1339 788.77,-1345 782.77,-1351 776.77,-1351 776.77,-1351 20,-1351 20,-1351 14,-1351 8,-1345 8,-1339 8,-1339 8,-382 8,-382 8,-376 14,-370 20,-370" style=""/>
|
||||||
|
<text text-anchor="middle" x="398.38" y="-1334.4" font-family="Times,serif" font-size="14.00" fill="#f0f0f0" style="">P2PIX</text>
|
||||||
|
</g>
|
||||||
|
<g id="clust2" class="cluster" data-name="clusterDT">
|
||||||
|
|
||||||
|
<path fill="#3b4b63" stroke="#e8726d" stroke-dasharray="5,2" d="M270.03,-231C270.03,-231 344.19,-231 344.19,-231 350.19,-231 356.19,-237 356.19,-243 356.19,-243 356.19,-350 356.19,-350 356.19,-356 350.19,-362 344.19,-362 344.19,-362 270.03,-362 270.03,-362 264.03,-362 258.03,-356 258.03,-350 258.03,-350 258.03,-243 258.03,-243 258.03,-237 264.03,-231 270.03,-231" style=""/>
|
||||||
|
<text text-anchor="middle" x="307.11" y="-345.4" font-family="Times,serif" font-size="14.00" fill="#f0f0f0" style="">DT</text>
|
||||||
|
</g>
|
||||||
|
<g id="clust3" class="cluster" data-name="clusterCounters.Counter">
|
||||||
|
|
||||||
|
<path fill="#3b4b63" stroke="#e8726d" stroke-dasharray="5,2" d="M491.15,-208C491.15,-208 582.44,-208 582.44,-208 588.44,-208 594.44,-214 594.44,-220 594.44,-220 594.44,-327 594.44,-327 594.44,-333 588.44,-339 582.44,-339 582.44,-339 491.15,-339 491.15,-339 485.15,-339 479.15,-333 479.15,-327 479.15,-327 479.15,-220 479.15,-220 479.15,-214 485.15,-208 491.15,-208" style=""/>
|
||||||
|
<text text-anchor="middle" x="536.8" y="-322.4" font-family="Times,serif" font-size="14.00" fill="#f0f0f0" style="">Counters.Counter</text>
|
||||||
|
</g>
|
||||||
|
<g id="clust4" class="cluster" data-name="clusterSafeTransferLib">
|
||||||
|
|
||||||
|
<path fill="#3b4b63" stroke="#e8726d" stroke-dasharray="5,2" d="M230.9,-8C230.9,-8 383.33,-8 383.33,-8 389.33,-8 395.33,-14 395.33,-20 395.33,-20 395.33,-181 395.33,-181 395.33,-187 389.33,-193 383.33,-193 383.33,-193 230.9,-193 230.9,-193 224.9,-193 218.9,-187 218.9,-181 218.9,-181 218.9,-20 218.9,-20 218.9,-14 224.9,-8 230.9,-8" style=""/>
|
||||||
|
<text text-anchor="middle" x="307.11" y="-176.4" font-family="Times,serif" font-size="14.00" fill="#f0f0f0" style="">SafeTransferLib</text>
|
||||||
|
</g>
|
||||||
|
<g id="clust5" class="cluster" data-name="cluster_01">
|
||||||
|
|
||||||
|
<polygon fill="#2e3e56" stroke="black" points="21.61,-1359 21.61,-1488 342.11,-1488 342.11,-1359 21.61,-1359" style=""/>
|
||||||
|
<text text-anchor="middle" x="181.86" y="-1471.4" font-family="Times,serif" font-size="14.00" style="">Legend</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.<Constructor> -->
|
||||||
|
<g id="node1" class="node" pointer-events="visible" data-name="P2PIX.<Constructor>">
|
||||||
|
|
||||||
|
<ellipse fill="#ff9797" stroke="brown" stroke-width="3" cx="94.61" cy="-848" rx="67.55" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="94.61" y="-843.8" font-family="Times,serif" font-size="14.00" style=""><Constructor></text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX._castAddrToKey -->
|
||||||
|
<g id="node14" class="node" pointer-events="visible" data-name="P2PIX._castAddrToKey">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="307.11" cy="-848" rx="77.58" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="307.11" y="-843.8" font-family="Times,serif" font-size="14.00" style="">_castAddrToKey</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.<Constructor>->P2PIX._castAddrToKey -->
|
||||||
|
<g id="edge1" class="edge" data-name="P2PIX.<Constructor>->P2PIX._castAddrToKey">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M163.37,-848C179.92,-848 197.9,-848 215.34,-848" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="215.2,-851.5 225.2,-848 215.2,-844.5 215.2,-851.5" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.deposit -->
|
||||||
|
<g id="node2" class="node" pointer-events="visible" data-name="P2PIX.deposit">
|
||||||
|
|
||||||
|
<ellipse fill="#ff9797" stroke="#ff9797" stroke-width="3" cx="94.61" cy="-794" rx="38.86" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="94.61" y="-789.8" font-family="Times,serif" font-size="14.00" style="">deposit</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX._encodeDepositID -->
|
||||||
|
<g id="node12" class="node" pointer-events="visible" data-name="P2PIX._encodeDepositID">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="307.11" cy="-956" rx="83.38" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="307.11" y="-951.8" font-family="Times,serif" font-size="14.00" style="">_encodeDepositID</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.deposit->P2PIX._encodeDepositID -->
|
||||||
|
<g id="edge2" class="edge" data-name="P2PIX.deposit->P2PIX._encodeDepositID">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M132.98,-799.75C147.17,-803.64 162.49,-810.14 173.21,-821 208.76,-857.01 172.55,-894.13 209.21,-929 213.72,-933.29 218.85,-936.91 224.34,-939.96" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="222.76,-943.08 233.3,-944.17 225.74,-936.74 222.76,-943.08" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.ERC20 -->
|
||||||
|
<g id="node15" class="node" pointer-events="visible" data-name="P2PIX.ERC20">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="307.11" cy="-794" rx="39.45" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="307.11" y="-789.8" font-family="Times,serif" font-size="14.00" style="">ERC20</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.deposit->P2PIX.ERC20 -->
|
||||||
|
<g id="edge3" class="edge" data-name="P2PIX.deposit->P2PIX.ERC20">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M134.71,-794C168.17,-794 216.63,-794 253.5,-794" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="253.48,-797.5 263.48,-794 253.48,-790.5 253.48,-797.5" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.setReentrancyGuard -->
|
||||||
|
<g id="node16" class="node" pointer-events="visible" data-name="P2PIX.setReentrancyGuard">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="307.11" cy="-1064" rx="89.73" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="307.11" y="-1059.8" font-family="Times,serif" font-size="14.00" style="">setReentrancyGuard</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.deposit->P2PIX.setReentrancyGuard -->
|
||||||
|
<g id="edge5" class="edge" data-name="P2PIX.deposit->P2PIX.setReentrancyGuard">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M133.47,-798.83C147.92,-802.58 163.28,-809.22 173.21,-821 235.95,-895.4 144.16,-964.61 209.21,-1037 212.66,-1040.84 216.6,-1044.15 220.88,-1047" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="219.01,-1049.97 229.45,-1051.74 222.39,-1043.84 219.01,-1049.97" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.clearReentrancyGuard -->
|
||||||
|
<g id="node17" class="node" pointer-events="visible" data-name="P2PIX.clearReentrancyGuard">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="307.11" cy="-902" rx="97.79" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="307.11" y="-897.8" font-family="Times,serif" font-size="14.00" style="">clearReentrancyGuard</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.deposit->P2PIX.clearReentrancyGuard -->
|
||||||
|
<g id="edge8" class="edge" data-name="P2PIX.deposit->P2PIX.clearReentrancyGuard">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M131.61,-801.3C145.61,-805.41 161.14,-811.66 173.21,-821 196.02,-838.66 185.86,-858.07 209.21,-875 213.59,-878.17 218.32,-880.97 223.26,-883.44" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="221.76,-886.6 232.32,-887.41 224.57,-880.19 221.76,-886.6" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.DepositAdded -->
|
||||||
|
<g id="node18" class="node" pointer-events="visible" data-name="P2PIX.DepositAdded">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="307.11" cy="-1010" rx="66.65" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="307.11" y="-1005.8" font-family="Times,serif" font-size="14.00" style="">DepositAdded</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.deposit->P2PIX.DepositAdded -->
|
||||||
|
<g id="edge9" class="edge" data-name="P2PIX.deposit->P2PIX.DepositAdded">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M133.16,-799.1C147.56,-802.89 162.97,-809.49 173.21,-821 222.25,-876.09 158.46,-929.48 209.21,-983 215.46,-989.59 223.17,-994.61 231.49,-998.44" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="230.14,-1001.68 240.73,-1002 232.66,-995.14 230.14,-1001.68" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- DT.Deposit -->
|
||||||
|
<g id="node33" class="node" pointer-events="visible" data-name="DT.Deposit">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="307.11" cy="-257" rx="41.16" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="307.11" y="-252.8" font-family="Times,serif" font-size="14.00" style="">Deposit</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.deposit->DT.Deposit -->
|
||||||
|
<g id="edge4" class="edge" data-name="P2PIX.deposit->DT.Deposit">
|
||||||
|
|
||||||
|
<path fill="none" stroke="white" stroke-width="2" d="M112.68,-776.66C131.18,-756.67 159.85,-721.92 173.21,-686 204.49,-601.94 151.83,-352.93 209.21,-284 219.88,-271.19 236.07,-264.17 252.18,-260.42" style=""/>
|
||||||
|
<polygon fill="white" stroke="white" stroke-width="2" points="252.79,-263.86 261.99,-258.61 251.52,-256.98 252.79,-263.86" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- Counters.Counter.increment -->
|
||||||
|
<g id="node35" class="node" pointer-events="visible" data-name="Counters.Counter.increment">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="536.8" cy="-234" rx="49.79" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="536.8" y="-229.8" font-family="Times,serif" font-size="14.00" style="">increment</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.deposit->Counters.Counter.increment -->
|
||||||
|
<g id="edge6" class="edge" data-name="P2PIX.deposit->Counters.Counter.increment">
|
||||||
|
|
||||||
|
<path fill="none" stroke="white" stroke-width="2" d="M112.76,-776.69C131.32,-756.72 160.05,-721.99 173.21,-686 208.36,-589.91 134.09,-296.46 209.21,-227 246.91,-192.14 394.65,-210.1 477.92,-223.59" style=""/>
|
||||||
|
<polygon fill="white" stroke="white" stroke-width="2" points="477.28,-227.03 487.72,-225.22 478.42,-220.13 477.28,-227.03" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- SafeTransferLib.safeTransferFrom -->
|
||||||
|
<g id="node37" class="node" pointer-events="visible" data-name="SafeTransferLib.safeTransferFrom">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="307.11" cy="-142" rx="80.43" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="307.11" y="-137.8" font-family="Times,serif" font-size="14.00" style="">safeTransferFrom</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.deposit->SafeTransferLib.safeTransferFrom -->
|
||||||
|
<g id="edge7" class="edge" data-name="P2PIX.deposit->SafeTransferLib.safeTransferFrom">
|
||||||
|
|
||||||
|
<path fill="none" stroke="white" stroke-width="2" d="M112.79,-776.7C131.38,-756.74 160.13,-722.03 173.21,-686 210.4,-583.58 150.97,-289.08 209.21,-197 218.28,-182.67 232.5,-171.71 247.27,-163.48" style=""/>
|
||||||
|
<polygon fill="white" stroke="white" stroke-width="2" points="248.58,-166.74 255.91,-159.09 245.41,-160.5 248.58,-166.74" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.cancelDeposit -->
|
||||||
|
<g id="node3" class="node" pointer-events="visible" data-name="P2PIX.cancelDeposit">
|
||||||
|
|
||||||
|
<ellipse fill="#ff9797" stroke="#ff9797" stroke-width="3" cx="307.11" cy="-524" rx="65.97" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="307.11" y="-519.8" font-family="Times,serif" font-size="14.00" style="">cancelDeposit</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX._onlySeller -->
|
||||||
|
<g id="node10" class="node" pointer-events="visible" data-name="P2PIX._onlySeller">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="536.8" cy="-487" rx="55.62" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="536.8" y="-482.8" font-family="Times,serif" font-size="14.00" style="">_onlySeller</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.cancelDeposit->P2PIX._onlySeller -->
|
||||||
|
<g id="edge10" class="edge" data-name="P2PIX.cancelDeposit->P2PIX._onlySeller">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M366.15,-514.57C398.61,-509.29 439.09,-502.71 472.38,-497.31" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="472.92,-500.76 482.23,-495.71 471.79,-493.85 472.92,-500.76" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.DepositClosed -->
|
||||||
|
<g id="node19" class="node" pointer-events="visible" data-name="P2PIX.DepositClosed">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="536.8" cy="-541" rx="67.81" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="536.8" y="-536.8" font-family="Times,serif" font-size="14.00" style="">DepositClosed</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.cancelDeposit->P2PIX.DepositClosed -->
|
||||||
|
<g id="edge11" class="edge" data-name="P2PIX.cancelDeposit->P2PIX.DepositClosed">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M372.44,-528.8C398.78,-530.77 429.51,-533.06 457.16,-535.13" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="456.79,-538.61 467.02,-535.86 457.31,-531.63 456.79,-538.61" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.lock -->
|
||||||
|
<g id="node4" class="node" pointer-events="visible" data-name="P2PIX.lock">
|
||||||
|
|
||||||
|
<ellipse fill="#ff9797" stroke="#ff9797" stroke-width="3" cx="94.61" cy="-1190" rx="27.83" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="94.61" y="-1185.8" font-family="Times,serif" font-size="14.00" style="">lock</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.unlockExpired -->
|
||||||
|
<g id="node6" class="node" pointer-events="visible" data-name="P2PIX.unlockExpired">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="307.11" cy="-1118" rx="67.78" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="307.11" y="-1113.8" font-family="Times,serif" font-size="14.00" style="">unlockExpired</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.lock->P2PIX.unlockExpired -->
|
||||||
|
<g id="edge12" class="edge" data-name="P2PIX.lock->P2PIX.unlockExpired">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M119.27,-1179.78C142.07,-1170.14 177.64,-1155.62 209.21,-1145 220.28,-1141.28 232.16,-1137.66 243.7,-1134.35" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="244.42,-1137.78 253.1,-1131.7 242.52,-1131.04 244.42,-1137.78" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX._encodeLockID -->
|
||||||
|
<g id="node13" class="node" pointer-events="visible" data-name="P2PIX._encodeLockID">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="536.8" cy="-1209" rx="73.48" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="536.8" y="-1204.8" font-family="Times,serif" font-size="14.00" style="">_encodeLockID</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.lock->P2PIX._encodeLockID -->
|
||||||
|
<g id="edge15" class="edge" data-name="P2PIX.lock->P2PIX._encodeLockID">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M123.59,-1192.6C146.57,-1194.64 179.98,-1197.4 209.21,-1199 290.59,-1203.47 383.49,-1206.07 449.35,-1207.49" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="449.05,-1210.99 459.12,-1207.7 449.2,-1203.99 449.05,-1210.99" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.InvalidDeposit -->
|
||||||
|
<g id="node20" class="node" pointer-events="visible" data-name="P2PIX.InvalidDeposit">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="307.11" cy="-1172" rx="68.36" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="307.11" y="-1167.8" font-family="Times,serif" font-size="14.00" style="">InvalidDeposit</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.lock->P2PIX.InvalidDeposit -->
|
||||||
|
<g id="edge13" class="edge" data-name="P2PIX.lock->P2PIX.InvalidDeposit">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M123.56,-1187.61C150.07,-1185.34 191.17,-1181.83 227.66,-1178.71" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="227.66,-1182.22 237.32,-1177.88 227.06,-1175.25 227.66,-1182.22" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.NotEnoughTokens -->
|
||||||
|
<g id="node21" class="node" pointer-events="visible" data-name="P2PIX.NotEnoughTokens">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="307.11" cy="-1246" rx="83.98" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="307.11" y="-1241.8" font-family="Times,serif" font-size="14.00" style="">NotEnoughTokens</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.lock->P2PIX.NotEnoughTokens -->
|
||||||
|
<g id="edge14" class="edge" data-name="P2PIX.lock->P2PIX.NotEnoughTokens">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M121.84,-1196.98C150.88,-1204.7 198.83,-1217.46 238.54,-1228.02" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="237.62,-1231.4 248.18,-1230.59 239.42,-1224.64 237.62,-1231.4" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.LockAdded -->
|
||||||
|
<g id="node22" class="node" pointer-events="visible" data-name="P2PIX.LockAdded">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="307.11" cy="-1300" rx="56.75" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="307.11" y="-1295.8" font-family="Times,serif" font-size="14.00" style="">LockAdded</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.lock->P2PIX.LockAdded -->
|
||||||
|
<g id="edge17" class="edge" data-name="P2PIX.lock->P2PIX.LockAdded">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M112.43,-1205.35C133.56,-1223.87 171.63,-1254.78 209.21,-1273 220.41,-1278.43 232.88,-1282.93 245.05,-1286.59" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="244.06,-1289.95 254.64,-1289.29 245.96,-1283.21 244.06,-1289.95" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- DT.Lock -->
|
||||||
|
<g id="node34" class="node" pointer-events="visible" data-name="DT.Lock">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="307.11" cy="-311" rx="30.76" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="307.11" y="-306.8" font-family="Times,serif" font-size="14.00" style="">Lock</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.lock->DT.Lock -->
|
||||||
|
<g id="edge16" class="edge" data-name="P2PIX.lock->DT.Lock">
|
||||||
|
|
||||||
|
<path fill="none" stroke="white" stroke-width="2" d="M101.48,-1171.06C116.3,-1122.44 155.26,-989.06 173.21,-875 190.84,-762.98 148.73,-461.92 209.21,-366 222.09,-345.58 245.44,-332 265.99,-323.44" style=""/>
|
||||||
|
<polygon fill="white" stroke="white" stroke-width="2" points="267.07,-326.78 275.16,-319.94 264.57,-320.24 267.07,-326.78" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.release -->
|
||||||
|
<g id="node5" class="node" pointer-events="visible" data-name="P2PIX.release">
|
||||||
|
|
||||||
|
<ellipse fill="#ff9797" stroke="#ff9797" stroke-width="3" cx="94.61" cy="-659" rx="37.68" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="94.61" y="-654.8" font-family="Times,serif" font-size="14.00" style="">release</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.release->P2PIX._castAddrToKey -->
|
||||||
|
<g id="edge20" class="edge" data-name="P2PIX.release->P2PIX._castAddrToKey">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M108.71,-676.83C124.3,-698.13 151,-734.92 173.21,-767 189.63,-790.72 185.86,-804.07 209.21,-821 215.49,-825.55 222.51,-829.34 229.82,-832.49" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="228.48,-835.72 239.07,-835.99 230.96,-829.17 228.48,-835.72" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.release->P2PIX.ERC20 -->
|
||||||
|
<g id="edge22" class="edge" data-name="P2PIX.release->P2PIX.ERC20">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M109.42,-676.72C129.05,-700.71 167.32,-743.24 209.21,-767 223.6,-775.16 240.6,-780.97 256.31,-785.07" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="255.08,-788.37 265.62,-787.29 256.7,-781.56 255.08,-788.37" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.AlreadyReleased -->
|
||||||
|
<g id="node23" class="node" pointer-events="visible" data-name="P2PIX.AlreadyReleased">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="307.11" cy="-632" rx="76.99" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="307.11" y="-627.8" font-family="Times,serif" font-size="14.00" style="">AlreadyReleased</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.release->P2PIX.AlreadyReleased -->
|
||||||
|
<g id="edge18" class="edge" data-name="P2PIX.release->P2PIX.AlreadyReleased">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M132.27,-654.3C157.86,-651.02 193.01,-646.51 225.02,-642.4" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="225.09,-645.92 234.56,-641.18 224.2,-638.98 225.09,-645.92" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.TxAlreadyUsed -->
|
||||||
|
<g id="node24" class="node" pointer-events="visible" data-name="P2PIX.TxAlreadyUsed">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="307.11" cy="-740" rx="72.93" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="307.11" y="-735.8" font-family="Times,serif" font-size="14.00" style="">TxAlreadyUsed</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.release->P2PIX.TxAlreadyUsed -->
|
||||||
|
<g id="edge19" class="edge" data-name="P2PIX.release->P2PIX.TxAlreadyUsed">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M121.68,-672.97C144.35,-684.74 178.33,-701.45 209.21,-713 219.15,-716.71 229.82,-720.19 240.33,-723.32" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="239.04,-726.59 249.62,-726 240.98,-719.87 239.04,-726.59" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.InvalidSigner -->
|
||||||
|
<g id="node25" class="node" pointer-events="visible" data-name="P2PIX.InvalidSigner">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="307.11" cy="-686" rx="63.71" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="307.11" y="-681.8" font-family="Times,serif" font-size="14.00" style="">InvalidSigner</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.release->P2PIX.InvalidSigner -->
|
||||||
|
<g id="edge21" class="edge" data-name="P2PIX.release->P2PIX.InvalidSigner">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M132.27,-663.7C160.37,-667.31 200.02,-672.39 234.36,-676.8" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="233.85,-680.26 244.22,-678.06 234.74,-673.32 233.85,-680.26" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.LockReleased -->
|
||||||
|
<g id="node26" class="node" pointer-events="visible" data-name="P2PIX.LockReleased">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="307.11" cy="-578" rx="65.97" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="307.11" y="-573.8" font-family="Times,serif" font-size="14.00" style="">LockReleased</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.release->P2PIX.LockReleased -->
|
||||||
|
<g id="edge25" class="edge" data-name="P2PIX.release->P2PIX.LockReleased">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M121.68,-645.03C144.35,-633.26 178.33,-616.55 209.21,-605 220.03,-600.96 231.71,-597.2 243.1,-593.86" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="243.72,-597.32 252.38,-591.22 241.8,-590.59 243.72,-597.32" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- SafeTransferLib.safeTransfer -->
|
||||||
|
<g id="node38" class="node" pointer-events="visible" data-name="SafeTransferLib.safeTransfer">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="307.11" cy="-88" rx="59.08" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="307.11" y="-83.8" font-family="Times,serif" font-size="14.00" style="">safeTransfer</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.release->SafeTransferLib.safeTransfer -->
|
||||||
|
<g id="edge23" class="edge" data-name="P2PIX.release->SafeTransferLib.safeTransfer">
|
||||||
|
|
||||||
|
<path fill="none" stroke="white" stroke-width="2" d="M107.07,-640.71C124.83,-616.94 158.46,-574.64 173.21,-532 204.27,-442.22 148.62,-179.17 209.21,-106 216.22,-97.54 225.63,-91.61 235.84,-87.61" style=""/>
|
||||||
|
<polygon fill="white" stroke="white" stroke-width="2" points="236.72,-91 245.21,-84.66 234.63,-84.32 236.72,-91" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.release->SafeTransferLib.safeTransfer -->
|
||||||
|
<g id="edge24" class="edge" data-name="P2PIX.release->SafeTransferLib.safeTransfer">
|
||||||
|
|
||||||
|
<path fill="none" stroke="white" stroke-width="2" d="M115.8,-642.95C134.29,-622.52 160.63,-586.38 173.21,-550 204.27,-460.22 148.62,-197.17 209.21,-124 218.13,-113.24 230.93,-106.57 244.33,-102.2" style=""/>
|
||||||
|
<polygon fill="white" stroke="white" stroke-width="2" points="245.07,-105.63 253.78,-99.6 243.21,-98.88 245.07,-105.63" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX._notExpired -->
|
||||||
|
<g id="node11" class="node" pointer-events="visible" data-name="P2PIX._notExpired">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="536.8" cy="-1101" rx="58.55" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="536.8" y="-1096.8" font-family="Times,serif" font-size="14.00" style="">_notExpired</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.unlockExpired->P2PIX._notExpired -->
|
||||||
|
<g id="edge26" class="edge" data-name="P2PIX.unlockExpired->P2PIX._notExpired">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M373.97,-1113.08C402.8,-1110.93 436.65,-1108.4 465.93,-1106.22" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="465.86,-1109.73 475.57,-1105.5 465.34,-1102.75 465.86,-1109.73" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.LockReturned -->
|
||||||
|
<g id="node27" class="node" pointer-events="visible" data-name="P2PIX.LockReturned">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="536.8" cy="-1155" rx="66.05" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="536.8" y="-1150.8" font-family="Times,serif" font-size="14.00" style="">LockReturned</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.unlockExpired->P2PIX.LockReturned -->
|
||||||
|
<g id="edge27" class="edge" data-name="P2PIX.unlockExpired->P2PIX.LockReturned">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M367.34,-1127.62C397.33,-1132.5 433.96,-1138.45 465.38,-1143.56" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="464.63,-1146.98 475.06,-1145.13 465.75,-1140.07 464.63,-1146.98" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.withdraw -->
|
||||||
|
<g id="node7" class="node" pointer-events="visible" data-name="P2PIX.withdraw">
|
||||||
|
|
||||||
|
<ellipse fill="#ff9797" stroke="#ff9797" stroke-width="3" cx="94.61" cy="-514" rx="47.52" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="94.61" y="-509.8" font-family="Times,serif" font-size="14.00" style="">withdraw</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.withdraw->P2PIX.cancelDeposit -->
|
||||||
|
<g id="edge30" class="edge" data-name="P2PIX.withdraw->P2PIX.cancelDeposit">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M143.11,-516.26C168.14,-517.45 199.47,-518.93 227.97,-520.29" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="227.65,-523.78 237.8,-520.75 227.98,-516.78 227.65,-523.78" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.withdraw->P2PIX.unlockExpired -->
|
||||||
|
<g id="edge29" class="edge" data-name="P2PIX.withdraw->P2PIX.unlockExpired">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M111.75,-532.04C130.27,-553.93 159.79,-592.8 173.21,-632 206.37,-728.79 144.19,-1012 209.21,-1091 214.81,-1097.79 221.95,-1102.96 229.82,-1106.88" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="228.39,-1110.07 238.97,-1110.61 231.04,-1103.59 228.39,-1110.07" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.withdraw->P2PIX._onlySeller -->
|
||||||
|
<g id="edge28" class="edge" data-name="P2PIX.withdraw->P2PIX._onlySeller">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M139.43,-506.21C160.47,-502.79 186.07,-499.08 209.21,-497 298.07,-489.02 401,-487.07 467.18,-486.75" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="466.9,-490.26 476.89,-486.72 466.87,-483.26 466.9,-490.26" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.withdraw->P2PIX.ERC20 -->
|
||||||
|
<g id="edge31" class="edge" data-name="P2PIX.withdraw->P2PIX.ERC20">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M110.23,-532.12C127.54,-554.41 156.17,-593.96 173.21,-632 198.6,-688.67 165.55,-722.85 209.21,-767 221.03,-778.95 237.67,-785.73 253.82,-789.54" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="253.12,-792.97 263.6,-791.43 254.44,-786.1 253.12,-792.97" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.DepositWithdrawn -->
|
||||||
|
<g id="node28" class="node" pointer-events="visible" data-name="P2PIX.DepositWithdrawn">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="307.11" cy="-450" rx="84.54" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="307.11" y="-445.8" font-family="Times,serif" font-size="14.00" style="">DepositWithdrawn</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.withdraw->P2PIX.DepositWithdrawn -->
|
||||||
|
<g id="edge33" class="edge" data-name="P2PIX.withdraw->P2PIX.DepositWithdrawn">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M133.73,-502.41C164.14,-493.16 207.4,-480.01 242.97,-469.2" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="243.75,-472.62 252.3,-466.36 241.72,-465.92 243.75,-472.62" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.withdraw->SafeTransferLib.safeTransfer -->
|
||||||
|
<g id="edge32" class="edge" data-name="P2PIX.withdraw->SafeTransferLib.safeTransfer">
|
||||||
|
|
||||||
|
<path fill="none" stroke="white" stroke-width="2" d="M135.76,-503.79C149.81,-498.19 164.29,-489.7 173.21,-477 219.69,-410.86 157.19,-176.88 209.21,-115 216.28,-106.59 225.72,-100.69 235.95,-96.56" style=""/>
|
||||||
|
<polygon fill="white" stroke="white" stroke-width="2" points="236.95,-99.92 245.34,-93.45 234.75,-93.27 236.95,-99.92" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.withdrawBalance -->
|
||||||
|
<g id="node8" class="node" pointer-events="visible" data-name="P2PIX.withdrawBalance">
|
||||||
|
|
||||||
|
<ellipse fill="#ffbdb9" stroke="#ffbdb9" stroke-width="3" cx="94.61" cy="-450" rx="78.71" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="94.61" y="-445.8" font-family="Times,serif" font-size="14.00" style="">withdrawBalance</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.FundsWithdrawn -->
|
||||||
|
<g id="node29" class="node" pointer-events="visible" data-name="P2PIX.FundsWithdrawn">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="307.11" cy="-396" rx="78.19" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="307.11" y="-391.8" font-family="Times,serif" font-size="14.00" style="">FundsWithdrawn</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.withdrawBalance->P2PIX.FundsWithdrawn -->
|
||||||
|
<g id="edge35" class="edge" data-name="P2PIX.withdrawBalance->P2PIX.FundsWithdrawn">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M150.09,-436.02C177.36,-429.03 210.61,-420.5 239.4,-413.11" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="240.11,-416.55 248.92,-410.67 238.37,-409.76 240.11,-416.55" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- SafeTransferLib.safeTransferETH -->
|
||||||
|
<g id="node39" class="node" pointer-events="visible" data-name="SafeTransferLib.safeTransferETH">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="307.11" cy="-34" rx="78.12" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="307.11" y="-29.8" font-family="Times,serif" font-size="14.00" style="">safeTransferETH</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.withdrawBalance->SafeTransferLib.safeTransferETH -->
|
||||||
|
<g id="edge34" class="edge" data-name="P2PIX.withdrawBalance->SafeTransferLib.safeTransferETH">
|
||||||
|
|
||||||
|
<path fill="none" stroke="white" stroke-width="2" d="M155.4,-437.4C162.23,-433.75 168.44,-429.05 173.21,-423 273.31,-296.02 105.17,-184.76 209.21,-61 213.53,-55.87 218.73,-51.67 224.45,-48.24" style=""/>
|
||||||
|
<polygon fill="white" stroke="white" stroke-width="2" points="225.87,-51.44 233.29,-43.88 222.77,-45.16 225.87,-51.44" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.<Receive Ether> -->
|
||||||
|
<g id="node9" class="node" pointer-events="visible" data-name="P2PIX.<Receive Ether>">
|
||||||
|
|
||||||
|
<ellipse fill="#ffbdb9" stroke="brown" stroke-width="3" cx="94.61" cy="-396" rx="76.21" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="94.61" y="-391.8" font-family="Times,serif" font-size="14.00" style=""><Receive Ether></text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.OnlySeller -->
|
||||||
|
<g id="node30" class="node" pointer-events="visible" data-name="P2PIX.OnlySeller">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="724.68" cy="-487" rx="52.75" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="724.68" y="-482.8" font-family="Times,serif" font-size="14.00" style="">OnlySeller</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX._onlySeller->P2PIX.OnlySeller -->
|
||||||
|
<g id="edge36" class="edge" data-name="P2PIX._onlySeller->P2PIX.OnlySeller">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M593.82,-487C614,-487 636.96,-487 657.9,-487" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="657.61,-490.5 667.61,-487 657.61,-483.5 657.61,-490.5" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.NotExpired -->
|
||||||
|
<g id="node31" class="node" pointer-events="visible" data-name="P2PIX.NotExpired">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="724.68" cy="-1155" rx="56.18" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="724.68" y="-1150.8" font-family="Times,serif" font-size="14.00" style="">NotExpired</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX._notExpired->P2PIX.NotExpired -->
|
||||||
|
<g id="edge37" class="edge" data-name="P2PIX._notExpired->P2PIX.NotExpired">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M582.19,-1113.54C598.1,-1118.06 616.16,-1123.22 632.59,-1128 644.34,-1131.42 656.94,-1135.12 668.9,-1138.66" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="667.59,-1141.92 678.17,-1141.41 669.58,-1135.21 667.59,-1141.92" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX.DepositAlreadyExists -->
|
||||||
|
<g id="node32" class="node" pointer-events="visible" data-name="P2PIX.DepositAlreadyExists">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="536.8" cy="-956" rx="95.58" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="536.8" y="-951.8" font-family="Times,serif" font-size="14.00" style="">DepositAlreadyExists</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX._encodeDepositID->P2PIX.DepositAlreadyExists -->
|
||||||
|
<g id="edge39" class="edge" data-name="P2PIX._encodeDepositID->P2PIX.DepositAlreadyExists">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M391.92,-956C403.38,-956 415.27,-956 427.08,-956" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="426.82,-959.5 436.82,-956 426.82,-952.5 426.82,-959.5" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- Counters.Counter.current -->
|
||||||
|
<g id="node36" class="node" pointer-events="visible" data-name="Counters.Counter.current">
|
||||||
|
|
||||||
|
<ellipse fill="#edad56" stroke="#edad56" stroke-width="3" cx="536.8" cy="-288" rx="38.26" ry="18" style=""/>
|
||||||
|
<text text-anchor="middle" x="536.8" y="-283.8" font-family="Times,serif" font-size="14.00" style="">current</text>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX._encodeDepositID->Counters.Counter.current -->
|
||||||
|
<g id="edge38" class="edge" data-name="P2PIX._encodeDepositID->Counters.Counter.current">
|
||||||
|
|
||||||
|
<path fill="none" stroke="white" stroke-width="2" d="M380.89,-946.65C390.16,-942.55 398.63,-936.87 405.01,-929 483.98,-831.63 383.89,-477.6 441.01,-366 453.46,-341.67 477.23,-322.14 497.84,-308.71" style=""/>
|
||||||
|
<polygon fill="white" stroke="white" stroke-width="2" points="499.64,-311.71 506.31,-303.47 495.96,-305.76 499.64,-311.71" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- P2PIX._encodeLockID->P2PIX.NotExpired -->
|
||||||
|
<g id="edge40" class="edge" data-name="P2PIX._encodeLockID->P2PIX.NotExpired">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M588,-1194.81C602.41,-1190.71 618.13,-1186.2 632.59,-1182 644.34,-1178.58 656.94,-1174.88 668.9,-1171.34" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="669.58,-1174.79 678.17,-1168.59 667.59,-1168.08 669.58,-1174.79" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- key -->
|
||||||
|
<g id="node40" class="node" pointer-events="visible" data-name="key">
|
||||||
|
|
||||||
|
<polygon fill="#edad56" stroke="none" stroke-width="3" points="159.61,-1455 29.61,-1455 29.61,-1367 159.61,-1367 159.61,-1455" style=""/>
|
||||||
|
<text text-anchor="start" x="79.24" y="-1436.4" font-family="Times,serif" font-size="14.00" style="">Internal Call</text>
|
||||||
|
<text text-anchor="start" x="75.35" y="-1416.4" font-family="Times,serif" font-size="14.00" style="">External Call</text>
|
||||||
|
<text text-anchor="start" x="52.81" y="-1396.4" font-family="Times,serif" font-size="14.00" style="">Defined Contract</text>
|
||||||
|
<text text-anchor="start" x="39.21" y="-1376.4" font-family="Times,serif" font-size="14.00" style="">Undefined Contract</text>
|
||||||
|
</g>
|
||||||
|
<!-- key2 -->
|
||||||
|
<g id="node41" class="node" pointer-events="visible" data-name="key2">
|
||||||
|
|
||||||
|
<polygon fill="#edad56" stroke="none" stroke-width="3" points="334.11,-1455 280.11,-1455 280.11,-1367 334.11,-1367 334.11,-1455" style=""/>
|
||||||
|
<text text-anchor="start" x="297.11" y="-1436.4" font-family="Times,serif" font-size="14.00" style=""> </text>
|
||||||
|
<text text-anchor="start" x="297.11" y="-1416.4" font-family="Times,serif" font-size="14.00" style=""> </text>
|
||||||
|
<polygon fill="#445773" stroke="none" points="295.11,-1391 295.11,-1411 320.11,-1411 320.11,-1391 295.11,-1391" style=""/>
|
||||||
|
<text text-anchor="start" x="297.11" y="-1396.4" font-family="Times,serif" font-size="14.00" style=""> </text>
|
||||||
|
<polygon fill="none" stroke="#e8726d" points="297.11,-1373 297.11,-1389 318.11,-1389 318.11,-1373 297.11,-1373" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- key->key2 -->
|
||||||
|
<g id="edge41" class="edge" data-name="key->key2">
|
||||||
|
|
||||||
|
<path fill="none" stroke="#1bc6a6" stroke-width="2" d="M152.61,-1441C210.95,-1441 228.7,-1441 281.18,-1441" style=""/>
|
||||||
|
<polygon fill="#1bc6a6" stroke="#1bc6a6" stroke-width="2" points="281.08,-1444.5 291.08,-1441 281.08,-1437.5 281.08,-1444.5" style=""/>
|
||||||
|
</g>
|
||||||
|
<!-- key->key2 -->
|
||||||
|
<g id="edge42" class="edge" data-name="key->key2">
|
||||||
|
|
||||||
|
<path fill="none" stroke="white" stroke-width="2" d="M152.61,-1421C210.95,-1421 228.7,-1421 281.18,-1421" style=""/>
|
||||||
|
<polygon fill="white" stroke="white" stroke-width="2" points="281.08,-1424.5 291.08,-1421 281.08,-1417.5 281.08,-1424.5" style=""/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 36 KiB |
68
docs/lib/auth/Owned.md
Normal file
68
docs/lib/auth/Owned.md
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
# Owned
|
||||||
|
|
||||||
|
*Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/Owned.sol)*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Simple single owner authorization mixin.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### owner
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function owner() external view returns (address)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | address | undefined |
|
||||||
|
|
||||||
|
### setOwner
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function setOwner(address newOwner) external nonpayable
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| newOwner | address | undefined |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Events
|
||||||
|
|
||||||
|
### OwnerUpdated
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
event OwnerUpdated(address indexed user, address indexed newOwner)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| user `indexed` | address | undefined |
|
||||||
|
| newOwner `indexed` | address | undefined |
|
||||||
|
|
||||||
|
|
||||||
|
|
298
docs/lib/mock/MockToken.md
Normal file
298
docs/lib/mock/MockToken.md
Normal file
@ -0,0 +1,298 @@
|
|||||||
|
# MockToken
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### DOMAIN_SEPARATOR
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function DOMAIN_SEPARATOR() external view returns (bytes32)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | bytes32 | undefined |
|
||||||
|
|
||||||
|
### allowance
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function allowance(address, address) external view returns (uint256)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | address | undefined |
|
||||||
|
| _1 | address | undefined |
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | uint256 | undefined |
|
||||||
|
|
||||||
|
### approve
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function approve(address spender, uint256 amount) external nonpayable returns (bool)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| spender | address | undefined |
|
||||||
|
| amount | uint256 | undefined |
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | bool | undefined |
|
||||||
|
|
||||||
|
### balanceOf
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function balanceOf(address) external view returns (uint256)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | address | undefined |
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | uint256 | undefined |
|
||||||
|
|
||||||
|
### decimals
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function decimals() external view returns (uint8)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | uint8 | undefined |
|
||||||
|
|
||||||
|
### name
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function name() external view returns (string)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | string | undefined |
|
||||||
|
|
||||||
|
### nonces
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function nonces(address) external view returns (uint256)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | address | undefined |
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | uint256 | undefined |
|
||||||
|
|
||||||
|
### permit
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external nonpayable
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| owner | address | undefined |
|
||||||
|
| spender | address | undefined |
|
||||||
|
| value | uint256 | undefined |
|
||||||
|
| deadline | uint256 | undefined |
|
||||||
|
| v | uint8 | undefined |
|
||||||
|
| r | bytes32 | undefined |
|
||||||
|
| s | bytes32 | undefined |
|
||||||
|
|
||||||
|
### symbol
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function symbol() external view returns (string)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | string | undefined |
|
||||||
|
|
||||||
|
### totalSupply
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function totalSupply() external view returns (uint256)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | uint256 | undefined |
|
||||||
|
|
||||||
|
### transfer
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function transfer(address to, uint256 amount) external nonpayable returns (bool)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| to | address | undefined |
|
||||||
|
| amount | uint256 | undefined |
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | bool | undefined |
|
||||||
|
|
||||||
|
### transferFrom
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function transferFrom(address from, address to, uint256 amount) external nonpayable returns (bool)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| from | address | undefined |
|
||||||
|
| to | address | undefined |
|
||||||
|
| amount | uint256 | undefined |
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | bool | undefined |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Events
|
||||||
|
|
||||||
|
### Approval
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
event Approval(address indexed owner, address indexed spender, uint256 amount)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| owner `indexed` | address | undefined |
|
||||||
|
| spender `indexed` | address | undefined |
|
||||||
|
| amount | uint256 | undefined |
|
||||||
|
|
||||||
|
### Transfer
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
event Transfer(address indexed from, address indexed to, uint256 amount)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| from `indexed` | address | undefined |
|
||||||
|
| to `indexed` | address | undefined |
|
||||||
|
| amount | uint256 | undefined |
|
||||||
|
|
||||||
|
|
||||||
|
|
298
docs/lib/tokens/ERC20.md
Normal file
298
docs/lib/tokens/ERC20.md
Normal file
@ -0,0 +1,298 @@
|
|||||||
|
# ERC20
|
||||||
|
|
||||||
|
*Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol)Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Modern and gas efficient ERC20 + EIP-2612 implementation.
|
||||||
|
|
||||||
|
*Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.*
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### DOMAIN_SEPARATOR
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function DOMAIN_SEPARATOR() external view returns (bytes32)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | bytes32 | undefined |
|
||||||
|
|
||||||
|
### allowance
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function allowance(address, address) external view returns (uint256)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | address | undefined |
|
||||||
|
| _1 | address | undefined |
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | uint256 | undefined |
|
||||||
|
|
||||||
|
### approve
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function approve(address spender, uint256 amount) external nonpayable returns (bool)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| spender | address | undefined |
|
||||||
|
| amount | uint256 | undefined |
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | bool | undefined |
|
||||||
|
|
||||||
|
### balanceOf
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function balanceOf(address) external view returns (uint256)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | address | undefined |
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | uint256 | undefined |
|
||||||
|
|
||||||
|
### decimals
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function decimals() external view returns (uint8)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | uint8 | undefined |
|
||||||
|
|
||||||
|
### name
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function name() external view returns (string)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | string | undefined |
|
||||||
|
|
||||||
|
### nonces
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function nonces(address) external view returns (uint256)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | address | undefined |
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | uint256 | undefined |
|
||||||
|
|
||||||
|
### permit
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external nonpayable
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| owner | address | undefined |
|
||||||
|
| spender | address | undefined |
|
||||||
|
| value | uint256 | undefined |
|
||||||
|
| deadline | uint256 | undefined |
|
||||||
|
| v | uint8 | undefined |
|
||||||
|
| r | bytes32 | undefined |
|
||||||
|
| s | bytes32 | undefined |
|
||||||
|
|
||||||
|
### symbol
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function symbol() external view returns (string)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | string | undefined |
|
||||||
|
|
||||||
|
### totalSupply
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function totalSupply() external view returns (uint256)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | uint256 | undefined |
|
||||||
|
|
||||||
|
### transfer
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function transfer(address to, uint256 amount) external nonpayable returns (bool)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| to | address | undefined |
|
||||||
|
| amount | uint256 | undefined |
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | bool | undefined |
|
||||||
|
|
||||||
|
### transferFrom
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
function transferFrom(address from, address to, uint256 amount) external nonpayable returns (bool)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| from | address | undefined |
|
||||||
|
| to | address | undefined |
|
||||||
|
| amount | uint256 | undefined |
|
||||||
|
|
||||||
|
#### Returns
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| _0 | bool | undefined |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Events
|
||||||
|
|
||||||
|
### Approval
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
event Approval(address indexed owner, address indexed spender, uint256 amount)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| owner `indexed` | address | undefined |
|
||||||
|
| spender `indexed` | address | undefined |
|
||||||
|
| amount | uint256 | undefined |
|
||||||
|
|
||||||
|
### Transfer
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
event Transfer(address indexed from, address indexed to, uint256 amount)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| from `indexed` | address | undefined |
|
||||||
|
| to `indexed` | address | undefined |
|
||||||
|
| amount | uint256 | undefined |
|
||||||
|
|
||||||
|
|
||||||
|
|
26
docs/lib/utils/Counters.md
Normal file
26
docs/lib/utils/Counters.md
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# Counters
|
||||||
|
|
||||||
|
*buf0t9Modified from OpenZeppelin Contracts (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Counters.sol)*
|
||||||
|
|
||||||
|
> Counters
|
||||||
|
|
||||||
|
Provides counters that can only be incremented, decrementedor reset.
|
||||||
|
|
||||||
|
*Include with `using Counters for Counters.Counter;`*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Errors
|
||||||
|
|
||||||
|
### DecOverflow
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
error DecOverflow()
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*0xce3a3d37*
|
||||||
|
|
||||||
|
|
||||||
|
|
26
docs/lib/utils/ReentrancyGuard.md
Normal file
26
docs/lib/utils/ReentrancyGuard.md
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# ReentrancyGuard
|
||||||
|
|
||||||
|
*z0r0z.ethModified from Seaport (https://github.com/ProjectOpenSea/seaport/blob/main/contracts/lib/ReentrancyGuard.sol)Modified from Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/ReentrancyGuard.sol)*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reentrancy protection for smart contracts.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Errors
|
||||||
|
|
||||||
|
### Reentrancy
|
||||||
|
|
||||||
|
```solidity
|
||||||
|
error Reentrancy()
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
12
docs/lib/utils/SafeTransferLib.md
Normal file
12
docs/lib/utils/SafeTransferLib.md
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# SafeTransferLib
|
||||||
|
|
||||||
|
*Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SafeTransferLib.sol)*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Safe ETH and ERC20 transfer library that gracefully handles missing return values.
|
||||||
|
|
||||||
|
*Caution! This library won't check that a token has code, responsibility is delegated to the caller.*
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -16,33 +16,32 @@ export interface EventAndErrorsInterface extends utils.Interface {
|
|||||||
functions: {};
|
functions: {};
|
||||||
|
|
||||||
events: {
|
events: {
|
||||||
"DepositAdded(address,uint256,address,uint256,uint256)": EventFragment;
|
"DepositAdded(address,uint256,address,uint256)": EventFragment;
|
||||||
"DepositClosed(address,uint256)": EventFragment;
|
"DepositClosed(address,uint256)": EventFragment;
|
||||||
"DepositWithdrawn(address,uint256,uint256)": EventFragment;
|
"DepositWithdrawn(address,uint256,uint256)": EventFragment;
|
||||||
|
"FundsWithdrawn(address,uint256)": EventFragment;
|
||||||
"LockAdded(address,bytes32,uint256,uint256)": EventFragment;
|
"LockAdded(address,bytes32,uint256,uint256)": EventFragment;
|
||||||
"LockReleased(address,bytes32)": EventFragment;
|
"LockReleased(address,bytes32)": EventFragment;
|
||||||
"LockReturned(address,bytes32)": EventFragment;
|
"LockReturned(address,bytes32)": EventFragment;
|
||||||
"PremiumsWithdrawn(address,uint256)": EventFragment;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
getEvent(nameOrSignatureOrTopic: "DepositAdded"): EventFragment;
|
getEvent(nameOrSignatureOrTopic: "DepositAdded"): EventFragment;
|
||||||
getEvent(nameOrSignatureOrTopic: "DepositClosed"): EventFragment;
|
getEvent(nameOrSignatureOrTopic: "DepositClosed"): EventFragment;
|
||||||
getEvent(nameOrSignatureOrTopic: "DepositWithdrawn"): EventFragment;
|
getEvent(nameOrSignatureOrTopic: "DepositWithdrawn"): EventFragment;
|
||||||
|
getEvent(nameOrSignatureOrTopic: "FundsWithdrawn"): EventFragment;
|
||||||
getEvent(nameOrSignatureOrTopic: "LockAdded"): EventFragment;
|
getEvent(nameOrSignatureOrTopic: "LockAdded"): EventFragment;
|
||||||
getEvent(nameOrSignatureOrTopic: "LockReleased"): EventFragment;
|
getEvent(nameOrSignatureOrTopic: "LockReleased"): EventFragment;
|
||||||
getEvent(nameOrSignatureOrTopic: "LockReturned"): EventFragment;
|
getEvent(nameOrSignatureOrTopic: "LockReturned"): EventFragment;
|
||||||
getEvent(nameOrSignatureOrTopic: "PremiumsWithdrawn"): EventFragment;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DepositAddedEventObject {
|
export interface DepositAddedEventObject {
|
||||||
seller: string;
|
seller: string;
|
||||||
depositID: BigNumber;
|
depositID: BigNumber;
|
||||||
token: string;
|
token: string;
|
||||||
premium: BigNumber;
|
|
||||||
amount: BigNumber;
|
amount: BigNumber;
|
||||||
}
|
}
|
||||||
export type DepositAddedEvent = TypedEvent<
|
export type DepositAddedEvent = TypedEvent<
|
||||||
[string, BigNumber, string, BigNumber, BigNumber],
|
[string, BigNumber, string, BigNumber],
|
||||||
DepositAddedEventObject
|
DepositAddedEventObject
|
||||||
>;
|
>;
|
||||||
|
|
||||||
@ -72,6 +71,17 @@ export type DepositWithdrawnEvent = TypedEvent<
|
|||||||
export type DepositWithdrawnEventFilter =
|
export type DepositWithdrawnEventFilter =
|
||||||
TypedEventFilter<DepositWithdrawnEvent>;
|
TypedEventFilter<DepositWithdrawnEvent>;
|
||||||
|
|
||||||
|
export interface FundsWithdrawnEventObject {
|
||||||
|
owner: string;
|
||||||
|
amount: BigNumber;
|
||||||
|
}
|
||||||
|
export type FundsWithdrawnEvent = TypedEvent<
|
||||||
|
[string, BigNumber],
|
||||||
|
FundsWithdrawnEventObject
|
||||||
|
>;
|
||||||
|
|
||||||
|
export type FundsWithdrawnEventFilter = TypedEventFilter<FundsWithdrawnEvent>;
|
||||||
|
|
||||||
export interface LockAddedEventObject {
|
export interface LockAddedEventObject {
|
||||||
buyer: string;
|
buyer: string;
|
||||||
lockID: string;
|
lockID: string;
|
||||||
@ -107,18 +117,6 @@ export type LockReturnedEvent = TypedEvent<
|
|||||||
|
|
||||||
export type LockReturnedEventFilter = TypedEventFilter<LockReturnedEvent>;
|
export type LockReturnedEventFilter = TypedEventFilter<LockReturnedEvent>;
|
||||||
|
|
||||||
export interface PremiumsWithdrawnEventObject {
|
|
||||||
owner: string;
|
|
||||||
amount: BigNumber;
|
|
||||||
}
|
|
||||||
export type PremiumsWithdrawnEvent = TypedEvent<
|
|
||||||
[string, BigNumber],
|
|
||||||
PremiumsWithdrawnEventObject
|
|
||||||
>;
|
|
||||||
|
|
||||||
export type PremiumsWithdrawnEventFilter =
|
|
||||||
TypedEventFilter<PremiumsWithdrawnEvent>;
|
|
||||||
|
|
||||||
export interface EventAndErrors extends BaseContract {
|
export interface EventAndErrors extends BaseContract {
|
||||||
connect(signerOrProvider: Signer | Provider | string): this;
|
connect(signerOrProvider: Signer | Provider | string): this;
|
||||||
attach(addressOrName: string): this;
|
attach(addressOrName: string): this;
|
||||||
@ -150,18 +148,16 @@ export interface EventAndErrors extends BaseContract {
|
|||||||
callStatic: {};
|
callStatic: {};
|
||||||
|
|
||||||
filters: {
|
filters: {
|
||||||
"DepositAdded(address,uint256,address,uint256,uint256)"(
|
"DepositAdded(address,uint256,address,uint256)"(
|
||||||
seller?: PromiseOrValue<string> | null,
|
seller?: PromiseOrValue<string> | null,
|
||||||
depositID?: null,
|
depositID?: null,
|
||||||
token?: null,
|
token?: null,
|
||||||
premium?: null,
|
|
||||||
amount?: null
|
amount?: null
|
||||||
): DepositAddedEventFilter;
|
): DepositAddedEventFilter;
|
||||||
DepositAdded(
|
DepositAdded(
|
||||||
seller?: PromiseOrValue<string> | null,
|
seller?: PromiseOrValue<string> | null,
|
||||||
depositID?: null,
|
depositID?: null,
|
||||||
token?: null,
|
token?: null,
|
||||||
premium?: null,
|
|
||||||
amount?: null
|
amount?: null
|
||||||
): DepositAddedEventFilter;
|
): DepositAddedEventFilter;
|
||||||
|
|
||||||
@ -185,6 +181,12 @@ export interface EventAndErrors extends BaseContract {
|
|||||||
amount?: null
|
amount?: null
|
||||||
): DepositWithdrawnEventFilter;
|
): DepositWithdrawnEventFilter;
|
||||||
|
|
||||||
|
"FundsWithdrawn(address,uint256)"(
|
||||||
|
owner?: null,
|
||||||
|
amount?: null
|
||||||
|
): FundsWithdrawnEventFilter;
|
||||||
|
FundsWithdrawn(owner?: null, amount?: null): FundsWithdrawnEventFilter;
|
||||||
|
|
||||||
"LockAdded(address,bytes32,uint256,uint256)"(
|
"LockAdded(address,bytes32,uint256,uint256)"(
|
||||||
buyer?: PromiseOrValue<string> | null,
|
buyer?: PromiseOrValue<string> | null,
|
||||||
lockID?: PromiseOrValue<BytesLike> | null,
|
lockID?: PromiseOrValue<BytesLike> | null,
|
||||||
@ -215,15 +217,6 @@ export interface EventAndErrors extends BaseContract {
|
|||||||
buyer?: PromiseOrValue<string> | null,
|
buyer?: PromiseOrValue<string> | null,
|
||||||
lockId?: null
|
lockId?: null
|
||||||
): LockReturnedEventFilter;
|
): LockReturnedEventFilter;
|
||||||
|
|
||||||
"PremiumsWithdrawn(address,uint256)"(
|
|
||||||
owner?: null,
|
|
||||||
amount?: null
|
|
||||||
): PremiumsWithdrawnEventFilter;
|
|
||||||
PremiumsWithdrawn(
|
|
||||||
owner?: null,
|
|
||||||
amount?: null
|
|
||||||
): PremiumsWithdrawnEventFilter;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
estimateGas: {};
|
estimateGas: {};
|
||||||
|
@ -76,12 +76,6 @@ const _abi = [
|
|||||||
name: "token",
|
name: "token",
|
||||||
type: "address",
|
type: "address",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
indexed: false,
|
|
||||||
internalType: "uint256",
|
|
||||||
name: "premium",
|
|
||||||
type: "uint256",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
indexed: false,
|
indexed: false,
|
||||||
internalType: "uint256",
|
internalType: "uint256",
|
||||||
@ -136,6 +130,25 @@ const _abi = [
|
|||||||
name: "DepositWithdrawn",
|
name: "DepositWithdrawn",
|
||||||
type: "event",
|
type: "event",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
anonymous: false,
|
||||||
|
inputs: [
|
||||||
|
{
|
||||||
|
indexed: false,
|
||||||
|
internalType: "address",
|
||||||
|
name: "owner",
|
||||||
|
type: "address",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
indexed: false,
|
||||||
|
internalType: "uint256",
|
||||||
|
name: "amount",
|
||||||
|
type: "uint256",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
name: "FundsWithdrawn",
|
||||||
|
type: "event",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
anonymous: false,
|
anonymous: false,
|
||||||
inputs: [
|
inputs: [
|
||||||
@ -205,25 +218,6 @@ const _abi = [
|
|||||||
name: "LockReturned",
|
name: "LockReturned",
|
||||||
type: "event",
|
type: "event",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
anonymous: false,
|
|
||||||
inputs: [
|
|
||||||
{
|
|
||||||
indexed: false,
|
|
||||||
internalType: "address",
|
|
||||||
name: "owner",
|
|
||||||
type: "address",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
indexed: false,
|
|
||||||
internalType: "uint256",
|
|
||||||
name: "amount",
|
|
||||||
type: "uint256",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
name: "PremiumsWithdrawn",
|
|
||||||
type: "event",
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
export class EventAndErrors__factory {
|
export class EventAndErrors__factory {
|
||||||
|
File diff suppressed because one or more lines are too long
@ -9,7 +9,6 @@ import type {
|
|||||||
CallOverrides,
|
CallOverrides,
|
||||||
ContractTransaction,
|
ContractTransaction,
|
||||||
Overrides,
|
Overrides,
|
||||||
PayableOverrides,
|
|
||||||
PopulatedTransaction,
|
PopulatedTransaction,
|
||||||
Signer,
|
Signer,
|
||||||
utils,
|
utils,
|
||||||
@ -44,7 +43,7 @@ export interface P2PIXInterface extends utils.Interface {
|
|||||||
"unlockExpired(bytes32[])": FunctionFragment;
|
"unlockExpired(bytes32[])": FunctionFragment;
|
||||||
"validBacenSigners(uint256)": FunctionFragment;
|
"validBacenSigners(uint256)": FunctionFragment;
|
||||||
"withdraw(uint256,bytes32[])": FunctionFragment;
|
"withdraw(uint256,bytes32[])": FunctionFragment;
|
||||||
"withdrawPremiums()": FunctionFragment;
|
"withdrawBalance()": FunctionFragment;
|
||||||
};
|
};
|
||||||
|
|
||||||
getFunction(
|
getFunction(
|
||||||
@ -63,7 +62,7 @@ export interface P2PIXInterface extends utils.Interface {
|
|||||||
| "unlockExpired"
|
| "unlockExpired"
|
||||||
| "validBacenSigners"
|
| "validBacenSigners"
|
||||||
| "withdraw"
|
| "withdraw"
|
||||||
| "withdrawPremiums"
|
| "withdrawBalance"
|
||||||
): FunctionFragment;
|
): FunctionFragment;
|
||||||
|
|
||||||
encodeFunctionData(
|
encodeFunctionData(
|
||||||
@ -137,7 +136,7 @@ export interface P2PIXInterface extends utils.Interface {
|
|||||||
values: [PromiseOrValue<BigNumberish>, PromiseOrValue<BytesLike>[]]
|
values: [PromiseOrValue<BigNumberish>, PromiseOrValue<BytesLike>[]]
|
||||||
): string;
|
): string;
|
||||||
encodeFunctionData(
|
encodeFunctionData(
|
||||||
functionFragment: "withdrawPremiums",
|
functionFragment: "withdrawBalance",
|
||||||
values?: undefined
|
values?: undefined
|
||||||
): string;
|
): string;
|
||||||
|
|
||||||
@ -177,40 +176,39 @@ export interface P2PIXInterface extends utils.Interface {
|
|||||||
): Result;
|
): Result;
|
||||||
decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result;
|
decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result;
|
||||||
decodeFunctionResult(
|
decodeFunctionResult(
|
||||||
functionFragment: "withdrawPremiums",
|
functionFragment: "withdrawBalance",
|
||||||
data: BytesLike
|
data: BytesLike
|
||||||
): Result;
|
): Result;
|
||||||
|
|
||||||
events: {
|
events: {
|
||||||
"DepositAdded(address,uint256,address,uint256,uint256)": EventFragment;
|
"DepositAdded(address,uint256,address,uint256)": EventFragment;
|
||||||
"DepositClosed(address,uint256)": EventFragment;
|
"DepositClosed(address,uint256)": EventFragment;
|
||||||
"DepositWithdrawn(address,uint256,uint256)": EventFragment;
|
"DepositWithdrawn(address,uint256,uint256)": EventFragment;
|
||||||
|
"FundsWithdrawn(address,uint256)": EventFragment;
|
||||||
"LockAdded(address,bytes32,uint256,uint256)": EventFragment;
|
"LockAdded(address,bytes32,uint256,uint256)": EventFragment;
|
||||||
"LockReleased(address,bytes32)": EventFragment;
|
"LockReleased(address,bytes32)": EventFragment;
|
||||||
"LockReturned(address,bytes32)": EventFragment;
|
"LockReturned(address,bytes32)": EventFragment;
|
||||||
"OwnerUpdated(address,address)": EventFragment;
|
"OwnerUpdated(address,address)": EventFragment;
|
||||||
"PremiumsWithdrawn(address,uint256)": EventFragment;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
getEvent(nameOrSignatureOrTopic: "DepositAdded"): EventFragment;
|
getEvent(nameOrSignatureOrTopic: "DepositAdded"): EventFragment;
|
||||||
getEvent(nameOrSignatureOrTopic: "DepositClosed"): EventFragment;
|
getEvent(nameOrSignatureOrTopic: "DepositClosed"): EventFragment;
|
||||||
getEvent(nameOrSignatureOrTopic: "DepositWithdrawn"): EventFragment;
|
getEvent(nameOrSignatureOrTopic: "DepositWithdrawn"): EventFragment;
|
||||||
|
getEvent(nameOrSignatureOrTopic: "FundsWithdrawn"): EventFragment;
|
||||||
getEvent(nameOrSignatureOrTopic: "LockAdded"): EventFragment;
|
getEvent(nameOrSignatureOrTopic: "LockAdded"): EventFragment;
|
||||||
getEvent(nameOrSignatureOrTopic: "LockReleased"): EventFragment;
|
getEvent(nameOrSignatureOrTopic: "LockReleased"): EventFragment;
|
||||||
getEvent(nameOrSignatureOrTopic: "LockReturned"): EventFragment;
|
getEvent(nameOrSignatureOrTopic: "LockReturned"): EventFragment;
|
||||||
getEvent(nameOrSignatureOrTopic: "OwnerUpdated"): EventFragment;
|
getEvent(nameOrSignatureOrTopic: "OwnerUpdated"): EventFragment;
|
||||||
getEvent(nameOrSignatureOrTopic: "PremiumsWithdrawn"): EventFragment;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DepositAddedEventObject {
|
export interface DepositAddedEventObject {
|
||||||
seller: string;
|
seller: string;
|
||||||
depositID: BigNumber;
|
depositID: BigNumber;
|
||||||
token: string;
|
token: string;
|
||||||
premium: BigNumber;
|
|
||||||
amount: BigNumber;
|
amount: BigNumber;
|
||||||
}
|
}
|
||||||
export type DepositAddedEvent = TypedEvent<
|
export type DepositAddedEvent = TypedEvent<
|
||||||
[string, BigNumber, string, BigNumber, BigNumber],
|
[string, BigNumber, string, BigNumber],
|
||||||
DepositAddedEventObject
|
DepositAddedEventObject
|
||||||
>;
|
>;
|
||||||
|
|
||||||
@ -240,6 +238,17 @@ export type DepositWithdrawnEvent = TypedEvent<
|
|||||||
export type DepositWithdrawnEventFilter =
|
export type DepositWithdrawnEventFilter =
|
||||||
TypedEventFilter<DepositWithdrawnEvent>;
|
TypedEventFilter<DepositWithdrawnEvent>;
|
||||||
|
|
||||||
|
export interface FundsWithdrawnEventObject {
|
||||||
|
owner: string;
|
||||||
|
amount: BigNumber;
|
||||||
|
}
|
||||||
|
export type FundsWithdrawnEvent = TypedEvent<
|
||||||
|
[string, BigNumber],
|
||||||
|
FundsWithdrawnEventObject
|
||||||
|
>;
|
||||||
|
|
||||||
|
export type FundsWithdrawnEventFilter = TypedEventFilter<FundsWithdrawnEvent>;
|
||||||
|
|
||||||
export interface LockAddedEventObject {
|
export interface LockAddedEventObject {
|
||||||
buyer: string;
|
buyer: string;
|
||||||
lockID: string;
|
lockID: string;
|
||||||
@ -286,18 +295,6 @@ export type OwnerUpdatedEvent = TypedEvent<
|
|||||||
|
|
||||||
export type OwnerUpdatedEventFilter = TypedEventFilter<OwnerUpdatedEvent>;
|
export type OwnerUpdatedEventFilter = TypedEventFilter<OwnerUpdatedEvent>;
|
||||||
|
|
||||||
export interface PremiumsWithdrawnEventObject {
|
|
||||||
owner: string;
|
|
||||||
amount: BigNumber;
|
|
||||||
}
|
|
||||||
export type PremiumsWithdrawnEvent = TypedEvent<
|
|
||||||
[string, BigNumber],
|
|
||||||
PremiumsWithdrawnEventObject
|
|
||||||
>;
|
|
||||||
|
|
||||||
export type PremiumsWithdrawnEventFilter =
|
|
||||||
TypedEventFilter<PremiumsWithdrawnEvent>;
|
|
||||||
|
|
||||||
export interface P2PIX extends BaseContract {
|
export interface P2PIX extends BaseContract {
|
||||||
connect(signerOrProvider: Signer | Provider | string): this;
|
connect(signerOrProvider: Signer | Provider | string): this;
|
||||||
attach(addressOrName: string): this;
|
attach(addressOrName: string): this;
|
||||||
@ -338,10 +335,10 @@ export interface P2PIX extends BaseContract {
|
|||||||
defaultLockBlocks(overrides?: CallOverrides): Promise<[BigNumber]>;
|
defaultLockBlocks(overrides?: CallOverrides): Promise<[BigNumber]>;
|
||||||
|
|
||||||
deposit(
|
deposit(
|
||||||
token: PromiseOrValue<string>,
|
_token: PromiseOrValue<string>,
|
||||||
amount: PromiseOrValue<BigNumberish>,
|
_amount: PromiseOrValue<BigNumberish>,
|
||||||
pixTarget: PromiseOrValue<string>,
|
_pixTarget: PromiseOrValue<string>,
|
||||||
overrides?: PayableOverrides & { from?: PromiseOrValue<string> }
|
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
||||||
): Promise<ContractTransaction>;
|
): Promise<ContractTransaction>;
|
||||||
|
|
||||||
depositCount(
|
depositCount(
|
||||||
@ -362,9 +359,8 @@ export interface P2PIX extends BaseContract {
|
|||||||
arg0: PromiseOrValue<BigNumberish>,
|
arg0: PromiseOrValue<BigNumberish>,
|
||||||
overrides?: CallOverrides
|
overrides?: CallOverrides
|
||||||
): Promise<
|
): Promise<
|
||||||
[BigNumber, BigNumber, string, string, string, boolean] & {
|
[BigNumber, string, string, string, boolean] & {
|
||||||
remaining: BigNumber;
|
remaining: BigNumber;
|
||||||
premium: BigNumber;
|
|
||||||
pixTarget: string;
|
pixTarget: string;
|
||||||
seller: string;
|
seller: string;
|
||||||
token: string;
|
token: string;
|
||||||
@ -418,7 +414,7 @@ export interface P2PIX extends BaseContract {
|
|||||||
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
||||||
): Promise<ContractTransaction>;
|
): Promise<ContractTransaction>;
|
||||||
|
|
||||||
withdrawPremiums(
|
withdrawBalance(
|
||||||
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
||||||
): Promise<ContractTransaction>;
|
): Promise<ContractTransaction>;
|
||||||
};
|
};
|
||||||
@ -436,10 +432,10 @@ export interface P2PIX extends BaseContract {
|
|||||||
defaultLockBlocks(overrides?: CallOverrides): Promise<BigNumber>;
|
defaultLockBlocks(overrides?: CallOverrides): Promise<BigNumber>;
|
||||||
|
|
||||||
deposit(
|
deposit(
|
||||||
token: PromiseOrValue<string>,
|
_token: PromiseOrValue<string>,
|
||||||
amount: PromiseOrValue<BigNumberish>,
|
_amount: PromiseOrValue<BigNumberish>,
|
||||||
pixTarget: PromiseOrValue<string>,
|
_pixTarget: PromiseOrValue<string>,
|
||||||
overrides?: PayableOverrides & { from?: PromiseOrValue<string> }
|
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
||||||
): Promise<ContractTransaction>;
|
): Promise<ContractTransaction>;
|
||||||
|
|
||||||
depositCount(overrides?: CallOverrides): Promise<BigNumber>;
|
depositCount(overrides?: CallOverrides): Promise<BigNumber>;
|
||||||
@ -458,9 +454,8 @@ export interface P2PIX extends BaseContract {
|
|||||||
arg0: PromiseOrValue<BigNumberish>,
|
arg0: PromiseOrValue<BigNumberish>,
|
||||||
overrides?: CallOverrides
|
overrides?: CallOverrides
|
||||||
): Promise<
|
): Promise<
|
||||||
[BigNumber, BigNumber, string, string, string, boolean] & {
|
[BigNumber, string, string, string, boolean] & {
|
||||||
remaining: BigNumber;
|
remaining: BigNumber;
|
||||||
premium: BigNumber;
|
|
||||||
pixTarget: string;
|
pixTarget: string;
|
||||||
seller: string;
|
seller: string;
|
||||||
token: string;
|
token: string;
|
||||||
@ -514,7 +509,7 @@ export interface P2PIX extends BaseContract {
|
|||||||
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
||||||
): Promise<ContractTransaction>;
|
): Promise<ContractTransaction>;
|
||||||
|
|
||||||
withdrawPremiums(
|
withdrawBalance(
|
||||||
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
||||||
): Promise<ContractTransaction>;
|
): Promise<ContractTransaction>;
|
||||||
|
|
||||||
@ -532,9 +527,9 @@ export interface P2PIX extends BaseContract {
|
|||||||
defaultLockBlocks(overrides?: CallOverrides): Promise<BigNumber>;
|
defaultLockBlocks(overrides?: CallOverrides): Promise<BigNumber>;
|
||||||
|
|
||||||
deposit(
|
deposit(
|
||||||
token: PromiseOrValue<string>,
|
_token: PromiseOrValue<string>,
|
||||||
amount: PromiseOrValue<BigNumberish>,
|
_amount: PromiseOrValue<BigNumberish>,
|
||||||
pixTarget: PromiseOrValue<string>,
|
_pixTarget: PromiseOrValue<string>,
|
||||||
overrides?: CallOverrides
|
overrides?: CallOverrides
|
||||||
): Promise<BigNumber>;
|
): Promise<BigNumber>;
|
||||||
|
|
||||||
@ -554,9 +549,8 @@ export interface P2PIX extends BaseContract {
|
|||||||
arg0: PromiseOrValue<BigNumberish>,
|
arg0: PromiseOrValue<BigNumberish>,
|
||||||
overrides?: CallOverrides
|
overrides?: CallOverrides
|
||||||
): Promise<
|
): Promise<
|
||||||
[BigNumber, BigNumber, string, string, string, boolean] & {
|
[BigNumber, string, string, string, boolean] & {
|
||||||
remaining: BigNumber;
|
remaining: BigNumber;
|
||||||
premium: BigNumber;
|
|
||||||
pixTarget: string;
|
pixTarget: string;
|
||||||
seller: string;
|
seller: string;
|
||||||
token: string;
|
token: string;
|
||||||
@ -610,22 +604,20 @@ export interface P2PIX extends BaseContract {
|
|||||||
overrides?: CallOverrides
|
overrides?: CallOverrides
|
||||||
): Promise<void>;
|
): Promise<void>;
|
||||||
|
|
||||||
withdrawPremiums(overrides?: CallOverrides): Promise<void>;
|
withdrawBalance(overrides?: CallOverrides): Promise<void>;
|
||||||
};
|
};
|
||||||
|
|
||||||
filters: {
|
filters: {
|
||||||
"DepositAdded(address,uint256,address,uint256,uint256)"(
|
"DepositAdded(address,uint256,address,uint256)"(
|
||||||
seller?: PromiseOrValue<string> | null,
|
seller?: PromiseOrValue<string> | null,
|
||||||
depositID?: null,
|
depositID?: null,
|
||||||
token?: null,
|
token?: null,
|
||||||
premium?: null,
|
|
||||||
amount?: null
|
amount?: null
|
||||||
): DepositAddedEventFilter;
|
): DepositAddedEventFilter;
|
||||||
DepositAdded(
|
DepositAdded(
|
||||||
seller?: PromiseOrValue<string> | null,
|
seller?: PromiseOrValue<string> | null,
|
||||||
depositID?: null,
|
depositID?: null,
|
||||||
token?: null,
|
token?: null,
|
||||||
premium?: null,
|
|
||||||
amount?: null
|
amount?: null
|
||||||
): DepositAddedEventFilter;
|
): DepositAddedEventFilter;
|
||||||
|
|
||||||
@ -649,6 +641,12 @@ export interface P2PIX extends BaseContract {
|
|||||||
amount?: null
|
amount?: null
|
||||||
): DepositWithdrawnEventFilter;
|
): DepositWithdrawnEventFilter;
|
||||||
|
|
||||||
|
"FundsWithdrawn(address,uint256)"(
|
||||||
|
owner?: null,
|
||||||
|
amount?: null
|
||||||
|
): FundsWithdrawnEventFilter;
|
||||||
|
FundsWithdrawn(owner?: null, amount?: null): FundsWithdrawnEventFilter;
|
||||||
|
|
||||||
"LockAdded(address,bytes32,uint256,uint256)"(
|
"LockAdded(address,bytes32,uint256,uint256)"(
|
||||||
buyer?: PromiseOrValue<string> | null,
|
buyer?: PromiseOrValue<string> | null,
|
||||||
lockID?: PromiseOrValue<BytesLike> | null,
|
lockID?: PromiseOrValue<BytesLike> | null,
|
||||||
@ -688,15 +686,6 @@ export interface P2PIX extends BaseContract {
|
|||||||
user?: PromiseOrValue<string> | null,
|
user?: PromiseOrValue<string> | null,
|
||||||
newOwner?: PromiseOrValue<string> | null
|
newOwner?: PromiseOrValue<string> | null
|
||||||
): OwnerUpdatedEventFilter;
|
): OwnerUpdatedEventFilter;
|
||||||
|
|
||||||
"PremiumsWithdrawn(address,uint256)"(
|
|
||||||
owner?: null,
|
|
||||||
amount?: null
|
|
||||||
): PremiumsWithdrawnEventFilter;
|
|
||||||
PremiumsWithdrawn(
|
|
||||||
owner?: null,
|
|
||||||
amount?: null
|
|
||||||
): PremiumsWithdrawnEventFilter;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
estimateGas: {
|
estimateGas: {
|
||||||
@ -713,10 +702,10 @@ export interface P2PIX extends BaseContract {
|
|||||||
defaultLockBlocks(overrides?: CallOverrides): Promise<BigNumber>;
|
defaultLockBlocks(overrides?: CallOverrides): Promise<BigNumber>;
|
||||||
|
|
||||||
deposit(
|
deposit(
|
||||||
token: PromiseOrValue<string>,
|
_token: PromiseOrValue<string>,
|
||||||
amount: PromiseOrValue<BigNumberish>,
|
_amount: PromiseOrValue<BigNumberish>,
|
||||||
pixTarget: PromiseOrValue<string>,
|
_pixTarget: PromiseOrValue<string>,
|
||||||
overrides?: PayableOverrides & { from?: PromiseOrValue<string> }
|
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
||||||
): Promise<BigNumber>;
|
): Promise<BigNumber>;
|
||||||
|
|
||||||
depositCount(overrides?: CallOverrides): Promise<BigNumber>;
|
depositCount(overrides?: CallOverrides): Promise<BigNumber>;
|
||||||
@ -773,7 +762,7 @@ export interface P2PIX extends BaseContract {
|
|||||||
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
||||||
): Promise<BigNumber>;
|
): Promise<BigNumber>;
|
||||||
|
|
||||||
withdrawPremiums(
|
withdrawBalance(
|
||||||
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
||||||
): Promise<BigNumber>;
|
): Promise<BigNumber>;
|
||||||
};
|
};
|
||||||
@ -792,10 +781,10 @@ export interface P2PIX extends BaseContract {
|
|||||||
defaultLockBlocks(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
defaultLockBlocks(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||||
|
|
||||||
deposit(
|
deposit(
|
||||||
token: PromiseOrValue<string>,
|
_token: PromiseOrValue<string>,
|
||||||
amount: PromiseOrValue<BigNumberish>,
|
_amount: PromiseOrValue<BigNumberish>,
|
||||||
pixTarget: PromiseOrValue<string>,
|
_pixTarget: PromiseOrValue<string>,
|
||||||
overrides?: PayableOverrides & { from?: PromiseOrValue<string> }
|
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
||||||
): Promise<PopulatedTransaction>;
|
): Promise<PopulatedTransaction>;
|
||||||
|
|
||||||
depositCount(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
depositCount(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||||
@ -852,7 +841,7 @@ export interface P2PIX extends BaseContract {
|
|||||||
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
||||||
): Promise<PopulatedTransaction>;
|
): Promise<PopulatedTransaction>;
|
||||||
|
|
||||||
withdrawPremiums(
|
withdrawBalance(
|
||||||
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
||||||
): Promise<PopulatedTransaction>;
|
): Promise<PopulatedTransaction>;
|
||||||
};
|
};
|
||||||
|
@ -65,7 +65,7 @@ describe("P2PIX deposit test", () => {
|
|||||||
erc20.address,
|
erc20.address,
|
||||||
ethers.utils.parseEther("1000"),
|
ethers.utils.parseEther("1000"),
|
||||||
"SELLER PIX KEY",
|
"SELLER PIX KEY",
|
||||||
{ value: ethers.utils.parseEther("0.1") },
|
// { value: ethers.utils.parseEther("0.1") },
|
||||||
);
|
);
|
||||||
await expect(transaction)
|
await expect(transaction)
|
||||||
.to.emit(p2pix, "DepositAdded")
|
.to.emit(p2pix, "DepositAdded")
|
||||||
@ -73,7 +73,7 @@ describe("P2PIX deposit test", () => {
|
|||||||
owner.address,
|
owner.address,
|
||||||
0,
|
0,
|
||||||
erc20.address,
|
erc20.address,
|
||||||
ethers.utils.parseEther("0.1"),
|
// ethers.utils.parseEther("0.1"),
|
||||||
ethers.utils.parseEther("1000"),
|
ethers.utils.parseEther("1000"),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -83,7 +83,7 @@ describe("P2PIX deposit test", () => {
|
|||||||
erc20.address,
|
erc20.address,
|
||||||
ethers.utils.parseEther("1000"),
|
ethers.utils.parseEther("1000"),
|
||||||
"SELLER PIX KEY",
|
"SELLER PIX KEY",
|
||||||
{ value: ethers.utils.parseEther("0.1") },
|
// { value: ethers.utils.parseEther("0.1") },
|
||||||
);
|
);
|
||||||
await expect(transaction)
|
await expect(transaction)
|
||||||
.to.emit(p2pix, "DepositAdded")
|
.to.emit(p2pix, "DepositAdded")
|
||||||
@ -91,7 +91,7 @@ describe("P2PIX deposit test", () => {
|
|||||||
owner.address,
|
owner.address,
|
||||||
1,
|
1,
|
||||||
erc20.address,
|
erc20.address,
|
||||||
ethers.utils.parseEther("0.1"),
|
// ethers.utils.parseEther("0.1"),
|
||||||
ethers.utils.parseEther("1000"),
|
ethers.utils.parseEther("1000"),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -70,7 +70,7 @@ describe("P2PIX deposit test", () => {
|
|||||||
erc20.address,
|
erc20.address,
|
||||||
ethers.utils.parseEther("1000"),
|
ethers.utils.parseEther("1000"),
|
||||||
"SELLER PIX KEY",
|
"SELLER PIX KEY",
|
||||||
{ value: ethers.utils.parseEther("0.1") },
|
// { value: ethers.utils.parseEther("0.1") },
|
||||||
);
|
);
|
||||||
await expect(transaction)
|
await expect(transaction)
|
||||||
.to.emit(p2pix, "DepositAdded")
|
.to.emit(p2pix, "DepositAdded")
|
||||||
@ -78,7 +78,7 @@ describe("P2PIX deposit test", () => {
|
|||||||
owner.address,
|
owner.address,
|
||||||
0,
|
0,
|
||||||
erc20.address,
|
erc20.address,
|
||||||
ethers.utils.parseEther("0.1"),
|
// ethers.utils.parseEther("0.1"),
|
||||||
ethers.utils.parseEther("1000"),
|
ethers.utils.parseEther("1000"),
|
||||||
);
|
);
|
||||||
console.log(
|
console.log(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user