Skip to content

Releases: violetprotocol/extendable

v1.2.0 Andromeda

26 Aug 13:27
2e9b90f

Choose a tag to compare

v1.2.0 Andromeda Release

Changelog

Major changes to the Extendable pattern to improve gas cost efficiency and better runtime introspection. Solves problem of function shadowing and refactored ERC165 implementation away from Extension.
Extension implementation now slightly changed.
Some bug fixes.
Implemented enhancements and fixes as suggested by auditors.

Added

  • Extensions now implicitly implement ERC165 by calling a singleton contract that contains the logic, to prevent redeployment
  • ERC165Logic singleton exists at static address on all EVM chains
  • Comprehensive event emissions for all base Extensions (Extend, Retract, Replace, Permissioning)
  • Interface struct type that is used to describe Extension implementations
  • PermissioningLogic: renounceOwnership function

Changed

  • Storage libraries function to return state struct renamed _getStorage => _getState
  • Extendable no longer cycles through Extensions to try/catch calls
  • Extensions now must implement a new IExtension interface consisting of getInterface and getSolidityInterface functions.
  • ExtendableStorage changed to support new introspection routines
  • Introspection now allows clearer viewing of interfaces and functions implemented by an Extension or an Extendable
  • _beforeFallback and afterFallback are now correctly placed to avoid certain conditions where they were not atomic
  • ExtendLogic function renamed from getCurrentInterface => getFullInterface
  • ExtendLogic now extends the contract with the Extension using its interface and all function selectors, and will revert if any are already extended
  • RetractLogic now retracts an Extension by removing all references to the Extension address by interfaceId and function selector
  • ReplaceLogic now checks if an Extension that implements multiple interfaces matches that of the old Extension before performing the replacement
  • PermissioningLogic: owner can now no longer be set to the zero address to avoid cases where any user could become owner after setting to address zero by calling init

Removed

v1.1.0

12 Apr 13:43
c2c36f7

Choose a tag to compare

Changelog

Added

  • Re-entrancy guard for various forms of re-entrancy
    • Re-entrancy guard contract
    • Re-entrancy storage
    • Tests
  • CallerContext for safer accessors of callers than msg.sender
    • CallerContext contract
    • CallerContext storage
    • Tests
  • Internal extensions for implementing extensions with functions that can only be used by other extensions
    • Internal contract including _internal modifier for functions only callable from other Extensions
    • InternalExtension contract which inherits Internal and Extension
    • Tests

Changed

  • _onlyOwner is now removed from PermissionStorage
  • onlyOwner modifiers now use CallerContexts and should be defined in your Extensions
  • Extendable no longer hardcodes permissioning and defers initial access control conditions to ExtendLogic implementations
  • Extendable now contains _beforeFallback and _afterFallback hooks to record callchain contexts.
  • ExtendLogic now initialises the owner permissioning upon first Extend
  • RetractLogic now uses _onlyOwnerOrSelf on retract
  • ExtendLogic now uses _onlyOwnerOrSelf on extend

v1.0.0

16 Feb 17:25
aed4003

Choose a tag to compare

Initial implementation release.
Beware, these contracts have not been audited and can be subject to bugs or vulnerabilities. Please use carefully.

Contains all contracts required to start building Extendable contracts.

  • Extendable.sol
  • Extension.sol
  • ExtendLogic extension
  • RetractLogic extension
  • ReplaceLogic extension
  • PermissioningLogic extension
  • Storage contracts