From dec5b778044a7f000a2f4925a20b61d980bd15ff Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Wed, 4 Nov 2020 16:04:09 +0100 Subject: [PATCH 1/4] Added rewards escrow beneficiaries These are contracts defined previously in keep-core repository. Me moved them from keep-core to keep-ecdsa as they require reference to ECDSA rewards contracts that are defined here. --- .../contracts/RewardsEscrowBeneficiaries.sol | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 solidity/contracts/RewardsEscrowBeneficiaries.sol diff --git a/solidity/contracts/RewardsEscrowBeneficiaries.sol b/solidity/contracts/RewardsEscrowBeneficiaries.sol new file mode 100644 index 000000000..22c9160c5 --- /dev/null +++ b/solidity/contracts/RewardsEscrowBeneficiaries.sol @@ -0,0 +1,23 @@ +pragma solidity 0.5.17; + +import "@keep-network/keep-core/contracts/PhasedEscrow.sol"; + +/// @title ECDSABackportRewardsEscrowBeneficiary +/// @notice Trasfer the received tokens to a designated +/// ECDSABackportRewardsEscrowBeneficiary contract. +contract ECDSABackportRewardsEscrowBeneficiary is StakerRewardsBeneficiary { + constructor(IERC20 _token, IStakerRewards _stakerRewards) + public + StakerRewardsBeneficiary(_token, _stakerRewards) + {} +} + +/// @title ECDSARewardsEscrowBeneficiary +/// @notice Transfer the received tokens to a designated +/// ECDSARewardsEscrowBeneficiary contract. +contract ECDSARewardsEscrowBeneficiary is StakerRewardsBeneficiary { + constructor(IERC20 _token, IStakerRewards _stakerRewards) + public + StakerRewardsBeneficiary(_token, _stakerRewards) + {} +} From f5db821c94699fef066c6a8179810f9ba350098a Mon Sep 17 00:00:00 2001 From: Piotr Dyraga Date: Wed, 4 Nov 2020 16:30:34 +0100 Subject: [PATCH 2/4] Improved docs of escrow beneficiaries Tokens are transferred from PhasedEscrow to reward contracts. --- solidity/contracts/RewardsEscrowBeneficiaries.sol | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/solidity/contracts/RewardsEscrowBeneficiaries.sol b/solidity/contracts/RewardsEscrowBeneficiaries.sol index 22c9160c5..3f7cfe969 100644 --- a/solidity/contracts/RewardsEscrowBeneficiaries.sol +++ b/solidity/contracts/RewardsEscrowBeneficiaries.sol @@ -3,8 +3,8 @@ pragma solidity 0.5.17; import "@keep-network/keep-core/contracts/PhasedEscrow.sol"; /// @title ECDSABackportRewardsEscrowBeneficiary -/// @notice Trasfer the received tokens to a designated -/// ECDSABackportRewardsEscrowBeneficiary contract. +/// @notice Trasfer the received tokens from Phased Escrow to a designated +/// ECDSABackportRewards contract. contract ECDSABackportRewardsEscrowBeneficiary is StakerRewardsBeneficiary { constructor(IERC20 _token, IStakerRewards _stakerRewards) public @@ -13,8 +13,8 @@ contract ECDSABackportRewardsEscrowBeneficiary is StakerRewardsBeneficiary { } /// @title ECDSARewardsEscrowBeneficiary -/// @notice Transfer the received tokens to a designated -/// ECDSARewardsEscrowBeneficiary contract. +/// @notice Transfer the received tokens from PhasedEscrow to a designated +/// ECDSARewards contract. contract ECDSARewardsEscrowBeneficiary is StakerRewardsBeneficiary { constructor(IERC20 _token, IStakerRewards _stakerRewards) public From b41ba5ae7c2ec853c371ba7d5187cc9672b05659 Mon Sep 17 00:00:00 2001 From: Piotr Dyraga Date: Wed, 4 Nov 2020 17:02:24 +0100 Subject: [PATCH 3/4] Bumped up keep-core dependency to the most recent pre version --- solidity/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/solidity/package-lock.json b/solidity/package-lock.json index 159ee9c4b..78d451591 100644 --- a/solidity/package-lock.json +++ b/solidity/package-lock.json @@ -942,9 +942,9 @@ } }, "@keep-network/keep-core": { - "version": "1.3.1-pre.4", - "resolved": "https://registry.npmjs.org/@keep-network/keep-core/-/keep-core-1.3.1-pre.4.tgz", - "integrity": "sha512-WrRhbDVlXd7m1HkSm9hzjKRgOj7ZEGZ/b8bTewD+LU2rh0dfxdG5gijzp2T3pyFZ+ofDZ/E7GjbIgVfYc/sYzw==", + "version": "1.3.1-pre.5", + "resolved": "https://registry.npmjs.org/@keep-network/keep-core/-/keep-core-1.3.1-pre.5.tgz", + "integrity": "sha512-zV1LyfWZeMS2tnLRKyL8UFCTD2MnvK92ta+U+iAz3QPqIE20MI+33hkKFMFVJxI7zIQJqNJj18eEUR8m4fG9Iw==", "requires": { "@openzeppelin/upgrades": "^2.7.2", "openzeppelin-solidity": "2.4.0" From 6c91a0f7144b2ee39b96acb284f3c5b715ef7a7b Mon Sep 17 00:00:00 2001 From: Piotr Dyraga Date: Wed, 4 Nov 2020 17:18:04 +0100 Subject: [PATCH 4/4] Renamed sol file with escrow beneficiaries Renamed the file to ECDSARewardsEscrowBeneficiary.sol Our etherum bindings code generator could not deal with the fact RewardsEscrowBeneficiaries.abi does not exist and it was looking this file because the beneficiaries were placed in RewardsEscrowBeneficiaries.sol. --- ...ies.sol => ECDSARewardsEscrowBeneficiary.sol} | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename solidity/contracts/{RewardsEscrowBeneficiaries.sol => ECDSARewardsEscrowBeneficiary.sol} (100%) diff --git a/solidity/contracts/RewardsEscrowBeneficiaries.sol b/solidity/contracts/ECDSARewardsEscrowBeneficiary.sol similarity index 100% rename from solidity/contracts/RewardsEscrowBeneficiaries.sol rename to solidity/contracts/ECDSARewardsEscrowBeneficiary.sol index 3f7cfe969..73d386ff3 100644 --- a/solidity/contracts/RewardsEscrowBeneficiaries.sol +++ b/solidity/contracts/ECDSARewardsEscrowBeneficiary.sol @@ -2,20 +2,20 @@ pragma solidity 0.5.17; import "@keep-network/keep-core/contracts/PhasedEscrow.sol"; -/// @title ECDSABackportRewardsEscrowBeneficiary -/// @notice Trasfer the received tokens from Phased Escrow to a designated -/// ECDSABackportRewards contract. -contract ECDSABackportRewardsEscrowBeneficiary is StakerRewardsBeneficiary { +/// @title ECDSARewardsEscrowBeneficiary +/// @notice Transfer the received tokens from PhasedEscrow to a designated +/// ECDSARewards contract. +contract ECDSARewardsEscrowBeneficiary is StakerRewardsBeneficiary { constructor(IERC20 _token, IStakerRewards _stakerRewards) public StakerRewardsBeneficiary(_token, _stakerRewards) {} } -/// @title ECDSARewardsEscrowBeneficiary -/// @notice Transfer the received tokens from PhasedEscrow to a designated -/// ECDSARewards contract. -contract ECDSARewardsEscrowBeneficiary is StakerRewardsBeneficiary { +/// @title ECDSABackportRewardsEscrowBeneficiary +/// @notice Trasfer the received tokens from Phased Escrow to a designated +/// ECDSABackportRewards contract. +contract ECDSABackportRewardsEscrowBeneficiary is StakerRewardsBeneficiary { constructor(IERC20 _token, IStakerRewards _stakerRewards) public StakerRewardsBeneficiary(_token, _stakerRewards)