Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Varatube: add sails #492

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions frontend/apps/varatube/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ import { Footer } from '@dapps-frontend/ui';
import { Routing } from 'pages';
import { Header, ApiLoader } from 'components';
import { withProviders } from 'hocs';
import { useProgramState } from 'hooks/api';
import 'simplebar-react/dist/simplebar.min.css';
import 'App.scss';
import '@gear-js/vara-ui/dist/style.css';
import { useGetSubscriberQuery } from 'app/utils';

function Component() {
const { isApiReady } = useApi();
const { isAccountReady } = useAccount();
const { isSubscriptionsStateRead } = useProgramState();
const { isFetched } = useGetSubscriberQuery();

const isAppReady = isApiReady && isAccountReady && isSubscriptionsStateRead;
const isAppReady = isApiReady && isAccountReady && isFetched;

return (
<>
Expand Down
1 change: 1 addition & 0 deletions frontend/apps/varatube/src/app/utils/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './sails';
34 changes: 34 additions & 0 deletions frontend/apps/varatube/src/app/utils/sails/extended_vft.idl
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
constructor {
New : (name: str, symbol: str, decimals: u8);
};

service Vft {
Burn : (from: actor_id, value: u256) -> bool;
GrantAdminRole : (to: actor_id) -> null;
GrantBurnerRole : (to: actor_id) -> null;
GrantMinterRole : (to: actor_id) -> null;
Mint : (to: actor_id, value: u256) -> bool;
RevokeAdminRole : (from: actor_id) -> null;
RevokeBurnerRole : (from: actor_id) -> null;
RevokeMinterRole : (from: actor_id) -> null;
Approve : (spender: actor_id, value: u256) -> bool;
Transfer : (to: actor_id, value: u256) -> bool;
TransferFrom : (from: actor_id, to: actor_id, value: u256) -> bool;
query Admins : () -> vec actor_id;
query Burners : () -> vec actor_id;
query Minters : () -> vec actor_id;
query Allowance : (owner: actor_id, spender: actor_id) -> u256;
query BalanceOf : (account: actor_id) -> u256;
query Decimals : () -> u8;
query Name : () -> str;
query Symbol : () -> str;
query TotalSupply : () -> u256;

events {
Minted: struct { to: actor_id, value: u256 };
Burned: struct { from: actor_id, value: u256 };
Approval: struct { owner: actor_id, spender: actor_id, value: u256 };
Transfer: struct { from: actor_id, to: actor_id, value: u256 };
}
};

Loading
Loading