diff --git a/plasma_framework/docs/contracts/Address.md b/plasma_framework/docs/contracts/Address.md index c097a3e35..c11c90cfa 100644 --- a/plasma_framework/docs/contracts/Address.md +++ b/plasma_framework/docs/contracts/Address.md @@ -43,6 +43,7 @@ returns(bool) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/Bits.md b/plasma_framework/docs/contracts/Bits.md index b1fa677ab..b620147c0 100644 --- a/plasma_framework/docs/contracts/Bits.md +++ b/plasma_framework/docs/contracts/Bits.md @@ -114,6 +114,7 @@ True, if the bit is '0'; otherwise, False * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/BlockController.md b/plasma_framework/docs/contracts/BlockController.md index dfbc929e9..69fde1f4b 100644 --- a/plasma_framework/docs/contracts/BlockController.md +++ b/plasma_framework/docs/contracts/BlockController.md @@ -121,6 +121,7 @@ returns(bool) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/BlockModel.md b/plasma_framework/docs/contracts/BlockModel.md index ddd7bbd50..7d6965c69 100644 --- a/plasma_framework/docs/contracts/BlockModel.md +++ b/plasma_framework/docs/contracts/BlockModel.md @@ -29,6 +29,7 @@ struct Block { * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/BondSize.md b/plasma_framework/docs/contracts/BondSize.md index d989a2e6c..5532aae17 100644 --- a/plasma_framework/docs/contracts/BondSize.md +++ b/plasma_framework/docs/contracts/BondSize.md @@ -105,6 +105,7 @@ function validateBondSize(struct BondSize.Params self, uint128 newBondSize) priv * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/ECDSA.md b/plasma_framework/docs/contracts/ECDSA.md index f02eb4125..7184011e4 100644 --- a/plasma_framework/docs/contracts/ECDSA.md +++ b/plasma_framework/docs/contracts/ECDSA.md @@ -73,6 +73,7 @@ returns(bytes32) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/Erc20DepositVerifier.md b/plasma_framework/docs/contracts/Erc20DepositVerifier.md index 58d9250e7..ca8537469 100644 --- a/plasma_framework/docs/contracts/Erc20DepositVerifier.md +++ b/plasma_framework/docs/contracts/Erc20DepositVerifier.md @@ -72,6 +72,7 @@ Verified (owner, token, amount) of the deposit ERC20 token data * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/Erc20Vault.md b/plasma_framework/docs/contracts/Erc20Vault.md index 4039e5656..260694a3a 100644 --- a/plasma_framework/docs/contracts/Erc20Vault.md +++ b/plasma_framework/docs/contracts/Erc20Vault.md @@ -77,6 +77,7 @@ function withdraw(address payable receiver, address token, uint256 amount) exter * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/EthDepositVerifier.md b/plasma_framework/docs/contracts/EthDepositVerifier.md index 9838019fc..1deae6085 100644 --- a/plasma_framework/docs/contracts/EthDepositVerifier.md +++ b/plasma_framework/docs/contracts/EthDepositVerifier.md @@ -67,6 +67,7 @@ function verify(bytes depositTx, uint256 amount, address sender) external view * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/EthVault.md b/plasma_framework/docs/contracts/EthVault.md index 95dc5d6d3..ff46037c6 100644 --- a/plasma_framework/docs/contracts/EthVault.md +++ b/plasma_framework/docs/contracts/EthVault.md @@ -84,6 +84,7 @@ function withdraw(address payable receiver, uint256 amount) external nonpayable * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/ExitBounty.md b/plasma_framework/docs/contracts/ExitBounty.md new file mode 100644 index 000000000..d3e66cf1c --- /dev/null +++ b/plasma_framework/docs/contracts/ExitBounty.md @@ -0,0 +1,96 @@ +# ExitBounty.sol + +View Source: [contracts/src/exits/utils/ExitBounty.sol](../../contracts/src/exits/utils/ExitBounty.sol) + +**ExitBounty** + +## Functions + +- [processStandardExitBountySize(uint256 gasPriceStartExit)](#processstandardexitbountysize) + +### processStandardExitBountySize + +Returns the Process Exit Bounty size for standard exits + +```js +function processStandardExitBountySize(uint256 gasPriceStartExit) internal view +returns(uint256) +``` + +**Arguments** + +| Name | Type | Description | +| ------------- |------------- | -----| +| gasPriceStartExit | uint256 | | + +## Contracts + +* [Address](Address.md) +* [Bits](Bits.md) +* [BlockController](BlockController.md) +* [BlockModel](BlockModel.md) +* [BondSize](BondSize.md) +* [ECDSA](ECDSA.md) +* [Erc20DepositVerifier](Erc20DepositVerifier.md) +* [Erc20Vault](Erc20Vault.md) +* [EthDepositVerifier](EthDepositVerifier.md) +* [EthVault](EthVault.md) +* [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) +* [ExitGameController](ExitGameController.md) +* [ExitGameRegistry](ExitGameRegistry.md) +* [ExitId](ExitId.md) +* [ExitPriority](ExitPriority.md) +* [FailFastReentrancyGuard](FailFastReentrancyGuard.md) +* [FeeClaimOutputToPaymentTxCondition](FeeClaimOutputToPaymentTxCondition.md) +* [FeeExitGame](FeeExitGame.md) +* [FungibleTokenOutputModel](FungibleTokenOutputModel.md) +* [GenericTransaction](GenericTransaction.md) +* [IERC20](IERC20.md) +* [IErc20DepositVerifier](IErc20DepositVerifier.md) +* [IEthDepositVerifier](IEthDepositVerifier.md) +* [IExitProcessor](IExitProcessor.md) +* [ISpendingCondition](ISpendingCondition.md) +* [IStateTransitionVerifier](IStateTransitionVerifier.md) +* [Math](Math.md) +* [Merkle](Merkle.md) +* [Migrations](Migrations.md) +* [MoreVpFinalization](MoreVpFinalization.md) +* [OnlyFromAddress](OnlyFromAddress.md) +* [OnlyWithValue](OnlyWithValue.md) +* [OutputId](OutputId.md) +* [Ownable](Ownable.md) +* [PaymentChallengeIFEInputSpent](PaymentChallengeIFEInputSpent.md) +* [PaymentChallengeIFENotCanonical](PaymentChallengeIFENotCanonical.md) +* [PaymentChallengeIFEOutputSpent](PaymentChallengeIFEOutputSpent.md) +* [PaymentChallengeStandardExit](PaymentChallengeStandardExit.md) +* [PaymentDeleteInFlightExit](PaymentDeleteInFlightExit.md) +* [PaymentEip712Lib](PaymentEip712Lib.md) +* [PaymentExitDataModel](PaymentExitDataModel.md) +* [PaymentExitGame](PaymentExitGame.md) +* [PaymentExitGameArgs](PaymentExitGameArgs.md) +* [PaymentInFlightExitModelUtils](PaymentInFlightExitModelUtils.md) +* [PaymentInFlightExitRouter](PaymentInFlightExitRouter.md) +* [PaymentInFlightExitRouterArgs](PaymentInFlightExitRouterArgs.md) +* [PaymentOutputToPaymentTxCondition](PaymentOutputToPaymentTxCondition.md) +* [PaymentPiggybackInFlightExit](PaymentPiggybackInFlightExit.md) +* [PaymentProcessInFlightExit](PaymentProcessInFlightExit.md) +* [PaymentProcessStandardExit](PaymentProcessStandardExit.md) +* [PaymentStandardExitRouter](PaymentStandardExitRouter.md) +* [PaymentStandardExitRouterArgs](PaymentStandardExitRouterArgs.md) +* [PaymentStartInFlightExit](PaymentStartInFlightExit.md) +* [PaymentStartStandardExit](PaymentStartStandardExit.md) +* [PaymentTransactionModel](PaymentTransactionModel.md) +* [PaymentTransactionStateTransitionVerifier](PaymentTransactionStateTransitionVerifier.md) +* [PlasmaFramework](PlasmaFramework.md) +* [PosLib](PosLib.md) +* [PriorityQueue](PriorityQueue.md) +* [Protocol](Protocol.md) +* [Quarantine](Quarantine.md) +* [RLPReader](RLPReader.md) +* [SafeERC20](SafeERC20.md) +* [SafeEthTransfer](SafeEthTransfer.md) +* [SafeMath](SafeMath.md) +* [SpendingConditionRegistry](SpendingConditionRegistry.md) +* [Vault](Vault.md) +* [VaultRegistry](VaultRegistry.md) diff --git a/plasma_framework/docs/contracts/ExitGameController.md b/plasma_framework/docs/contracts/ExitGameController.md index a55f2e43e..e060c1f38 100644 --- a/plasma_framework/docs/contracts/ExitGameController.md +++ b/plasma_framework/docs/contracts/ExitGameController.md @@ -320,6 +320,7 @@ returns(bytes32) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/ExitGameRegistry.md b/plasma_framework/docs/contracts/ExitGameRegistry.md index 984f96b18..9e1be643b 100644 --- a/plasma_framework/docs/contracts/ExitGameRegistry.md +++ b/plasma_framework/docs/contracts/ExitGameRegistry.md @@ -179,6 +179,7 @@ returns(uint256) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/ExitId.md b/plasma_framework/docs/contracts/ExitId.md index 6566b39d9..526ff6718 100644 --- a/plasma_framework/docs/contracts/ExitId.md +++ b/plasma_framework/docs/contracts/ExitId.md @@ -47,7 +47,7 @@ returns(uint168) standardExitId Unique ID of the standard exit Anatomy of returned value, most significant bits first: 1-bit - in-flight flag (0 for standard exit) - 167-bits - hash(tx) or hash(tx|utxo) for deposit + 167-bits - outputId **Arguments** @@ -89,6 +89,7 @@ Unique in-flight exit ID * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/ExitPriority.md b/plasma_framework/docs/contracts/ExitPriority.md index 932f595f0..e6c45737f 100644 --- a/plasma_framework/docs/contracts/ExitPriority.md +++ b/plasma_framework/docs/contracts/ExitPriority.md @@ -84,6 +84,7 @@ returns(uint168) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/ExitableTimestamp.md b/plasma_framework/docs/contracts/ExitableTimestamp.md index e3120672d..c92ff75c6 100644 --- a/plasma_framework/docs/contracts/ExitableTimestamp.md +++ b/plasma_framework/docs/contracts/ExitableTimestamp.md @@ -64,6 +64,7 @@ returns(uint32) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/FailFastReentrancyGuard.md b/plasma_framework/docs/contracts/FailFastReentrancyGuard.md index 6fd4a7428..d50a1fd0c 100644 --- a/plasma_framework/docs/contracts/FailFastReentrancyGuard.md +++ b/plasma_framework/docs/contracts/FailFastReentrancyGuard.md @@ -42,6 +42,7 @@ modifier nonReentrant(ExitGameController exitGameController) internal * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/FeeClaimOutputToPaymentTxCondition.md b/plasma_framework/docs/contracts/FeeClaimOutputToPaymentTxCondition.md index ff42254fe..56678bdf1 100644 --- a/plasma_framework/docs/contracts/FeeClaimOutputToPaymentTxCondition.md +++ b/plasma_framework/docs/contracts/FeeClaimOutputToPaymentTxCondition.md @@ -75,6 +75,7 @@ returns(bool) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/FeeExitGame.md b/plasma_framework/docs/contracts/FeeExitGame.md index 4a4bf4723..9ef16d064 100644 --- a/plasma_framework/docs/contracts/FeeExitGame.md +++ b/plasma_framework/docs/contracts/FeeExitGame.md @@ -19,6 +19,7 @@ View Source: [contracts/src/exits/fee/FeeExitGame.sol](../../contracts/src/exits * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/FungibleTokenOutputModel.md b/plasma_framework/docs/contracts/FungibleTokenOutputModel.md index bdf6fe589..fc167941b 100644 --- a/plasma_framework/docs/contracts/FungibleTokenOutputModel.md +++ b/plasma_framework/docs/contracts/FungibleTokenOutputModel.md @@ -76,6 +76,7 @@ returns(struct FungibleTokenOutputModel.Output) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/GenericTransaction.md b/plasma_framework/docs/contracts/GenericTransaction.md index 62e8af514..d03e8ed16 100644 --- a/plasma_framework/docs/contracts/GenericTransaction.md +++ b/plasma_framework/docs/contracts/GenericTransaction.md @@ -111,6 +111,7 @@ returns(struct GenericTransaction.Output) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/IERC20.md b/plasma_framework/docs/contracts/IERC20.md index 42d6019b3..9ac4e320b 100644 --- a/plasma_framework/docs/contracts/IERC20.md +++ b/plasma_framework/docs/contracts/IERC20.md @@ -147,6 +147,7 @@ returns(bool) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/IErc20DepositVerifier.md b/plasma_framework/docs/contracts/IErc20DepositVerifier.md index f3ae66764..79a2a8020 100644 --- a/plasma_framework/docs/contracts/IErc20DepositVerifier.md +++ b/plasma_framework/docs/contracts/IErc20DepositVerifier.md @@ -46,6 +46,7 @@ Verified (owner, token, amount) of the deposit ERC20 token data * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/IEthDepositVerifier.md b/plasma_framework/docs/contracts/IEthDepositVerifier.md index 719c5fb4e..4eccac58c 100644 --- a/plasma_framework/docs/contracts/IEthDepositVerifier.md +++ b/plasma_framework/docs/contracts/IEthDepositVerifier.md @@ -41,6 +41,7 @@ function verify(bytes depositTx, uint256 amount, address sender) external view * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/IExitProcessor.md b/plasma_framework/docs/contracts/IExitProcessor.md index d7b3d046d..f8b538c15 100644 --- a/plasma_framework/docs/contracts/IExitProcessor.md +++ b/plasma_framework/docs/contracts/IExitProcessor.md @@ -11,7 +11,7 @@ An interface that allows custom logic to process exits for different requirement ## Functions -- [processExit(uint168 exitId, uint256 vaultId, address token)](#processexit) +- [processExit(uint168 exitId, uint256 vaultId, address token, address payable processor)](#processexit) ### processExit @@ -20,7 +20,7 @@ An interface that allows custom logic to process exits for different requirement Function interface for processing exits. ```js -function processExit(uint168 exitId, uint256 vaultId, address token) external nonpayable +function processExit(uint168 exitId, uint256 vaultId, address token, address payable processor) external nonpayable ``` **Arguments** @@ -30,6 +30,7 @@ function processExit(uint168 exitId, uint256 vaultId, address token) external no | exitId | uint168 | Unique ID for exit per tx type | | vaultId | uint256 | ID of the vault that funds the exit | | token | address | Address of the token contract | +| processor | address payable | Address of the processExit intitiator | ## Contracts @@ -44,6 +45,7 @@ function processExit(uint168 exitId, uint256 vaultId, address token) external no * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/ISpendingCondition.md b/plasma_framework/docs/contracts/ISpendingCondition.md index 84f26ab66..c16c628fe 100644 --- a/plasma_framework/docs/contracts/ISpendingCondition.md +++ b/plasma_framework/docs/contracts/ISpendingCondition.md @@ -46,6 +46,7 @@ returns(bool) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/IStateTransitionVerifier.md b/plasma_framework/docs/contracts/IStateTransitionVerifier.md index b2b43262a..64da64439 100644 --- a/plasma_framework/docs/contracts/IStateTransitionVerifier.md +++ b/plasma_framework/docs/contracts/IStateTransitionVerifier.md @@ -38,6 +38,7 @@ returns(bool) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/Math.md b/plasma_framework/docs/contracts/Math.md index 8f87a7b81..5b94c1436 100644 --- a/plasma_framework/docs/contracts/Math.md +++ b/plasma_framework/docs/contracts/Math.md @@ -74,6 +74,7 @@ returns(uint256) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/Merkle.md b/plasma_framework/docs/contracts/Merkle.md index 2b6e92cea..d8d051810 100644 --- a/plasma_framework/docs/contracts/Merkle.md +++ b/plasma_framework/docs/contracts/Merkle.md @@ -54,6 +54,7 @@ True, if the leaf hash is in the Merkle tree; otherwise, False * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/Migrations.md b/plasma_framework/docs/contracts/Migrations.md index d004233dd..a4650f081 100644 --- a/plasma_framework/docs/contracts/Migrations.md +++ b/plasma_framework/docs/contracts/Migrations.md @@ -82,6 +82,7 @@ function upgrade(address new_address) public nonpayable restricted * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/MoreVpFinalization.md b/plasma_framework/docs/contracts/MoreVpFinalization.md index a664d9603..db7698840 100644 --- a/plasma_framework/docs/contracts/MoreVpFinalization.md +++ b/plasma_framework/docs/contracts/MoreVpFinalization.md @@ -60,6 +60,7 @@ returns(bool) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/OnlyFromAddress.md b/plasma_framework/docs/contracts/OnlyFromAddress.md index 155b155c5..116acf1f7 100644 --- a/plasma_framework/docs/contracts/OnlyFromAddress.md +++ b/plasma_framework/docs/contracts/OnlyFromAddress.md @@ -37,6 +37,7 @@ modifier onlyFrom(address caller) internal * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/OnlyWithValue.md b/plasma_framework/docs/contracts/OnlyWithValue.md index b661cf417..95fd51de5 100644 --- a/plasma_framework/docs/contracts/OnlyWithValue.md +++ b/plasma_framework/docs/contracts/OnlyWithValue.md @@ -37,6 +37,7 @@ modifier onlyWithValue(uint256 _value) internal * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/OutputId.md b/plasma_framework/docs/contracts/OutputId.md index 4050c3bb5..f3e75e0f7 100644 --- a/plasma_framework/docs/contracts/OutputId.md +++ b/plasma_framework/docs/contracts/OutputId.md @@ -55,6 +55,7 @@ returns(bytes32) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/Ownable.md b/plasma_framework/docs/contracts/Ownable.md index e8b459160..01e1bfe12 100644 --- a/plasma_framework/docs/contracts/Ownable.md +++ b/plasma_framework/docs/contracts/Ownable.md @@ -152,6 +152,7 @@ function _transferOwnership(address newOwner) internal nonpayable * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/PaymentChallengeIFEInputSpent.md b/plasma_framework/docs/contracts/PaymentChallengeIFEInputSpent.md index 6edfc95ed..2ee5c9342 100644 --- a/plasma_framework/docs/contracts/PaymentChallengeIFEInputSpent.md +++ b/plasma_framework/docs/contracts/PaymentChallengeIFEInputSpent.md @@ -125,6 +125,7 @@ function verifySpendingCondition(struct PaymentChallengeIFEInputSpent.ChallengeI * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/PaymentChallengeIFENotCanonical.md b/plasma_framework/docs/contracts/PaymentChallengeIFENotCanonical.md index 8d47ac4f7..2c428ecf9 100644 --- a/plasma_framework/docs/contracts/PaymentChallengeIFENotCanonical.md +++ b/plasma_framework/docs/contracts/PaymentChallengeIFENotCanonical.md @@ -18,7 +18,7 @@ struct Controller { **Events** ```js -event InFlightExitChallenged(address indexed challenger, bytes32 indexed txHash, uint256 challengeTxPosition); +event InFlightExitChallenged(address indexed challenger, bytes32 indexed txHash, uint256 challengeTxPosition, uint16 inFlightTxInputIndex, bytes challengeTx, uint16 challengeTxInputIndex, bytes challengeTxWitness); event InFlightExitChallengeResponded(address indexed challenger, bytes32 indexed txHash, uint256 challengeTxPosition); ``` @@ -127,6 +127,7 @@ returns(uint256) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/PaymentChallengeIFEOutputSpent.md b/plasma_framework/docs/contracts/PaymentChallengeIFEOutputSpent.md index 3fc36f8ec..c820d47ef 100644 --- a/plasma_framework/docs/contracts/PaymentChallengeIFEOutputSpent.md +++ b/plasma_framework/docs/contracts/PaymentChallengeIFEOutputSpent.md @@ -96,6 +96,7 @@ function verifyChallengingTransactionSpendsOutput(struct PaymentChallengeIFEOutp * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/PaymentChallengeStandardExit.md b/plasma_framework/docs/contracts/PaymentChallengeStandardExit.md index 0d16516e3..47fd51447 100644 --- a/plasma_framework/docs/contracts/PaymentChallengeStandardExit.md +++ b/plasma_framework/docs/contracts/PaymentChallengeStandardExit.md @@ -126,6 +126,7 @@ function verifySpendingCondition(struct PaymentChallengeStandardExit.ChallengeSt * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/PaymentDeleteInFlightExit.md b/plasma_framework/docs/contracts/PaymentDeleteInFlightExit.md index 31b30f74e..09a2a3bbb 100644 --- a/plasma_framework/docs/contracts/PaymentDeleteInFlightExit.md +++ b/plasma_framework/docs/contracts/PaymentDeleteInFlightExit.md @@ -67,6 +67,7 @@ returns(bool) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/PaymentEip712Lib.md b/plasma_framework/docs/contracts/PaymentEip712Lib.md index 9aca70941..82cf7bda1 100644 --- a/plasma_framework/docs/contracts/PaymentEip712Lib.md +++ b/plasma_framework/docs/contracts/PaymentEip712Lib.md @@ -118,6 +118,7 @@ returns(bytes32) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/PaymentExitDataModel.md b/plasma_framework/docs/contracts/PaymentExitDataModel.md index b8aa228d6..fc3620282 100644 --- a/plasma_framework/docs/contracts/PaymentExitDataModel.md +++ b/plasma_framework/docs/contracts/PaymentExitDataModel.md @@ -16,7 +16,8 @@ struct StandardExit { bytes32 outputId, address payable exitTarget, uint256 amount, - uint256 bondSize + uint256 bondSize, + uint256 bountySize } ``` @@ -88,6 +89,7 @@ uint8 public constant MAX_OUTPUT_NUM; * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/PaymentExitGame.md b/plasma_framework/docs/contracts/PaymentExitGame.md index eb42451e2..09c0eec95 100644 --- a/plasma_framework/docs/contracts/PaymentExitGame.md +++ b/plasma_framework/docs/contracts/PaymentExitGame.md @@ -12,14 +12,16 @@ The exit game contract implementation for Payment Transaction **Constants & Variables** ```js -contract PlasmaFramework private plasmaFramework; +struct PaymentExitGameArgs.Args private paymentExitGameArgs; +bool private initDone; ``` ## Functions - [(struct PaymentExitGameArgs.Args args)](#) -- [processExit(uint168 exitId, uint256 , address token)](#processexit) +- [init()](#init) +- [processExit(uint168 exitId, uint256 , address token, address payable processor)](#processexit) - [getStandardExitId(bool _isDeposit, bytes _txBytes, uint256 _utxoPos)](#getstandardexitid) - [getInFlightExitId(bytes _txBytes)](#getinflightexitid) @@ -37,6 +39,17 @@ function (struct PaymentExitGameArgs.Args args) public nonpayable PaymentStandar | ------------- |------------- | -----| | args | struct PaymentExitGameArgs.Args | | +### init + +```js +function init() public nonpayable onlyFrom +``` + +**Arguments** + +| Name | Type | Description | +| ------------- |------------- | -----| + ### processExit ⤾ overrides [IExitProcessor.processExit](IExitProcessor.md#processexit) @@ -44,7 +57,7 @@ function (struct PaymentExitGameArgs.Args args) public nonpayable PaymentStandar Callback processes exit function for the PlasmaFramework to call ```js -function processExit(uint168 exitId, uint256 , address token) external nonpayable onlyFrom +function processExit(uint168 exitId, uint256 , address token, address payable processor) external nonpayable onlyFrom ``` **Arguments** @@ -54,6 +67,7 @@ function processExit(uint168 exitId, uint256 , address token) external nonpayabl | exitId | uint168 | The exit ID | | | uint256 | exitId The exit ID | | token | address | Token (ERC20 address or address(0) for ETH) of the exiting output | +| processor | address payable | The processExit initiator | ### getStandardExitId @@ -100,6 +114,7 @@ returns(uint168) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/PaymentExitGameArgs.md b/plasma_framework/docs/contracts/PaymentExitGameArgs.md index 74c27affc..5a82a82a6 100644 --- a/plasma_framework/docs/contracts/PaymentExitGameArgs.md +++ b/plasma_framework/docs/contracts/PaymentExitGameArgs.md @@ -34,6 +34,7 @@ struct Args { * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/PaymentInFlightExitModelUtils.md b/plasma_framework/docs/contracts/PaymentInFlightExitModelUtils.md index 2259eb3c3..05ce7170b 100644 --- a/plasma_framework/docs/contracts/PaymentInFlightExitModelUtils.md +++ b/plasma_framework/docs/contracts/PaymentInFlightExitModelUtils.md @@ -165,6 +165,7 @@ returns(bool) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/PaymentInFlightExitRouter.md b/plasma_framework/docs/contracts/PaymentInFlightExitRouter.md index 26fceda11..94cb950c5 100644 --- a/plasma_framework/docs/contracts/PaymentInFlightExitRouter.md +++ b/plasma_framework/docs/contracts/PaymentInFlightExitRouter.md @@ -31,6 +31,7 @@ struct BondSize.Params internal piggybackBond; //private members contract PlasmaFramework private framework; +bool private bootDone; ``` @@ -55,7 +56,7 @@ event InFlightExitDeleted(uint168 indexed exitId); ## Functions -- [(struct PaymentExitGameArgs.Args args)](#) +- [boot(struct PaymentExitGameArgs.Args paymentExitGameArgs)](#boot) - [inFlightExits(uint168[] exitIds)](#inflightexits) - [startInFlightExit(struct PaymentInFlightExitRouterArgs.StartExitArgs args)](#startinflightexit) - [piggybackInFlightExitOnInput(struct PaymentInFlightExitRouterArgs.PiggybackInFlightExitOnInputArgs args)](#piggybackinflightexitoninput) @@ -71,17 +72,19 @@ event InFlightExitDeleted(uint168 indexed exitId); - [piggybackBondSize()](#piggybackbondsize) - [updatePiggybackBondSize(uint128 newBondSize)](#updatepiggybackbondsize) -### +### boot + +⤾ overrides [PaymentStandardExitRouter.boot](PaymentStandardExitRouter.md#boot) ```js -function (struct PaymentExitGameArgs.Args args) public nonpayable +function boot(struct PaymentExitGameArgs.Args paymentExitGameArgs) internal nonpayable ``` **Arguments** | Name | Type | Description | | ------------- |------------- | -----| -| args | struct PaymentExitGameArgs.Args | | +| paymentExitGameArgs | struct PaymentExitGameArgs.Args | | ### inFlightExits @@ -296,6 +299,7 @@ function updatePiggybackBondSize(uint128 newBondSize) public nonpayable onlyFrom * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/PaymentInFlightExitRouterArgs.md b/plasma_framework/docs/contracts/PaymentInFlightExitRouterArgs.md index 337ed8a04..d507be64d 100644 --- a/plasma_framework/docs/contracts/PaymentInFlightExitRouterArgs.md +++ b/plasma_framework/docs/contracts/PaymentInFlightExitRouterArgs.md @@ -95,6 +95,7 @@ struct ChallengeOutputSpent { * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/PaymentOutputToPaymentTxCondition.md b/plasma_framework/docs/contracts/PaymentOutputToPaymentTxCondition.md index 0c496163a..42d2e3fc0 100644 --- a/plasma_framework/docs/contracts/PaymentOutputToPaymentTxCondition.md +++ b/plasma_framework/docs/contracts/PaymentOutputToPaymentTxCondition.md @@ -72,6 +72,7 @@ returns(bool) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/PaymentPiggybackInFlightExit.md b/plasma_framework/docs/contracts/PaymentPiggybackInFlightExit.md index bcb627ac7..a8b471e0d 100644 --- a/plasma_framework/docs/contracts/PaymentPiggybackInFlightExit.md +++ b/plasma_framework/docs/contracts/PaymentPiggybackInFlightExit.md @@ -129,6 +129,7 @@ returns(bool) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/PaymentProcessInFlightExit.md b/plasma_framework/docs/contracts/PaymentProcessInFlightExit.md index f8da88e76..225b39004 100644 --- a/plasma_framework/docs/contracts/PaymentProcessInFlightExit.md +++ b/plasma_framework/docs/contracts/PaymentProcessInFlightExit.md @@ -229,6 +229,7 @@ returns(bool) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/PaymentProcessStandardExit.md b/plasma_framework/docs/contracts/PaymentProcessStandardExit.md index 1d00f39cb..3748b996d 100644 --- a/plasma_framework/docs/contracts/PaymentProcessStandardExit.md +++ b/plasma_framework/docs/contracts/PaymentProcessStandardExit.md @@ -22,18 +22,19 @@ struct Controller { event ExitOmitted(uint168 indexed exitId); event ExitFinalized(uint168 indexed exitId); event BondReturnFailed(address indexed receiver, uint256 amount); +event BountyRewardFailed(address indexed receiver, uint256 amount); ``` ## Functions -- [run(struct PaymentProcessStandardExit.Controller self, struct PaymentExitDataModel.StandardExitMap exitMap, uint168 exitId, address token)](#run) +- [run(struct PaymentProcessStandardExit.Controller self, struct PaymentExitDataModel.StandardExitMap exitMap, uint168 exitId, address token, address payable processor)](#run) ### run Main logic function to process standard exit ```js -function run(struct PaymentProcessStandardExit.Controller self, struct PaymentExitDataModel.StandardExitMap exitMap, uint168 exitId, address token) public nonpayable +function run(struct PaymentProcessStandardExit.Controller self, struct PaymentExitDataModel.StandardExitMap exitMap, uint168 exitId, address token, address payable processor) public nonpayable ``` **Arguments** @@ -44,6 +45,7 @@ function run(struct PaymentProcessStandardExit.Controller self, struct PaymentEx | exitMap | struct PaymentExitDataModel.StandardExitMap | The storage of all standard exit data | | exitId | uint168 | The exitId of the standard exit | | token | address | The ERC20 token address of the exit. Uses address(0) to represent ETH. | +| processor | address payable | | ## Contracts @@ -58,6 +60,7 @@ function run(struct PaymentProcessStandardExit.Controller self, struct PaymentEx * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/PaymentStandardExitRouter.md b/plasma_framework/docs/contracts/PaymentStandardExitRouter.md index bae2c635e..9df67e9f4 100644 --- a/plasma_framework/docs/contracts/PaymentStandardExitRouter.md +++ b/plasma_framework/docs/contracts/PaymentStandardExitRouter.md @@ -25,6 +25,7 @@ struct BondSize.Params internal startStandardExitBond; //private members contract PlasmaFramework private framework; +bool private bootDone; ``` @@ -41,25 +42,28 @@ event BondReturnFailed(address indexed receiver, uint256 amount); ## Functions -- [(struct PaymentExitGameArgs.Args args)](#) +- [boot(struct PaymentExitGameArgs.Args paymentExitGameArgs)](#boot) - [standardExits(uint168[] exitIds)](#standardexits) - [startStandardExitBondSize()](#startstandardexitbondsize) - [updateStartStandardExitBondSize(uint128 newBondSize)](#updatestartstandardexitbondsize) +- [processStandardExitBountySize(uint256 gasPriceStartExit)](#processstandardexitbountysize) - [startStandardExit(struct PaymentStandardExitRouterArgs.StartStandardExitArgs args)](#startstandardexit) - [challengeStandardExit(struct PaymentStandardExitRouterArgs.ChallengeStandardExitArgs args)](#challengestandardexit) -- [processStandardExit(uint168 exitId, address token)](#processstandardexit) +- [processStandardExit(uint168 exitId, address token, address payable processor)](#processstandardexit) -### +### boot + +⤿ Overridden Implementation(s): [PaymentInFlightExitRouter.boot](PaymentInFlightExitRouter.md#boot) ```js -function (struct PaymentExitGameArgs.Args args) public nonpayable +function boot(struct PaymentExitGameArgs.Args paymentExitGameArgs) internal nonpayable ``` **Arguments** | Name | Type | Description | | ------------- |------------- | -----| -| args | struct PaymentExitGameArgs.Args | | +| paymentExitGameArgs | struct PaymentExitGameArgs.Args | | ### standardExits @@ -104,6 +108,21 @@ function updateStartStandardExitBondSize(uint128 newBondSize) public nonpayable | ------------- |------------- | -----| | newBondSize | uint128 | The new bond size | +### processStandardExitBountySize + +Retrieves the process standard exit bounty size + +```js +function processStandardExitBountySize(uint256 gasPriceStartExit) public view +returns(uint256) +``` + +**Arguments** + +| Name | Type | Description | +| ------------- |------------- | -----| +| gasPriceStartExit | uint256 | | + ### startStandardExit Starts a standard exit of a given output, using output-age priority @@ -137,7 +156,7 @@ function challengeStandardExit(struct PaymentStandardExitRouterArgs.ChallengeSta Process standard exit ```js -function processStandardExit(uint168 exitId, address token) internal nonpayable +function processStandardExit(uint168 exitId, address token, address payable processor) internal nonpayable ``` **Arguments** @@ -146,6 +165,7 @@ function processStandardExit(uint168 exitId, address token) internal nonpayable | ------------- |------------- | -----| | exitId | uint168 | The standard exit ID | | token | address | The token (in erc20 address or address(0) for ETH) of the exiting output | +| processor | address payable | The processExit initiator | ## Contracts @@ -160,6 +180,7 @@ function processStandardExit(uint168 exitId, address token) internal nonpayable * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/PaymentStandardExitRouterArgs.md b/plasma_framework/docs/contracts/PaymentStandardExitRouterArgs.md index 933a44827..64aef96f0 100644 --- a/plasma_framework/docs/contracts/PaymentStandardExitRouterArgs.md +++ b/plasma_framework/docs/contracts/PaymentStandardExitRouterArgs.md @@ -43,6 +43,7 @@ struct ChallengeStandardExitArgs { * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/PaymentStartInFlightExit.md b/plasma_framework/docs/contracts/PaymentStartInFlightExit.md index b1169960a..808a04be4 100644 --- a/plasma_framework/docs/contracts/PaymentStartInFlightExit.md +++ b/plasma_framework/docs/contracts/PaymentStartInFlightExit.md @@ -37,7 +37,7 @@ struct StartExitData { **Events** ```js -event InFlightExitStarted(address indexed initiator, bytes32 indexed txHash); +event InFlightExitStarted(address indexed initiator, bytes32 indexed txHash, bytes inFlightTx, uint256[] inputUtxosPos, bytes[] inFlightTxWitnesses); ``` ## Functions @@ -303,6 +303,7 @@ function setInFlightExitOutputs(struct PaymentExitDataModel.InFlightExit ife, st * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/PaymentStartStandardExit.md b/plasma_framework/docs/contracts/PaymentStartStandardExit.md index 7bab3272e..052fcc0df 100644 --- a/plasma_framework/docs/contracts/PaymentStartStandardExit.md +++ b/plasma_framework/docs/contracts/PaymentStartStandardExit.md @@ -37,7 +37,7 @@ struct StartStandardExitData { **Events** ```js -event ExitStarted(address indexed owner, uint168 exitId); +event ExitStarted(address indexed owner, uint168 exitId, uint256 utxoPos); ``` ## Functions @@ -168,6 +168,7 @@ function enqueueStandardExit(struct PaymentStartStandardExit.StartStandardExitDa * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/PaymentTransactionModel.md b/plasma_framework/docs/contracts/PaymentTransactionModel.md index 0c2237183..625d05dfd 100644 --- a/plasma_framework/docs/contracts/PaymentTransactionModel.md +++ b/plasma_framework/docs/contracts/PaymentTransactionModel.md @@ -155,6 +155,7 @@ returns(struct FungibleTokenOutputModel.Output) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/PaymentTransactionStateTransitionVerifier.md b/plasma_framework/docs/contracts/PaymentTransactionStateTransitionVerifier.md index dca949988..376733ca5 100644 --- a/plasma_framework/docs/contracts/PaymentTransactionStateTransitionVerifier.md +++ b/plasma_framework/docs/contracts/PaymentTransactionStateTransitionVerifier.md @@ -99,6 +99,7 @@ returns(uint256) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/PlasmaFramework.md b/plasma_framework/docs/contracts/PlasmaFramework.md index ba5c80c8e..3d4007291 100644 --- a/plasma_framework/docs/contracts/PlasmaFramework.md +++ b/plasma_framework/docs/contracts/PlasmaFramework.md @@ -98,6 +98,7 @@ function setVersion(string _version) public nonpayable onlyFrom * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/PosLib.md b/plasma_framework/docs/contracts/PosLib.md index 86197cf91..2acdc0282 100644 --- a/plasma_framework/docs/contracts/PosLib.md +++ b/plasma_framework/docs/contracts/PosLib.md @@ -126,6 +126,7 @@ Position * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/PriorityQueue.md b/plasma_framework/docs/contracts/PriorityQueue.md index dccbab1d3..898257c19 100644 --- a/plasma_framework/docs/contracts/PriorityQueue.md +++ b/plasma_framework/docs/contracts/PriorityQueue.md @@ -181,6 +181,7 @@ returns(uint256) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/Protocol.md b/plasma_framework/docs/contracts/Protocol.md index f04a6b16f..560afa710 100644 --- a/plasma_framework/docs/contracts/Protocol.md +++ b/plasma_framework/docs/contracts/Protocol.md @@ -71,6 +71,7 @@ returns(bool) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/Quarantine.md b/plasma_framework/docs/contracts/Quarantine.md index f39f76e42..0b685d90b 100644 --- a/plasma_framework/docs/contracts/Quarantine.md +++ b/plasma_framework/docs/contracts/Quarantine.md @@ -66,6 +66,7 @@ function quarantine(struct Quarantine.Data _self, address _contractAddress) inte * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/RLPReader.md b/plasma_framework/docs/contracts/RLPReader.md index fac749094..e0d3e32c8 100644 --- a/plasma_framework/docs/contracts/RLPReader.md +++ b/plasma_framework/docs/contracts/RLPReader.md @@ -191,6 +191,7 @@ The length of the RLPItem (including the length field) and the offset of the pay * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/SafeERC20.md b/plasma_framework/docs/contracts/SafeERC20.md index 145254907..470206e24 100644 --- a/plasma_framework/docs/contracts/SafeERC20.md +++ b/plasma_framework/docs/contracts/SafeERC20.md @@ -120,6 +120,7 @@ function callOptionalReturn(IERC20 token, bytes data) private nonpayable * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/SafeEthTransfer.md b/plasma_framework/docs/contracts/SafeEthTransfer.md index fe5b76fb8..6be835a99 100644 --- a/plasma_framework/docs/contracts/SafeEthTransfer.md +++ b/plasma_framework/docs/contracts/SafeEthTransfer.md @@ -63,6 +63,7 @@ a flag showing the call is successful or not * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/SafeMath.md b/plasma_framework/docs/contracts/SafeMath.md index 8167fff38..20a1409a0 100644 --- a/plasma_framework/docs/contracts/SafeMath.md +++ b/plasma_framework/docs/contracts/SafeMath.md @@ -139,6 +139,7 @@ returns(uint256) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/SpendingConditionRegistry.md b/plasma_framework/docs/contracts/SpendingConditionRegistry.md index 57390bd86..13db8e908 100644 --- a/plasma_framework/docs/contracts/SpendingConditionRegistry.md +++ b/plasma_framework/docs/contracts/SpendingConditionRegistry.md @@ -64,6 +64,7 @@ function registerSpendingCondition(uint256 outputType, uint256 spendingTxType, I * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/Vault.md b/plasma_framework/docs/contracts/Vault.md index 8dcfa8b40..8d29be415 100644 --- a/plasma_framework/docs/contracts/Vault.md +++ b/plasma_framework/docs/contracts/Vault.md @@ -158,6 +158,7 @@ returns(bytes32) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/docs/contracts/VaultRegistry.md b/plasma_framework/docs/contracts/VaultRegistry.md index e3497571b..940aea6a0 100644 --- a/plasma_framework/docs/contracts/VaultRegistry.md +++ b/plasma_framework/docs/contracts/VaultRegistry.md @@ -141,6 +141,7 @@ returns(uint256) * [EthDepositVerifier](EthDepositVerifier.md) * [EthVault](EthVault.md) * [ExitableTimestamp](ExitableTimestamp.md) +* [ExitBounty](ExitBounty.md) * [ExitGameController](ExitGameController.md) * [ExitGameRegistry](ExitGameRegistry.md) * [ExitId](ExitId.md) diff --git a/plasma_framework/package.json b/plasma_framework/package.json index 3ae2a96dc..edd5e7f55 100644 --- a/plasma_framework/package.json +++ b/plasma_framework/package.json @@ -14,7 +14,7 @@ "solidoc": "^1.0.5" }, "devDependencies": { - "elliptic": ">=6.5.3", + "elliptic": ">=6.5.3", "@codechecks/client": "^0.1.10", "chai": "^4.2.0", "coveralls": "^3.0.6", diff --git a/plasma_framework/python_tests/tests/contracts/root_chain/test_process_exits.py b/plasma_framework/python_tests/tests/contracts/root_chain/test_process_exits.py index f5eb5cfc3..eebd3094b 100644 --- a/plasma_framework/python_tests/tests/contracts/root_chain/test_process_exits.py +++ b/plasma_framework/python_tests/tests/contracts/root_chain/test_process_exits.py @@ -31,6 +31,7 @@ def test_process_exits_standard_exit_should_succeed(testlang, w3, num_outputs, p testlang.start_standard_exit(utxo_pos, output_owner) gasCost = w3.eth.last_gas_used * 100 _, _, exit_id = plasma_framework.getNextExit(plasma_framework.eth_vault_id, NULL_ADDRESS_HEX) + testlang.flush_events() testlang.forward_timestamp(2 * MIN_EXIT_PERIOD + 1)