-
-
Save kamescg/05aba5af7acd3a1dcbb6b8bb75d1200e to your computer and use it in GitHub Desktop.
Encode Transaction and called MakerDAO DsProxyActions Contract
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
/* ------------------------ */ | |
// Call Vault Manager (DsProxyActions.sol) | |
/* ------------------------ */ | |
function callVaultManager (bytes memory _data) public payable { | |
IDSProxy proxy = IDSProxy(dss_proxy); | |
proxy.execute.value(msg.value)(vault_manager, _data); | |
} | |
function callVaultManager (uint256 _amount, bytes memory _data) public { | |
IDSProxy proxy = IDSProxy(dss_proxy); | |
proxy.execute.value(_amount)(vault_manager, _data); | |
} | |
// ETH Vault Functions | |
/* ------------------------ */ | |
function openETHVault( | |
uint wadD, | |
bytes32 ilk | |
) public payable { | |
GenerateCallData proxy = GenerateCallData(data_generation); | |
bytes memory data = proxy.openLockETHAndDraw( | |
dai_manager, | |
dai_jug, | |
dai_ethJoin, | |
dai_daiJoin, | |
ilk, | |
wadD | |
); | |
callVaultManager(data); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment