min stake from backend (#78)
resolves #74 Co-authored-by: johba <johba@harb.eth> Reviewed-on: https://codeberg.org/johba/harb/pulls/78
This commit is contained in:
parent
0b3545091f
commit
bd475c2271
11 changed files with 1176 additions and 1977 deletions
|
|
@ -61,31 +61,6 @@ export async function getAllowance() {
|
|||
return result;
|
||||
}
|
||||
|
||||
export async function getMinStake() {
|
||||
logger.contract('getMinStake');
|
||||
|
||||
const publicClient = getWalletPublicClient();
|
||||
if (publicClient) {
|
||||
const result = (await publicClient.readContract({
|
||||
abi: HarbContract.abi,
|
||||
address: HarbContract.contractAddress,
|
||||
functionName: 'minStake',
|
||||
args: [],
|
||||
})) as bigint;
|
||||
allowance.value = result;
|
||||
return result;
|
||||
}
|
||||
|
||||
const result: bigint = (await readContract(config as Config, {
|
||||
abi: HarbContract.abi,
|
||||
address: HarbContract.contractAddress,
|
||||
functionName: 'minStake',
|
||||
args: [],
|
||||
})) as bigint;
|
||||
allowance.value = result;
|
||||
return result;
|
||||
}
|
||||
|
||||
export async function getNonce() {
|
||||
logger.contract('getNonce');
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ interface Contract {
|
|||
contractAddress: Address;
|
||||
}
|
||||
|
||||
export const minStake = ref();
|
||||
export const minStake = ref<bigint>(0n);
|
||||
export const totalSupply = ref(0n);
|
||||
export const outstandingSupply = ref(0n);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue