Skip to content

Commit

Permalink
feat(gear-programs): Wrapped Vara (tokenizer) program extends VftServ…
Browse files Browse the repository at this point in the history
…ice (#129)
  • Loading branch information
vobradovich authored Nov 1, 2024
1 parent 131ff83 commit 2b8191a
Show file tree
Hide file tree
Showing 21 changed files with 1,468 additions and 2 deletions.
49 changes: 48 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@ members = [
"gear-programs/vft-treasury/app",
"gear-programs/vft-treasury/client",
"gear-programs/vft-client",
"gear-programs/vft-service",
"gear-programs/*",
"gear-programs/checkpoint-light-client/io",
"gear-programs/erc20-relay/app",
"gear-programs/erc20-relay/client",
"gear-programs/wrapped-vara",
"gear-programs/wrapped-vara/app",
"gear-programs/wrapped-vara/client",
"utils-prometheus",
"tools/deploy-to-gear",
"tools/genesis-config",
Expand Down Expand Up @@ -67,6 +71,11 @@ erc20-relay = { path = "gear-programs/erc20-relay" }
erc20-relay-app = { path = "gear-programs/erc20-relay/app" }
erc20-relay-client = { path = "gear-programs/erc20-relay/client" }

wrapped-vara = { path = "gear-programs/wrapped-vara" }
wrapped-vara-app = { path = "gear-programs/wrapped-vara/app" }
wrapped-vara-client = { path = "gear-programs/wrapped-vara/client" }
vft-service = { path = "gear-programs/vft-service" }

# Contracts' deps
extended_vft_wasm = { git = "https://github.com/gear-foundation/standards/", branch = "gstd-pinned-v1.5.0" }

Expand Down
2 changes: 1 addition & 1 deletion gear-programs/vft-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ git-download.workspace = true
sails-client-gen.workspace = true

[features]
mocks = ["sails-rs/mockall", "dep:mockall"]
mocks = ["sails-rs/mockall", "dep:mockall"]
33 changes: 33 additions & 0 deletions gear-programs/vft-client/extended_vft.idl
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
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 };
}
};
14 changes: 14 additions & 0 deletions gear-programs/vft-service/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[package]
name = "vft-service"
version.workspace = true
edition.workspace = true

[dependencies]
gstd.workspace = true
log = "*"
sails-rs.workspace = true

[dev-dependencies]
env_logger.workspace = true
gtest.workspace = true
gear-core.workspace = true
Loading

0 comments on commit 2b8191a

Please sign in to comment.