This commit is contained in:
Seroxdesign
2023-03-30 11:53:16 -04:00
parent db51cc450a
commit b5e4722cb5
2 changed files with 34 additions and 0 deletions

View File

@@ -56,4 +56,29 @@ export default [
payable: false,
type: 'function',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'owner',
type: 'address',
},
{
indexed: true,
internalType: 'address',
name: 'spender',
type: 'address',
},
{
indexed: false,
internalType: 'uint256',
name: 'value',
type: 'uint256',
},
],
name: 'Approval',
type: 'event',
},
];

View File

@@ -83,3 +83,12 @@ export const getMeTokenInfo = async (address: string) => {
info.collateral = collateral;
return info;
};
export const approveMeTokens = async (address: string) => {
const signer = await mainnetProvider.getSigner(
'0xc0163E58648b247c143023CFB26C2BAA42C9d9A9',
);
const erc20 = await new Contract(address, erc20Abi, signer);
return erc20;
};