mirror of
https://github.com/Instadapp/dsa-connectors-old.git
synced 2024-07-29 22:47:46 +00:00
renamed ERC20 contracts and updated readme
This commit is contained in:
parent
6464676a93
commit
b7f16e6c86
|
@ -1,6 +1,6 @@
|
||||||
# DSA Connectors
|
# DSA Connectors
|
||||||
|
|
||||||
Connectors are standard modules that let DeFi Smart Account interact with various smart contracts, and make the important actions accessible.
|
Connectors are standard modules that let DeFi Smart Account interact with various smart contracts, and make the important actions accessible like cross protocol interoperability.
|
||||||
|
|
||||||
## Add Custom Connectors
|
## Add Custom Connectors
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
pragma solidity ^0.6.0;
|
pragma solidity ^0.6.0;
|
||||||
|
|
||||||
interface TokenInterface {
|
interface ERC20 {
|
||||||
function approve(address, uint) external;
|
function approve(address, uint) external;
|
||||||
function transfer(address, uint) external;
|
function transfer(address, uint) external;
|
||||||
function transferFrom(address, address, uint) external;
|
function transferFrom(address, address, uint) external;
|
||||||
function deposit() external payable;
|
function deposit() external payable;
|
||||||
function withdraw(uint) external;
|
function withdraw(uint) external;
|
||||||
function balanceOf(address) external view returns (uint);
|
function balanceOf(address) external view returns (uint);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
pragma solidity ^0.6.0;
|
pragma solidity ^0.6.0;
|
||||||
|
|
||||||
// import files from common directory
|
// import files from common directory
|
||||||
import "../common/interfaces.sol";
|
import { ERC20 } from "../common/ERC20.sol";
|
||||||
import { Stores } from "../common/stores.sol";
|
import { Stores } from "../common/stores.sol";
|
||||||
import { DSMath } from "../common/math.sol";
|
import { DSMath } from "../common/math.sol";
|
||||||
|
|
||||||
|
@ -12,6 +12,8 @@ contract MockProtocol is Stores, DSMath {
|
||||||
// added two additional parameter (getId & setId) for external public facing functions
|
// added two additional parameter (getId & setId) for external public facing functions
|
||||||
function mockFunction(uint mockNumber, uint getId, uint setId) external payable {
|
function mockFunction(uint mockNumber, uint getId, uint setId) external payable {
|
||||||
|
|
||||||
|
// protocol specific logics goes here
|
||||||
|
|
||||||
// fetch value of specific id
|
// fetch value of specific id
|
||||||
uint mockBalance = getUint(getId, mockNumber);
|
uint mockBalance = getUint(getId, mockNumber);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user