Skip to content

Commit

Permalink
fix: audit (#110)
Browse files Browse the repository at this point in the history
* fix get spot price function to use decimal with truncation

* change token_id assert to check : not ::

* rename test function

* add test functionsg

* fix dex get spot price to be more accurate

* update gas meter

* update gas used for the error case too

* fix unittest
  • Loading branch information
beer-1 authored Aug 23, 2024
1 parent 432c396 commit a888a5d
Show file tree
Hide file tree
Showing 27 changed files with 207 additions and 406 deletions.
42 changes: 21 additions & 21 deletions Cargo.toml
Binary file modified api/libcompiler.dylib
Binary file not shown.
Binary file modified api/libmovevm.dylib
Binary file not shown.
2 changes: 1 addition & 1 deletion crates/compiler/src/lib.rs
347 changes: 0 additions & 347 deletions crates/compiler/src/test_gas_meter.rs

This file was deleted.

13 changes: 6 additions & 7 deletions crates/compiler/src/test_package.rs
82 changes: 82 additions & 0 deletions crates/compiler/src/unit_test_factory.rs
19 changes: 11 additions & 8 deletions crates/e2e-move-tests/src/tests/move_unit.rs
30 changes: 30 additions & 0 deletions crates/natives/src/query.rs
Binary file modified precompile/binaries/minlib/collection.mv
Binary file not shown.
Binary file modified precompile/binaries/minlib/dex.mv
Binary file not shown.
Binary file modified precompile/binaries/minlib/nft.mv
Binary file not shown.
Binary file modified precompile/binaries/stdlib/collection.mv
Binary file not shown.
Binary file modified precompile/binaries/stdlib/dex.mv
Binary file not shown.
Binary file modified precompile/binaries/stdlib/nft.mv
Binary file not shown.
6 changes: 3 additions & 3 deletions precompile/modules/initia_stdlib/sources/coin.move
12 changes: 8 additions & 4 deletions precompile/modules/initia_stdlib/sources/dex.move
4 changes: 2 additions & 2 deletions precompile/modules/initia_stdlib/sources/json.move
13 changes: 13 additions & 0 deletions precompile/modules/initia_stdlib/sources/query.move
2 changes: 1 addition & 1 deletion precompile/modules/initia_stdlib/sources/token/nft.move
6 changes: 3 additions & 3 deletions precompile/modules/minitia_stdlib/sources/coin.move
12 changes: 8 additions & 4 deletions precompile/modules/minitia_stdlib/sources/dex.move
4 changes: 2 additions & 2 deletions precompile/modules/minitia_stdlib/sources/json.move
13 changes: 13 additions & 0 deletions precompile/modules/minitia_stdlib/sources/query.move
2 changes: 1 addition & 1 deletion precompile/modules/minitia_stdlib/sources/token/nft.move

0 comments on commit a888a5d

Please sign in to comment.