Skip to content

Commit

Permalink
remove getowner from paymentregistry (#152)
Browse files Browse the repository at this point in the history
* refactor: renaming of yabtransfer to paymentregistry

passes all tests, have not yet deployed

* fix: add check to see if PaymentRegistry has been correctly deployed

* chore: update PaymentRegistry.json

* refactor: change 'withdraw' to 'claimPayment'

* fix(claim_payment.sh): call clayPayment instead of withdraw

* refactor(escrow): rename claimPayment to claim_payment

* fix(claim_payment.sh): call correct claimPayment function

* remove: getOwner() function from YABTransfer

* feat: add getEscrowAddress() + getEscrowClaimPaymentSelector()

---------

Co-authored-by: Uriel Mihura <[email protected]>
Co-authored-by: JuArce <[email protected]>
  • Loading branch information
3 people authored Feb 14, 2024
1 parent 45e2c40 commit 3fe62f8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions contracts/solidity/src/PaymentRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@ contract PaymentRegistry is Initializable, OwnableUpgradeable, UUPSUpgradeable {
emit ModifiedEscrowClaimPaymentSelector(snEscrowClaimPaymentSelector);
}

function getEscrowAddress() external view returns (uint256) {
return _snEscrowAddress;
}

function getEscrowClaimPaymentSelector() external view returns (uint256) {
return _snEscrowClaimPaymentSelector;
}


//// MM ACL:

Expand All @@ -98,10 +106,6 @@ contract PaymentRegistry is Initializable, OwnableUpgradeable, UUPSUpgradeable {
_marketMaker = newMMAddress;
}

function getOwner() external view returns (address) {
return owner();
}

modifier onlyOwnerOrMM {
require(msg.sender == owner() || msg.sender == _marketMaker, "Only Owner or MM can call this function");
_;
Expand Down
2 changes: 1 addition & 1 deletion contracts/solidity/test/MM_ACL.sol
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ contract TransferTest is Test {
}

function test_get_owner() public {
address ownerAddress = yab_caller.getOwner();
address ownerAddress = yab_caller.owner();
assertEq(ownerAddress, deployer);
}
}

0 comments on commit 3fe62f8

Please sign in to comment.