Skip to content

Instantly share code, notes, and snippets.

@blakewest
Created April 26, 2021 15:02
Show Gist options
  • Save blakewest/c2952d7643fc7a164328c61cc844402b to your computer and use it in GitHub Desktop.
Save blakewest/c2952d7643fc7a164328c61cc844402b to your computer and use it in GitHub Desktop.
Solidity Blogpost #1: Config Contract, snippet 7
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