Skip to content

Instantly share code, notes, and snippets.

View max-blaushild's full-sized avatar

Max Blaushild max-blaushild

View GitHub Profile
@max-blaushild
max-blaushild / proxy-voting-method.sol
Created October 10, 2019 03:22
Proxy Voting Method
function voteAddresses(address[] memory issues) public auth returns (bytes32) {
lock();
return chief.vote(issues);
}
@max-blaushild
max-blaushild / ds-chief-voting.sol
Created October 10, 2019 03:21
DSChief Voting Method
function vote(address[] memory yays) public returns (bytes32)
// note both sub-calls note
{
bytes32 slate = etch(yays);
vote(slate);
return slate;
}
@max-blaushild
max-blaushild / modifier.sol
Created October 10, 2019 03:17
Authentication for proxy smart contracts
modifier auth() {
require(msg.sender == admin || msg.sender == fundDst, "Sender must be the fund destination or admin address");
_;
}
@max-blaushild
max-blaushild / edge-signal-proxy.sol
Last active October 10, 2019 03:13
Edgeware Signal Proxy Smart Contract
contract EdgewareSignalProxy {
address payable public fundDst;
address public fundSrc;
address public admin;
bytes public edgewareAddr;
Lockdrop public lockdrop;
constructor(
Lockdrop _lockdrop,
address _fundSrc,
@max-blaushild
max-blaushild / mkr-vote-proxy.sol
Created October 10, 2019 03:05
MKR Vote Proxy
constructor(DSChief _chief, address _cold, address _hot) public {
chief = _chief;
cold = _cold;
hot = _hot;
gov = chief.GOV();
iou = chief.IOU();
gov.approve(address(chief));
iou.approve(address(chief));
}