mirror of
https://github.com/Instadapp/dsa-connectors-old.git
synced 2024-07-29 22:47:46 +00:00
Updated connectorID
This commit is contained in:
parent
b128ee663c
commit
feafe9ccbf
|
@ -4,6 +4,7 @@ interface CHIInterface {
|
|||
function mint(uint256 value) external;
|
||||
function free(uint256 value) external returns (uint256);
|
||||
function balanceOf(address) external view returns (uint);
|
||||
function approve(address, uint256) external;
|
||||
}
|
||||
|
||||
contract ChiHelpers {
|
||||
|
@ -13,6 +14,13 @@ contract ChiHelpers {
|
|||
function getCHIAddress() internal pure returns (address) {
|
||||
return 0x0000000000004946c0e9F43F4Dee607b0eF1fA1c;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Connector Details.
|
||||
*/
|
||||
function connectorID() public view returns(uint model, uint id) {
|
||||
(model, id) = (1, 36);
|
||||
}
|
||||
}
|
||||
|
||||
contract ChiResolver is ChiHelpers {
|
||||
|
@ -33,7 +41,7 @@ contract ChiResolver is ChiHelpers {
|
|||
function burn(uint amt) public payable {
|
||||
CHIInterface chiToken = CHIInterface(getCHIAddress());
|
||||
uint _amt = amt == uint(-1) ? chiToken.balanceOf(address(this)) : amt;
|
||||
|
||||
chiToken.approve(address(chiToken), _amt);
|
||||
chiToken.free(_amt);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user