Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b8f127f
chore: update dependencies and configurations for bridge contracts, i…
blueogin Jan 23, 2026
1949fc5
refactor: update imports and streamline GoodDollarOFTAdapter contract…
blueogin Jan 23, 2026
7840412
Merge branch 'feat/oft-adapter-step1' into feat/oft-adapter-step2
blueogin Jan 27, 2026
5670101
feat: implement fee deduction and minting logic in GoodDollarOFTAdapt…
blueogin Jan 29, 2026
c7c358e
Merge branch 'feat/oft-adapter-step1' into feat/oft-adapter-step2
blueogin Feb 2, 2026
f6bac2e
refactor: simplify limit enforcement in GoodDollarOFTAdapter by conso…
blueogin Feb 2, 2026
826ffa9
fix: update parameter name in _enforceLimits function for clarity in …
blueogin Feb 2, 2026
af45780
feat: enforce minFee and maxFee bounds in _takeFee function of GoodDo…
blueogin Feb 2, 2026
c08bd79
feat: enhance GoodDollarOFTAdapter with UUPS upgradeability and refin…
blueogin Feb 2, 2026
2c21728
refactor: integrate IMessagePassingBridge structures into GoodDollarO…
blueogin Feb 2, 2026
837dcf8
refactor: replace IMessagePassingBridge structures with local structs…
blueogin Feb 2, 2026
5488ae0
refactor: streamline limit enforcement logic in GoodDollarOFTAdapter …
blueogin Feb 4, 2026
0edbbd3
refactor: comment out limit enforcement checks in GoodDollarOFTAdapte…
blueogin Feb 4, 2026
b01b344
refactor: implement UUPS upgradeability in GoodDollarOFTAdapter and e…
blueogin Feb 6, 2026
36e1c86
chore: downgrade hardhat version to 2.26 in package.json and bridge-c…
blueogin Feb 9, 2026
bf88a15
refactor: enhance request approval mechanism in GoodDollarOFTAdapter …
blueogin Feb 9, 2026
028d132
refactor: reorder inheritance and enhance initialization in GoodDolla…
blueogin Feb 9, 2026
cf6abf6
refactor: remove commented-out tests and streamline unsafeAllow confi…
blueogin Feb 9, 2026
4dcc06d
refactor: update predictNextGuid function in GoodDollarOFTAdapter to …
blueogin Feb 9, 2026
765351f
refactor: enhance GoodDollarOFTAdapter by implementing GUID generatio…
blueogin Feb 9, 2026
4b84566
refactor: simplify request approval mechanism in GoodDollarOFTAdapter…
blueogin Feb 9, 2026
ce5f70c
refactor: replace request approval mechanism with failed receive requ…
blueogin Feb 11, 2026
6cf23fd
refactor: streamline limit checks in GoodDollarOFTAdapter by consolid…
blueogin Feb 11, 2026
1614e9e
refactor: update test description in GoodDollarOFTAdapter fork tests …
blueogin Feb 11, 2026
0c3a7e5
refactor: add feeRecipient parameter to initialize function in GoodDo…
blueogin Feb 11, 2026
1aa8439
refactor: include feeRecipient parameter in GoodDollarOFTAdapter test…
blueogin Feb 11, 2026
98d73be
refactor: add ReceiveRequestFailed event to GoodDollarOFTAdapter for …
blueogin Feb 13, 2026
514bcc1
refactor: add timestamp to FailedReceiveRequest in GoodDollarOFTAdapt…
blueogin Mar 2, 2026
05f72f4
refactor: enhance GoodDollarOFTAdapter with additional error handling…
blueogin Mar 2, 2026
5a3e63d
refactor: simplify documentation in GoodDollarMinterBurner and GoodDo…
blueogin Mar 3, 2026
28c3aa5
refactor: remove unused IIdentity interface and simplify _toBytes32 f…
blueogin Mar 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
],
"packageManager": "yarn@4.6.0",
"resolutions": {
"hardhat": "2.28.3"
"hardhat": "2.26"
}
}
32 changes: 3 additions & 29 deletions packages/bridge-contracts/contracts/oft/GoodDollarMinterBurner.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,9 @@ pragma solidity >=0.8;
import {ISuperGoodDollar} from "./interfaces/ISuperGoodDollar.sol";
import {DAOUpgradeableContract, INameService} from "@gooddollar/goodprotocol/contracts/utils/DAOUpgradeableContract.sol";

interface IIdentity {
function isWhitelisted(address) external view returns (bool);
}

/**
* @title GoodDollarMinterBurner
* @dev DAO-upgradeable contract that handles minting and burning of GoodDollar tokens for OFT
*
* This contract is used by the GoodDollarOFTAdapter to mint and burn tokens during
* cross-chain transfers via LayerZero. It is upgradeable and controlled by the DAO.
*
* Key functionalities:
* - Mint tokens when receiving cross-chain transfers
* - Burn tokens when sending cross-chain transfers
* - Manage operators (like OFT adapter) that can mint/burn
* - Pause functionality for emergency situations
* - Upgradeable via DAO governance
* @dev DAO-upgradeable contract that handles minting and burning of GoodDollar tokens for OFT; used by GoodDollarOFTAdapter for cross-chain transfers via LayerZero.
*/
contract GoodDollarMinterBurner is DAOUpgradeableContract {
ISuperGoodDollar public token;
Expand Down Expand Up @@ -55,8 +41,6 @@ contract GoodDollarMinterBurner is DAOUpgradeableContract {
* @dev Set or remove an operator that can mint/burn tokens
* @param _operator The address of the operator (e.g., OFT adapter)
* @param _status True to enable, false to disable
*
* Only the DAO avatar can call this function.
*/
function setOperator(address _operator, bool _status) external {
_onlyAvatar();
Expand All @@ -66,14 +50,10 @@ contract GoodDollarMinterBurner is DAOUpgradeableContract {


/**
* @dev Burn tokens from an address
* @dev Burn tokens from an address. Limits are not enforced on the sending side (burning); limits are enforced on the receiving side (minting).
* @param _from The address to burn tokens from
* @param _amount The amount of tokens to burn
* @return success True if the burn was successful
*
* Only authorized operators (like OFT adapter) or the DAO avatar can call this.
* Note: Limits are NOT enforced on the sending side (burning), matching MessagePassingBridge behavior.
* Limits are only enforced on the receiving side (minting) when tokens are received.
*/
function burn(address _from, uint256 _amount) external onlyOperators returns (bool) {
token.burnFrom(_from, _amount);
Expand All @@ -87,8 +67,6 @@ contract GoodDollarMinterBurner is DAOUpgradeableContract {
* @param _to The address to mint tokens to
* @param _amount The amount of tokens to mint
* @return success True if the mint was successful
*
* Only authorized operators (like OFT adapter) or the DAO avatar can call this.
*/
function mint(address _to, uint256 _amount) external onlyOperators returns (bool) {
bool success = token.mint(_to, _amount);
Expand All @@ -99,9 +77,7 @@ contract GoodDollarMinterBurner is DAOUpgradeableContract {
}

/**
* @dev Pause all mint and burn operations
*
* Only the DAO avatar can call this. Useful for emergency situations.
* @dev Pause all mint and burn operations (emergency use)
*/
function pause() external {
_onlyAvatar();
Expand All @@ -112,8 +88,6 @@ contract GoodDollarMinterBurner is DAOUpgradeableContract {

/**
* @dev Unpause mint and burn operations
*
* Only the DAO avatar can call this.
*/
function unpause() external {
_onlyAvatar();
Expand Down
Loading