Created
January 11, 2019 00:58
-
-
Save coburncoburn/7895f0a175a0b7e9656c03d6500b426e to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.2+commit.1df8f40c.js&optimize=false&gist=
This file contains 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
contract SupplyPolicyHook { | |
struct SupplyLocalVars { | |
uint startingBalance; | |
uint newSupplyIndex; | |
uint userSupplyCurrent; | |
uint userSupplyUpdated; | |
uint newTotalSupply; | |
uint currentCash; | |
uint updatedCash; | |
uint newSupplyRateMantissa; | |
uint newBorrowIndex; | |
uint newBorrowRateMantissa; | |
} | |
function verify() public {} | |
function verifyWithInputs(address sender, address asset, uint amount) public {} | |
function verifyWithLocalResults( | |
address sender, | |
address asset, | |
uint amount, | |
uint startingBalance, | |
uint newSupplyIndex, | |
uint userSupplyCurrent, | |
uint userSupplyUpdated, | |
uint newTotalSupply, | |
uint currentCash, | |
uint updatedCash, | |
uint newSupplyRateMantissa, | |
uint newBorrowIndex, | |
uint newBorrowRateMantissa) public {} | |
} | |
contract SimpleTest { | |
SupplyPolicyHook public hook; | |
constructor() public { | |
hook = new SupplyPolicyHook(); | |
} | |
function verify() public { | |
hook.verify(); | |
} | |
function verifyWithInputs() public { | |
hook.verifyWithInputs(msg.sender, address(0xABCDE), 1); | |
} | |
function verifyWithLocalResults() public { | |
hook.verifyWithLocalResults(msg.sender, address(0xABCDE), 1,2,3,4,5,5,6,7,8,9,0); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment