Skip to content

Commit

Permalink
Merge pull request #285 from invariant-labs/fee-growth-to-u256
Browse files Browse the repository at this point in the history
update decimal and fee growth type to u256
  • Loading branch information
none00y authored Sep 18, 2024
2 parents b187a8c + b280ea6 commit bb81980
Show file tree
Hide file tree
Showing 77 changed files with 4,107 additions and 2,960 deletions.
4 changes: 4 additions & 0 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ ink = { version = "5.0.0", default-features = false }
token = { path = "src/token", default-features = false, features = [
"ink-as-dependency",
] }
scale-info = { version = "2.11.3", default-features = false }

[dev-dependencies]
ink_e2e = "5.0.0"
Expand All @@ -25,7 +26,7 @@ path = "src/lib.rs"

[features]
default = ["std"]
std = ["ink/std", "token/std"]
std = ["ink/std", "token/std", "decimal/std"]
ink-as-dependency = []
e2e-tests = []

Expand Down
3 changes: 1 addition & 2 deletions scripts/src/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const main = async () => {
console.log('Successfully added fee tiers')

const BTCAddress = await PSP22.deploy(api, account, 0n, 'Bitcoin', 'BTC', 8n)
const ETHAddress = await PSP22.deploy(api, account, 0n, 'Ether', 'ETH', 12n)
const ETHAddress = await PSP22.deploy(api, account, 0n, 'Ether', 'ETH', 18n)
const USDCAddress = await PSP22.deploy(api, account, 0n, 'USDC', 'USDC', 6n)
const USDTAddress = await PSP22.deploy(api, account, 0n, 'Tether USD', 'USDT', 6n)
const SOLAddress = await PSP22.deploy(api, account, 0n, 'Solana', 'SOL', 9n)
Expand Down Expand Up @@ -97,7 +97,6 @@ const main = async () => {
10 ** 24
try {
const poolSqrtPrice = priceToSqrtPrice(BigInt(Math.round(price)))
console.log(poolKey)
await invariant.createPool(account, poolKey, poolSqrtPrice)
} catch (e) {
console.log('Create pool error', poolKey, e)
Expand Down
Loading

0 comments on commit bb81980

Please sign in to comment.