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

Token vesting #48

Merged
merged 24 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
40ff18b
Include TokenVesting contract.
jgimeno Jun 20, 2023
837c33b
update dependencies
jgimeno Jun 20, 2023
2672d63
some refactor
jgimeno Jun 20, 2023
8f325db
some refactor for block time
jgimeno Jun 20, 2023
4fb2052
dont need to clone
jgimeno Jun 21, 2023
08ee933
add new vesting option
jgimeno Jun 21, 2023
ac656e5
remove periodic vesting option
jgimeno Jun 21, 2023
1ccab49
add linear vesting with cliff
jgimeno Jun 21, 2023
4ea6fcd
now works, starting point
jgimeno Jun 21, 2023
1f77b82
refactor times to Uint64, half baked
jgimeno Jun 21, 2023
11a0a5c
refactor times to Uint64 done
jgimeno Jun 21, 2023
3b63ff0
add linear vesting with cliff
jgimeno Jun 21, 2023
f424ccb
refactor: Refactor token vesting contract and dependencies
jgimeno Jun 22, 2023
5baf2bb
Refactor codebase for improved performance
jgimeno Jun 22, 2023
fe070d8
chore: Remove license field from Cargo.toml
jgimeno Jun 23, 2023
2d534b9
refactor: Refactor and update code, schemas, and artifacts
jgimeno Jun 26, 2023
e03ee8a
feat: Refactor token vesting tests and validation
jgimeno Jun 27, 2023
7ee72eb
feat: Improve validation checks for token vesting contracts
jgimeno Jun 27, 2023
f1523b4
fix: Fix assertion errors in token-vesting contract
jgimeno Jun 27, 2023
2c96931
Merge branch 'main' into token-vesting
Unique-Divine Jul 19, 2023
f83550f
epic(contracts): token vesting first version
Unique-Divine Jul 20, 2023
a8c4320
(token-vesting): fn docs + move validation to type impl statements
Unique-Divine Jul 20, 2023
098962f
.editorconfig + DRY improvements + docs
Unique-Divine Jul 20, 2023
2e2a4d9
refactor: simply msg send construction
Unique-Divine Jul 24, 2023
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
23 changes: 23 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false
indent_style = space
indent_size = 4
max_line_length = 81

[*.md]
# double whitespace at end of line
# denotes a line break in Markdown
trim_trailing_whitespace = false
indent_size = 2

[*.yml]
indent_size = 2
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ node_modules/
yarn.lock
.vscode/

lcov.info
contracts/*/.editorconfig
packages/*/.editorconfig
lcov.info
15 changes: 15 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions artifacts/checksums.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ b73b0a03fe8a4bbb547b1219c8d16db72978567261e17a8891995357b4c8de51 bindings_perp.
e9834b1d66fbd389e1c1f77f6c5ae7e9151ce6adc2d56e5aa818d2171a637c83 lockup.wasm
87c8b35253b4593bd70769685a2f5a36ed25f6c73f17fbeea9be4736227a78fd pricefeed.wasm
0456beb3865a56e45cca30199243b5c00df5e5d8704bb02250451d97c31aa08c shifter.wasm
ee6c3581365d7d0040bc95ecfb42c1b733569536a32b446b7898502aafcf8c1b token_vesting.wasm
1 change: 1 addition & 0 deletions artifacts/checksums_intermediate.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ c3ebe629a7fb6cd41e88c6a77fb2076001c992d823240415f9cda2744023dda6 target/wasm32-
f09ca83af90096f8773f48bbde73dcf8f509dc1da84a9243d1c7dba125c5c9f9 target/wasm32-unknown-unknown/release/pricefeed.wasm
ee8c29604ce82d0c3046c445998f3b6862f09e7eae0afe922bbf6b624e971b14 target/wasm32-unknown-unknown/release/shifter.wasm
e74d712db4d582678edf6d04d700d85c2444087ca9a03b0a90c49a78304ad039 target/wasm32-unknown-unknown/release/bindings_perp.wasm
8d435cd6cb82e2a27981f468977fdb4aab003f31d01ba3aa47485251a4aadba5 target/wasm32-unknown-unknown/release/token_vesting.wasm
Binary file added artifacts/token_vesting.wasm
Binary file not shown.
7 changes: 7 additions & 0 deletions contracts/token-vesting/.cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[alias]
wasm = "build --release --target wasm32-unknown-unknown"
wasm-debug = "build --target wasm32-unknown-unknown"
unit-test = "test --lib"
integration-test = "test --test integration"
schema = "run --example schema"

12 changes: 12 additions & 0 deletions contracts/token-vesting/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Build results
/target

# Text file backups
**/*.rs.bk

# macOS
.DS_Store

# IDEs
*.iml
.idea
264 changes: 264 additions & 0 deletions contracts/token-vesting/Cargo.lock

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

32 changes: 32 additions & 0 deletions contracts/token-vesting/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[package]
name = "token-vesting"
version = "0.1.0"
edition = "2021"
description = "Provide various token vesting feature"

exclude = [
# Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication.
"contract.wasm",
"hash.txt",
]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
crate-type = ["cdylib", "rlib"]

[features]
# for quicker tests, cargo test --lib
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]

[dependencies]
cosmwasm-schema = "1.2.7"
cosmwasm-std = "1.2.7"
cw20 = "1.0.1"
cw-utils = { version = "1.0.1" }
thiserror = { version = "1.0.23" }
cw-storage-plus = "1.0.1"
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
Loading
Loading