Skip to content

Commit

Permalink
FT connector: API improvements, add more tests (Near-One#153)
Browse files Browse the repository at this point in the history
* Add `setProofConsumer` API;
* Add grant roles tests.

Co-authored-by: Kirill <[email protected]>
  • Loading branch information
karim-en and sept-en committed Aug 24, 2022
1 parent 6774ae5 commit 65c8820
Show file tree
Hide file tree
Showing 8 changed files with 610 additions and 8 deletions.
4 changes: 4 additions & 0 deletions erc20-bridge-token/contracts/BridgeTokenFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ contract BridgeTokenFactory is AccessControlUpgradeable, SelectivePausableUpgrad
proxy.upgradeTo(implementation);
}

function setProofConsumer(address newProofConsumerAddress) external onlyRole(DEFAULT_ADMIN_ROLE) {
proofConsumerAddress = newProofConsumerAddress;
}

function enableWhitelistMode() external onlyRole(DEFAULT_ADMIN_ROLE) {
_isWhitelistModeEnabled = true;
}
Expand Down
4 changes: 4 additions & 0 deletions erc20-bridge-token/dist/BridgeTokenFactory.full.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4079,6 +4079,10 @@ contract BridgeTokenFactory is AccessControlUpgradeable, SelectivePausableUpgrad
proxy.upgradeTo(implementation);
}

function setProofConsumer(address newProofConsumerAddress) external onlyRole(DEFAULT_ADMIN_ROLE) {
proofConsumerAddress = newProofConsumerAddress;
}

function enableWhitelistMode() external onlyRole(DEFAULT_ADMIN_ROLE) {
_isWhitelistModeEnabled = true;
}
Expand Down
Loading

0 comments on commit 65c8820

Please sign in to comment.