Created
April 26, 2021 15:02
-
-
Save blakewest/c2952d7643fc7a164328c61cc844402b to your computer and use it in GitHub Desktop.
Solidity Blogpost #1: Config Contract, snippet 7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "./GoldfinchConfig.sol"; | |
import "./ConfigHelper.sol"; | |
contract CreditDesk { | |
GoldfinchConfig public config; | |
using ConfigHelper for config; | |
function drawdown(CreditLine creditLine, uint256 amount) public { | |
require(validCreditLine(creditLine), "invalid creditline!"); | |
require(msg.sender == creditLine.owner()) | |
config.getPool().sendFunds(amount, msg.sender); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment