mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-04-24 03:00:09 -04:00
approve
This commit is contained in:
@@ -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',
|
||||
},
|
||||
];
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user