Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 91
feat: add all data to deployment events#1487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
593701f
refactor: add all data to deployment events
aimen74 c2e4d1b
chore: update payment-processor tests
aimen74 4c7a987
chore: update payment-processor SRP tests
aimen74 91492f8
Reorder function parameters for consistency. Improve test assertions
MantisClone 74281b6
fixup! Reorder function parameters for consistency. Improve test asse…
MantisClone 29145ed
fix: SingleRequestProxy smart-contract tests
MantisClone 9a37cec
fix: CodeRabbit comments
MantisClone 35e327c
fix: variable name, remove unused variable
MantisClone 93279f2
chore: update event handling for deployment
aimen74 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
8 changes: 6 additions & 2 deletions
8 packages/payment-processor/src/payment/single-request-proxy.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 31 additions & 14 deletions
45 packages/payment-processor/test/payment/single-request-proxy.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6 packages/smart-contracts/src/contracts/ERC20SingleRequestProxy.sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -13,24 +13,24 @@ import './lib/SafeERC20.sol'; | ||
| contract ERC20SingleRequestProxy { | ||
| address public payee; | ||
| address public tokenAddress; | ||
| bytes public paymentReference; | ||
| address public feeAddress; | ||
| uint256 public feeAmount; | ||
| bytes public paymentReference; | ||
| IERC20FeeProxy public erc20FeeProxy; | ||
| constructor( | ||
| address _payee, | ||
| address _tokenAddress, | ||
| bytes memory _paymentReference, | ||
MantisClone marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| address _feeAddress, | ||
| uint256 _feeAmount, | ||
| bytes memory _paymentReference, | ||
| address _erc20FeeProxy | ||
| ) { | ||
| payee = _payee; | ||
| tokenAddress = _tokenAddress; | ||
| paymentReference = _paymentReference; | ||
| feeAddress = _feeAddress; | ||
| feeAmount = _feeAmount; | ||
| paymentReference = _paymentReference; | ||
| erc20FeeProxy = IERC20FeeProxy(_erc20FeeProxy); | ||
| } | ||
4 changes: 2 additions & 2 deletions
4 packages/smart-contracts/src/contracts/EthereumSingleRequestProxy.sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -30,9 +30,9 @@ contract EthereumSingleRequestProxy { | ||
| constructor( | ||
| address _payee, | ||
| bytes memory _paymentReference, | ||
| address _ethereumFeeProxy, | ||
| address _feeAddress, | ||
| uint256 _feeAmount | ||
| uint256 _feeAmount, | ||
| address _ethereumFeeProxy | ||
MantisClone marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| ) { | ||
| payee = _payee; | ||
| paymentReference = _paymentReference; | ||
35 changes: 28 additions & 7 deletions
35 packages/smart-contracts/src/contracts/SingleRequestProxyFactory.sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -21,14 +21,20 @@ contract SingleRequestProxyFactory is Ownable { | ||
| event EthereumSingleRequestProxyCreated( | ||
| address proxyAddress, | ||
| address payee, | ||
| bytes indexed paymentReference | ||
| bytes indexed paymentReference, | ||
| address feeAddress, | ||
| uint256 feeAmount, | ||
| address feeProxyUsed | ||
| ); | ||
| event ERC20SingleRequestProxyCreated( | ||
| address proxyAddress, | ||
| address payee, | ||
| address tokenAddress, | ||
| bytes indexed paymentReference | ||
| bytes indexed paymentReference, | ||
| address feeAddress, | ||
| uint256 feeAmount, | ||
| address feeProxyUsed | ||
| ); | ||
| event ERC20FeeProxyUpdated(address indexed newERC20FeeProxy); | ||
| @@ -60,11 +66,18 @@ contract SingleRequestProxyFactory is Ownable { | ||
| EthereumSingleRequestProxy proxy = new EthereumSingleRequestProxy( | ||
| _payee, | ||
| _paymentReference, | ||
| ethereumFeeProxy, | ||
| _feeAddress, | ||
| _feeAmount | ||
| _feeAmount, | ||
| ethereumFeeProxy | ||
| ); | ||
| emit EthereumSingleRequestProxyCreated( | ||
| address(proxy), | ||
| _payee, | ||
| _paymentReference, | ||
| _feeAddress, | ||
| _feeAmount, | ||
| ethereumFeeProxy | ||
| ); | ||
| emit EthereumSingleRequestProxyCreated(address(proxy), _payee, _paymentReference); | ||
| return address(proxy); | ||
| } | ||
| @@ -87,13 +100,21 @@ contract SingleRequestProxyFactory is Ownable { | ||
| ERC20SingleRequestProxy proxy = new ERC20SingleRequestProxy( | ||
| _payee, | ||
| _tokenAddress, | ||
| _paymentReference, | ||
| _feeAddress, | ||
| _feeAmount, | ||
| _paymentReference, | ||
| erc20FeeProxy | ||
| ); | ||
| emit ERC20SingleRequestProxyCreated(address(proxy), _payee, _tokenAddress, _paymentReference); | ||
| emit ERC20SingleRequestProxyCreated( | ||
| address(proxy), | ||
| _payee, | ||
| _tokenAddress, | ||
| _paymentReference, | ||
| _feeAddress, | ||
| _feeAmount, | ||
| erc20FeeProxy | ||
| ); | ||
MantisClone marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| return address(proxy); | ||
| } | ||
36 changes: 36 additions & 0 deletions
36 packages/smart-contracts/src/lib/artifacts/SingleRequestProxyFactory/0.1.0.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4 packages/smart-contracts/src/lib/artifacts/SingleRequestProxyFactory/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6 packages/smart-contracts/test/contracts/ERC20SingleRequestProxy.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4 packages/smart-contracts/test/contracts/EthereumSingleRequestProxy.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 17 additions & 4 deletions
21 packages/smart-contracts/test/contracts/SingleRequestProxyFactory.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.