Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [18.x]

steps:
- uses: actions/checkout@v2
Expand All @@ -24,7 +24,7 @@ jobs:
scope: '@benddao'
env:
NODE_AUTH_TOKEN: ${{ secrets.PAT_PACKAGES_REGISTRY_READ_ONLY }}
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -35,7 +35,7 @@ jobs:
- name: Setup Nodejs with yarn caching
uses: actions/setup-node@v2
with:
node-version: "16"
node-version: "18.x"
cache: yarn
- name: Install dependencies
run: yarn
Expand All @@ -46,7 +46,7 @@ jobs:
- name: Coverage
run: npm run dev:coverage
- name: Publish coverage
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
slug: BendDAO/boundnft-protocol
54 changes: 0 additions & 54 deletions .github/workflows/release.yml

This file was deleted.

7 changes: 5 additions & 2 deletions .solcover.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
const accounts = require(`./test-wallets.js`).accounts;

module.exports = {
client: require('ganache-cli'),
skipFiles: ['./mocks', './interfaces'],
silent: true,
measureStatementCoverage: true,
measureFunctionCoverage: true,
configureYulOptimizer: true,
skipFiles: ["./mocks", "./interfaces", "./test"],
mocha: {
enableTimeouts: false,
},
Expand Down
78 changes: 67 additions & 11 deletions abis/BNFT.json
Original file line number Diff line number Diff line change
Expand Up @@ -605,17 +605,17 @@
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
"internalType": "uint256[]",
"name": "tokenIds",
"type": "uint256[]"
}
],
"name": "getDelegateCashForToken",
"outputs": [
{
"internalType": "address[]",
"internalType": "address[][]",
"name": "",
"type": "address[]"
"type": "address[][]"
}
],
"stateMutability": "view",
Expand All @@ -624,17 +624,22 @@
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
"internalType": "uint256[]",
"name": "tokenIds",
"type": "uint256[]"
}
],
"name": "getDelegateCashForTokenV2",
"outputs": [
{
"internalType": "address[]",
"name": "",
"type": "address[]"
"internalType": "address[][]",
"name": "delegateAddrs",
"type": "address[][]"
},
{
"internalType": "bytes32[][]",
"name": "delegateRights",
"type": "bytes32[][]"
}
],
"stateMutability": "view",
Expand Down Expand Up @@ -1157,6 +1162,57 @@
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "delegate",
"type": "address"
},
{
"internalType": "uint256[]",
"name": "tokenIds",
"type": "uint256[]"
},
{
"internalType": "bytes32",
"name": "rights",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "value",
"type": "bool"
}
],
"name": "setDelegateCashForTokenV2WithRights",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256[]",
"name": "tokenIds",
"type": "uint256[]"
},
{
"internalType": "bytes32",
"name": "rights",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "value",
"type": "bool"
}
],
"name": "setDelegateCashForTokenV2WithRights",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
Expand Down
47 changes: 15 additions & 32 deletions contracts/interfaces/IBNFT.sol
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,7 @@ interface IBNFT {
* @param nftTokenIds token ids of the underlying asset
* @param params Variadic packed params to pass to the receiver as extra information
*/
function flashLoan(
address receiverAddress,
uint256[] calldata nftTokenIds,
bytes calldata params
) external;
function flashLoan(address receiverAddress, uint256[] calldata nftTokenIds, bytes calldata params) external;

/**
* @dev Approve or remove the flash loan `operator` as an operator for the minter.
Expand All @@ -130,20 +126,12 @@ interface IBNFT {
* Operators can call {flashLoan} for any token minted by the minter.
*
*/
function setFlashLoanLocking(
uint256 tokenId,
address operator,
bool locked
) external;
function setFlashLoanLocking(uint256 tokenId, address operator, bool locked) external;

/**
* @dev Returns if the `operator` is allowed to call flash loan of the assets of `minter`.
*/
function isFlashLoanLocked(
uint256 tokenId,
address minter,
address operator
) external view returns (bool);
function isFlashLoanLocked(uint256 tokenId, address minter, address operator) external view returns (bool);

function getFlashLoanLocked(uint256 tokenId, address minter) external view returns (address[] memory);

Expand All @@ -153,37 +141,32 @@ interface IBNFT {

function setDelegateCashForToken(uint256[] calldata tokenIds, bool value) external;

function setDelegateCashForToken(
address delegate,
uint256[] calldata tokenIds,
bool value
) external;
function setDelegateCashForToken(address delegate, uint256[] calldata tokenIds, bool value) external;

// V2 Delegate Cash

function getDelegateCashForTokenV2(uint256[] calldata tokenIds) external view returns (address[][] memory);
function getDelegateCashForTokenV2(
uint256[] calldata tokenIds
) external view returns (address[][] memory delegates, bytes32[][] memory rights);

function setDelegateCashForTokenV2WithRights(uint256[] calldata tokenIds, bytes32 rights, bool value) external;

function setDelegateCashForTokenV2(uint256[] calldata tokenIds, bool value) external;

function setDelegateCashForTokenV2(
function setDelegateCashForTokenV2(address delegate, uint256[] calldata tokenIds, bool value) external;

function setDelegateCashForTokenV2WithRights(
address delegate,
uint256[] calldata tokenIds,
bytes32 rights,
bool value
) external;

// Airdrop

function claimERC20Airdrop(
address token,
address to,
uint256 amount
) external;
function claimERC20Airdrop(address token, address to, uint256 amount) external;

function claimERC721Airdrop(
address token,
address to,
uint256[] calldata ids
) external;
function claimERC721Airdrop(address token, address to, uint256[] calldata ids) external;

function claimERC1155Airdrop(
address token,
Expand Down
Loading
Loading