Skip to content

Instantly share code, notes, and snippets.

@lucas-manuel
Created November 10, 2021 20:57
Show Gist options
  • Save lucas-manuel/3d0e9289f18e5499b027db3732a704f1 to your computer and use it in GitHub Desktop.
Save lucas-manuel/3d0e9289f18e5499b027db3732a704f1 to your computer and use it in GitHub Desktop.
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity ^0.8.7;
import { MapleBorrowerInternals } from "./MapleBorrowerInternals.sol";
/// @title MapleBorrowerInitializer is intended to initialize the storage of a MapleBorrower proxy.
contract MapleBorrowerInitializer is MapleBorrowerInternals {
function encodeArguments(address owner_) external pure returns (bytes memory encodedArguments_) {
return abi.encode(owner_);
}
function decodeArguments(bytes calldata encodedArguments_) public pure returns (address owner_) {
( owner_ ) = abi.decode(encodedArguments_, (address));
}
fallback() external {
( _owner ) = decodeArguments(msg.data);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment