Skip to content

Commit

Permalink
Merge pull request #86 from bandohq/chore/proxies-setup
Browse files Browse the repository at this point in the history
CHORE - Setup specific proxy name contracts
  • Loading branch information
luisgj authored Dec 6, 2024
2 parents 736211e + f0a326e commit 50b72da
Show file tree
Hide file tree
Showing 21 changed files with 499 additions and 98 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/build-abis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
branches: [main]
paths:
- '**/*.sol'
- 'deployments/**'
jobs:
build-abis:
runs-on: ubuntu-latest
Expand All @@ -27,16 +28,20 @@ jobs:
with:
repository: bandohq/contract-abis
token: ${{ secrets.GH_PAT }}
path: abis
path: abis_repo
- name: Copy and commit ABIs
run: |
cp -r out/* abis/
rm -rf abis_repo/
mkdir -p abis_repo/abis
mkdir -p abis_repo/contracts
cp -r out/* abis_repo/abis/
cp -r deployments/* abis_repo/contracts/
cd abis
git config user.name "bando-bot"
git config user.email "[email protected]"
git add .
DATE=$(date '+%Y-%m-%d')
git diff --staged --quiet || git commit -m "Update ABIs $DATE"
git diff --staged --quiet || git commit -m "Update BFP EVM Contracts $DATE"
VERSION=$(date '+%Y%m%d%H%M%S')
git tag -a "v$VERSION" -m "Release v$VERSION"
git push origin main --tags
4 changes: 2 additions & 2 deletions contracts/BandoERC20FulfillableV1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,10 @@ contract BandoERC20FulfillableV1 is
/*****************************/

/// @dev Initializes the contract.
function initialize() public virtual initializer {
__Ownable_init(msg.sender);
function initialize(address initialOwner) public virtual initializer {
__UUPSUpgradeable_init();
__ReentrancyGuard_init();
__Ownable_init(initialOwner);
_fulfillmentIdCount = 1;
}

Expand Down
4 changes: 2 additions & 2 deletions contracts/BandoFulfillableV1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ contract BandoFulfillableV1 is

/// @notice Initializes the contract
/// @dev set counter to 1 to avoid 0 id
function initialize() public virtual initializer {
__Ownable_init(msg.sender);
function initialize(address initialOwner) public virtual initializer {
__UUPSUpgradeable_init();
__ReentrancyGuard_init();
__Ownable_init(initialOwner);
_fulfillmentIdCount = 1;
}

Expand Down
4 changes: 2 additions & 2 deletions contracts/BandoFulfillmentManagerV1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ contract BandoFulfillmentManagerV1 is OwnableUpgradeable, UUPSUpgradeable {
}

/// @notice Initializes the contract
function initialize() public virtual initializer {
__Ownable_init(msg.sender);
function initialize(address initialOwner) public virtual initializer {
__UUPSUpgradeable_init();
__Ownable_init(initialOwner);
}

/// @dev UUPS upgrade authorization
Expand Down
12 changes: 12 additions & 0 deletions contracts/proxy/BandoERC20FulfillableProxy.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;

import { ERC1967Proxy } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";

/// @title BandoERC20FulfillableProxy
/// @notice Proxy contract for BandoERC20Fulfillable
contract BandoERC20FulfillableProxy is ERC1967Proxy {
constructor(address _logic, bytes memory _data)
ERC1967Proxy(_logic, _data)
{}
}
12 changes: 12 additions & 0 deletions contracts/proxy/BandoFulfillableProxy.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;

import { ERC1967Proxy } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";

/// @title BandoFulfillableProxy
/// @notice Proxy contract for BandoFulfillable
contract BandoFulfillableProxy is ERC1967Proxy {
constructor(address _logic, bytes memory _data)
ERC1967Proxy(_logic, _data)
{}
}
12 changes: 12 additions & 0 deletions contracts/proxy/BandoFulfillmentManagerProxy.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;

import { ERC1967Proxy } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";

/// @title BandoFulfillmentManagerProxy
/// @notice Proxy contract for BandoFulfillmentManager
contract BandoFulfillmentManagerProxy is ERC1967Proxy {
constructor(address _logic, bytes memory _data)
ERC1967Proxy(_logic, _data)
{}
}
2 changes: 1 addition & 1 deletion coverage.json

Large diffs are not rendered by default.

Loading

0 comments on commit 50b72da

Please sign in to comment.