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

feat(gear-programs): Wrapped Vara (tokenizer) program extends VftService #129

Merged
merged 29 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
00bb47b
wip: vara tokenizer service
vobradovich Sep 9, 2024
4c0d0b2
wip: tokenizer methods
vobradovich Sep 9, 2024
c3b1aab
wip: vft-client, test
vobradovich Sep 10, 2024
04686c3
wip: static storage macro, admin service test
vobradovich Sep 10, 2024
8c17665
wip: vara tokenizer service
vobradovich Sep 9, 2024
f6e67aa
wip: tokenizer methods
vobradovich Sep 9, 2024
8dddd09
wip: vft-client, test
vobradovich Sep 10, 2024
5adbeda
wip: static storage macro, admin service test
vobradovich Sep 10, 2024
6aa86b8
Merge branch 'vo/vara-tokenizer' of github.com:gear-tech/gear-bridges…
vobradovich Sep 10, 2024
d3bd9b2
fix
vobradovich Sep 10, 2024
a0bb9a6
wip: mint_from_value_fails not working
vobradovich Sep 10, 2024
733a536
add gclient test
vobradovich Sep 13, 2024
0cd9c20
feat(gear-programs): Vara tokenizer program extends VftService
vobradovich Sep 16, 2024
034b2b3
fix clippy
vobradovich Sep 16, 2024
d1d463b
fix clipy
vobradovich Sep 16, 2024
8902c58
cleanup
vobradovich Sep 16, 2024
29db114
fix comments
vobradovich Sep 17, 2024
81e74d7
add sails issue link
vobradovich Sep 17, 2024
b7b3b28
expose vft service, not extend
vobradovich Sep 17, 2024
aefe4de
storage generic lifetime
vobradovich Sep 17, 2024
fd4112a
make workspace deps
vobradovich Sep 17, 2024
efd0b0c
remove admin service
vobradovich Sep 18, 2024
8878101
rename to wrapped-vara
vobradovich Sep 18, 2024
ea4985f
Merge branch 'main' into vo/vara-tokenizer-extend-vft
vobradovich Oct 17, 2024
1315c96
bump gear 1.6.2, sails 0.6.1, dep vft-service, update gtests
vobradovich Oct 17, 2024
67dbefb
fix toml
vobradovich Oct 17, 2024
ea27857
restore vft-service
vobradovich Nov 1, 2024
c6ea111
Merge branch 'main' into vo/vara-tokenizer-extend-vft
vobradovich Nov 1, 2024
ac62a4b
fix deps
vobradovich Nov 1, 2024
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
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
Loading