Skip to content

Commit

Permalink
Merge branch 'master' into feature/base64url
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestognw committed Jan 12, 2024
2 parents 4b30a0b + efb8c1a commit 26658ce
Show file tree
Hide file tree
Showing 13 changed files with 49 additions and 588 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
runs-on: ubuntu-latest
env:
FORCE_COLOR: 1
# Needed for "eth-gas-reporter" to produce a "gasReporterOutput.json" as documented in
# https://github.com/cgewecke/eth-gas-reporter/blob/v0.2.27/docs/gasReporterOutput.md
CI: true
GAS: true
steps:
- uses: actions/checkout@v4
Expand Down
13 changes: 10 additions & 3 deletions contracts/access/manager/IAccessManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,16 @@ interface IAccessManager {
* [2] Pending execution delay for the account.
* [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.
*/
function getAccess(uint64 roleId, address account) external view returns (uint48, uint32, uint32, uint48);
function getAccess(
uint64 roleId,
address account
) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);

/**
* @dev Check if a given account currently has the permission level corresponding to a given role. Note that this
* permission might be associated with an execution delay. {getAccess} can provide more details.
*/
function hasRole(uint64 roleId, address account) external view returns (bool, uint32);
function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);

/**
* @dev Give a label to a role, for improved role discoverability by UIs.
Expand Down Expand Up @@ -340,7 +343,11 @@ interface IAccessManager {
* this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target
* contract if it is using standard Solidity ABI encoding.
*/
function schedule(address target, bytes calldata data, uint48 when) external returns (bytes32, uint32);
function schedule(
address target,
bytes calldata data,
uint48 when
) external returns (bytes32 operationId, uint32 nonce);

/**
* @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the
Expand Down
32 changes: 10 additions & 22 deletions hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ const argv = require('yargs/yargs')()
type: 'boolean',
default: false,
},
gasReport: {
alias: 'enableGasReportPath',
type: 'string',
implies: 'gas',
default: undefined,
},
mode: {
alias: 'compileMode',
type: 'string',
Expand Down Expand Up @@ -55,10 +49,12 @@ const argv = require('yargs/yargs')()
},
}).argv;

require('@nomicfoundation/hardhat-toolbox');
require('@nomicfoundation/hardhat-chai-matchers');
require('@nomicfoundation/hardhat-ethers');
require('hardhat-ignore-warnings');
require('hardhat-exposed');
require('hardhat-gas-reporter');
require('hardhat-ignore-warnings');
require('solidity-coverage');
require('solidity-docgen');
argv.foundry && require('@nomicfoundation/hardhat-foundry');

Expand Down Expand Up @@ -101,30 +97,22 @@ module.exports = {
networks: {
hardhat: {
allowUnlimitedContractSize: !withOptimizations,
initialBaseFeePerGas: argv.coverage ? 0 : undefined,
},
},
exposed: {
imports: true,
initializers: true,
exclude: ['vendor/**/*'],
},
docgen: require('./docs/config'),
};

if (argv.gas) {
require('hardhat-gas-reporter');
module.exports.gasReporter = {
gasReporter: {
enabled: argv.gas,
showMethodSig: true,
currency: 'USD',
outputFile: argv.gasReport,
coinmarketcap: argv.coinmarketcap,
};
}

if (argv.coverage) {
require('solidity-coverage');
module.exports.networks.hardhat.initialBaseFeePerGas = 0;
}
},
docgen: require('./docs/config'),
};

function hasFoundry() {
return proc.spawnSync('forge', ['-V'], { stdio: 'ignore' }).error === undefined;
Expand Down
18 changes: 0 additions & 18 deletions hardhat/env-contract.js

This file was deleted.

Loading

0 comments on commit 26658ce

Please sign in to comment.