Skip to content

Commit

Permalink
test: current manager
Browse files Browse the repository at this point in the history
  • Loading branch information
geolffreym committed Aug 8, 2024
1 parent 84b0a89 commit 9b869bd
Show file tree
Hide file tree
Showing 15 changed files with 85 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cache_forge/solidity-files-cache.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion contracts/base/upgradeable/CurrencyManagerUpgradeable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ abstract contract CurrencyManagerUpgradeable is

/// @notice Returns the list of supported currencies.
/// @return An array of addresses of the supported currencies.
function supportedCurrencies() external view returns (address[] memory) {
function supportedCurrencies() public view returns (address[] memory) {
CurrencyManagerStorage storage $ = _getCurrencyManagerStorage();
return $._supportedCurrencies;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"abi":[{"type":"function","name":"isCurrencySupported","inputs":[{"name":"currency","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"supportedCurrencies","inputs":[],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"event","name":"Initialized","inputs":[{"name":"version","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"error","name":"InvalidInitialization","inputs":[]},{"type":"error","name":"InvalidUnsupportedCurrency","inputs":[{"name":"currency","type":"address","internalType":"address"}]},{"type":"error","name":"NotInitializing","inputs":[]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"isCurrencySupported(address)":"70dfaeca","supportedCurrencies()":"2c58824c"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"currency\",\"type\":\"address\"}],\"name\":\"InvalidUnsupportedCurrency\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"currency\",\"type\":\"address\"}],\"name\":\"isCurrencySupported\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"supportedCurrencies\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"This contract uses the upgradeable pattern and stores currency data.\",\"errors\":{\"InvalidInitialization()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidUnsupportedCurrency(address)\":[{\"params\":{\"currency\":\"The address of the unsupported currency.\"}}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}]},\"events\":{\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"isCurrencySupported(address)\":{\"params\":{\"currency\":\"The address of the currency to check.\"},\"returns\":{\"_0\":\"True if supported, otherwise False.\"}},\"supportedCurrencies()\":{\"returns\":{\"_0\":\"An array of addresses of the supported currencies.\"}}},\"title\":\"Currency Manager Upgradeable\",\"version\":1},\"userdoc\":{\"errors\":{\"InvalidUnsupportedCurrency(address)\":[{\"notice\":\"Error thrown when trying to remove an unsupported currency.\"}]},\"kind\":\"user\",\"methods\":{\"isCurrencySupported(address)\":{\"notice\":\"Checks if a currency is supported.\"},\"supportedCurrencies()\":{\"notice\":\"Returns the list of supported currencies.\"}},\"notice\":\"This contract manages supported currencies and allows for adding/removing supported currencies.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/base/upgradeable/CurrencyManagerUpgradeable.sol\":\"CurrencyManagerUpgradeable\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":20000},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":eth-gas-reporter/=node_modules/eth-gas-reporter/\",\":forge-std/=lib/forge-std/src/\",\":hardhat/=node_modules/hardhat/\"],\"viaIR\":true},\"sources\":{\"contracts/base/upgradeable/CurrencyManagerUpgradeable.sol\":{\"keccak256\":\"0xd60980b11d7e0705663c4ee95797cfaeafc72f2e697f1fc75f6c6f03f7dc17f6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1c1abaec354707941f172ab91ce22b1d6974eec79186c7a6a00b196290b1f104\",\"dweb:/ipfs/QmVsvYVthzwiCoQDts96qRsEXiUmN1DnBM4TXeddV2dRsN\"]},\"contracts/interfaces/ICurrencyManager.sol\":{\"keccak256\":\"0x76294a273996a811186b39324dbf4ed82a2ca19a09972cb5969c694f7937d544\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://516a82b791dfd4c812e8fd176b630d8da6e7a25a26aecc5f4458666cb7369297\",\"dweb:/ipfs/QmRwHEx7KfkqbaMZoyZ366VWvusUWe2zPKTJvLGzepfNwe\"]},\"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x631188737069917d2f909d29ce62c4d48611d326686ba6683e26b72a23bfac0b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7a61054ae84cd6c4d04c0c4450ba1d6de41e27e0a2c4f1bcdf58f796b401c609\",\"dweb:/ipfs/QmUvtdp7X1mRVyC3CsHrtPbgoqWaXHp3S1ZR24tpAQYJWM\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.24+commit.e11b9ed9"},"language":"Solidity","output":{"abi":[{"inputs":[],"type":"error","name":"InvalidInitialization"},{"inputs":[{"internalType":"address","name":"currency","type":"address"}],"type":"error","name":"InvalidUnsupportedCurrency"},{"inputs":[],"type":"error","name":"NotInitializing"},{"inputs":[{"internalType":"uint64","name":"version","type":"uint64","indexed":false}],"type":"event","name":"Initialized","anonymous":false},{"inputs":[{"internalType":"address","name":"currency","type":"address"}],"stateMutability":"view","type":"function","name":"isCurrencySupported","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"supportedCurrencies","outputs":[{"internalType":"address[]","name":"","type":"address[]"}]}],"devdoc":{"kind":"dev","methods":{"isCurrencySupported(address)":{"params":{"currency":"The address of the currency to check."},"returns":{"_0":"True if supported, otherwise False."}},"supportedCurrencies()":{"returns":{"_0":"An array of addresses of the supported currencies."}}},"version":1},"userdoc":{"kind":"user","methods":{"isCurrencySupported(address)":{"notice":"Checks if a currency is supported."},"supportedCurrencies()":{"notice":"Returns the list of supported currencies."}},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","eth-gas-reporter/=node_modules/eth-gas-reporter/","forge-std/=lib/forge-std/src/","hardhat/=node_modules/hardhat/"],"optimizer":{"enabled":true,"runs":20000},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"contracts/base/upgradeable/CurrencyManagerUpgradeable.sol":"CurrencyManagerUpgradeable"},"evmVersion":"paris","libraries":{},"viaIR":true},"sources":{"contracts/base/upgradeable/CurrencyManagerUpgradeable.sol":{"keccak256":"0xd60980b11d7e0705663c4ee95797cfaeafc72f2e697f1fc75f6c6f03f7dc17f6","urls":["bzz-raw://1c1abaec354707941f172ab91ce22b1d6974eec79186c7a6a00b196290b1f104","dweb:/ipfs/QmVsvYVthzwiCoQDts96qRsEXiUmN1DnBM4TXeddV2dRsN"],"license":"MIT"},"contracts/interfaces/ICurrencyManager.sol":{"keccak256":"0x76294a273996a811186b39324dbf4ed82a2ca19a09972cb5969c694f7937d544","urls":["bzz-raw://516a82b791dfd4c812e8fd176b630d8da6e7a25a26aecc5f4458666cb7369297","dweb:/ipfs/QmRwHEx7KfkqbaMZoyZ366VWvusUWe2zPKTJvLGzepfNwe"],"license":"MIT"},"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol":{"keccak256":"0x631188737069917d2f909d29ce62c4d48611d326686ba6683e26b72a23bfac0b","urls":["bzz-raw://7a61054ae84cd6c4d04c0c4450ba1d6de41e27e0a2c4f1bcdf58f796b401c609","dweb:/ipfs/QmUvtdp7X1mRVyC3CsHrtPbgoqWaXHp3S1ZR24tpAQYJWM"],"license":"MIT"}},"version":1},"id":12}
{"abi":[{"type":"function","name":"isCurrencySupported","inputs":[{"name":"currency","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"type":"function","name":"supportedCurrencies","inputs":[],"outputs":[{"name":"","type":"address[]","internalType":"address[]"}],"stateMutability":"view"},{"type":"event","name":"Initialized","inputs":[{"name":"version","type":"uint64","indexed":false,"internalType":"uint64"}],"anonymous":false},{"type":"error","name":"InvalidInitialization","inputs":[]},{"type":"error","name":"InvalidUnsupportedCurrency","inputs":[{"name":"currency","type":"address","internalType":"address"}]},{"type":"error","name":"NotInitializing","inputs":[]}],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{"isCurrencySupported(address)":"70dfaeca","supportedCurrencies()":"2c58824c"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"currency\",\"type\":\"address\"}],\"name\":\"InvalidUnsupportedCurrency\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"currency\",\"type\":\"address\"}],\"name\":\"isCurrencySupported\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"supportedCurrencies\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"This contract uses the upgradeable pattern and stores currency data.\",\"errors\":{\"InvalidInitialization()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidUnsupportedCurrency(address)\":[{\"params\":{\"currency\":\"The address of the unsupported currency.\"}}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}]},\"events\":{\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"isCurrencySupported(address)\":{\"params\":{\"currency\":\"The address of the currency to check.\"},\"returns\":{\"_0\":\"True if supported, otherwise False.\"}},\"supportedCurrencies()\":{\"returns\":{\"_0\":\"An array of addresses of the supported currencies.\"}}},\"title\":\"Currency Manager Upgradeable\",\"version\":1},\"userdoc\":{\"errors\":{\"InvalidUnsupportedCurrency(address)\":[{\"notice\":\"Error thrown when trying to remove an unsupported currency.\"}]},\"kind\":\"user\",\"methods\":{\"isCurrencySupported(address)\":{\"notice\":\"Checks if a currency is supported.\"},\"supportedCurrencies()\":{\"notice\":\"Returns the list of supported currencies.\"}},\"notice\":\"This contract manages supported currencies and allows for adding/removing supported currencies.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/base/upgradeable/CurrencyManagerUpgradeable.sol\":\"CurrencyManagerUpgradeable\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":20000},\"remappings\":[\":@openzeppelin/=node_modules/@openzeppelin/\",\":eth-gas-reporter/=node_modules/eth-gas-reporter/\",\":forge-std/=lib/forge-std/src/\",\":hardhat/=node_modules/hardhat/\"],\"viaIR\":true},\"sources\":{\"contracts/base/upgradeable/CurrencyManagerUpgradeable.sol\":{\"keccak256\":\"0x236c03532dc689405fb3bb2a7d7114cd8f1cdb786a80f25d07bbcf833ec7656e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://331d4ea42c8a588da5b4c5c340a06089f38062d2b8ee8d41a33922808ed939d7\",\"dweb:/ipfs/QmNSxqvkD9MUxU1xzuwBUBfZdFcEnX3Kp6chseV8KPH5di\"]},\"contracts/interfaces/ICurrencyManager.sol\":{\"keccak256\":\"0x76294a273996a811186b39324dbf4ed82a2ca19a09972cb5969c694f7937d544\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://516a82b791dfd4c812e8fd176b630d8da6e7a25a26aecc5f4458666cb7369297\",\"dweb:/ipfs/QmRwHEx7KfkqbaMZoyZ366VWvusUWe2zPKTJvLGzepfNwe\"]},\"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x631188737069917d2f909d29ce62c4d48611d326686ba6683e26b72a23bfac0b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7a61054ae84cd6c4d04c0c4450ba1d6de41e27e0a2c4f1bcdf58f796b401c609\",\"dweb:/ipfs/QmUvtdp7X1mRVyC3CsHrtPbgoqWaXHp3S1ZR24tpAQYJWM\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.24+commit.e11b9ed9"},"language":"Solidity","output":{"abi":[{"inputs":[],"type":"error","name":"InvalidInitialization"},{"inputs":[{"internalType":"address","name":"currency","type":"address"}],"type":"error","name":"InvalidUnsupportedCurrency"},{"inputs":[],"type":"error","name":"NotInitializing"},{"inputs":[{"internalType":"uint64","name":"version","type":"uint64","indexed":false}],"type":"event","name":"Initialized","anonymous":false},{"inputs":[{"internalType":"address","name":"currency","type":"address"}],"stateMutability":"view","type":"function","name":"isCurrencySupported","outputs":[{"internalType":"bool","name":"","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"supportedCurrencies","outputs":[{"internalType":"address[]","name":"","type":"address[]"}]}],"devdoc":{"kind":"dev","methods":{"isCurrencySupported(address)":{"params":{"currency":"The address of the currency to check."},"returns":{"_0":"True if supported, otherwise False."}},"supportedCurrencies()":{"returns":{"_0":"An array of addresses of the supported currencies."}}},"version":1},"userdoc":{"kind":"user","methods":{"isCurrencySupported(address)":{"notice":"Checks if a currency is supported."},"supportedCurrencies()":{"notice":"Returns the list of supported currencies."}},"version":1}},"settings":{"remappings":["@openzeppelin/=node_modules/@openzeppelin/","eth-gas-reporter/=node_modules/eth-gas-reporter/","forge-std/=lib/forge-std/src/","hardhat/=node_modules/hardhat/"],"optimizer":{"enabled":true,"runs":20000},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"contracts/base/upgradeable/CurrencyManagerUpgradeable.sol":"CurrencyManagerUpgradeable"},"evmVersion":"paris","libraries":{},"viaIR":true},"sources":{"contracts/base/upgradeable/CurrencyManagerUpgradeable.sol":{"keccak256":"0x236c03532dc689405fb3bb2a7d7114cd8f1cdb786a80f25d07bbcf833ec7656e","urls":["bzz-raw://331d4ea42c8a588da5b4c5c340a06089f38062d2b8ee8d41a33922808ed939d7","dweb:/ipfs/QmNSxqvkD9MUxU1xzuwBUBfZdFcEnX3Kp6chseV8KPH5di"],"license":"MIT"},"contracts/interfaces/ICurrencyManager.sol":{"keccak256":"0x76294a273996a811186b39324dbf4ed82a2ca19a09972cb5969c694f7937d544","urls":["bzz-raw://516a82b791dfd4c812e8fd176b630d8da6e7a25a26aecc5f4458666cb7369297","dweb:/ipfs/QmRwHEx7KfkqbaMZoyZ366VWvusUWe2zPKTJvLGzepfNwe"],"license":"MIT"},"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol":{"keccak256":"0x631188737069917d2f909d29ce62c4d48611d326686ba6683e26b72a23bfac0b","urls":["bzz-raw://7a61054ae84cd6c4d04c0c4450ba1d6de41e27e0a2c4f1bcdf58f796b401c609","dweb:/ipfs/QmUvtdp7X1mRVyC3CsHrtPbgoqWaXHp3S1ZR24tpAQYJWM"],"license":"MIT"}},"version":1},"id":3}
1 change: 1 addition & 0 deletions out/CurrentManager.t.sol/CurrencyManagerTest.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion out/Distributor.sol/Distributor.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion out/Quorum.t..sol/QuorumTest.json

Large diffs are not rendered by default.

Loading

0 comments on commit 9b869bd

Please sign in to comment.