Skip to content

Commit 45318cf

Browse files
committed
Remove proposal from initializeAmmIx
1 parent 23b0ee1 commit 45318cf

5 files changed

Lines changed: 8 additions & 35 deletions

File tree

justfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
test:
2-
find programs tests futarchy-ts | entr -sc '(cd futarchy-ts && yarn build) && RUST_LOG= anchor test'
2+
find programs tests sdk | entr -sc '(cd sdk && yarn build) && RUST_LOG= anchor test'
33

44
test-no-build:
5-
find programs tests futarchy-ts | entr -sc '(cd futarchy-ts && yarn build) && RUST_LOG= anchor test --skip-build'
5+
find programs tests sdk | entr -sc '(cd sdk && yarn build) && RUST_LOG= anchor test --skip-build'
66

77
# build-verifiable autocrat_v0
88
build-verifiable PROGRAM_NAME:

sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metadaoproject/futarchy",
3-
"version": "0.3.0-alpha.1",
3+
"version": "0.3.0-alpha.2",
44
"main": "dist/index.js",
55
"types": "dist/index.d.ts",
66
"files": [

sdk/src/AmmClient.ts

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,7 @@ export class AmmClient {
102102
baseMint,
103103
quoteMint,
104104
twapFirstObservationScaled,
105-
twapMaxObservationChangePerUpdateScaled,
106-
proposal
105+
twapMaxObservationChangePerUpdateScaled
107106
).rpc();
108107

109108
return amm;
@@ -114,8 +113,7 @@ export class AmmClient {
114113
baseMint: PublicKey,
115114
quoteMint: PublicKey,
116115
twapInitialObservation: BN,
117-
twapMaxObservationChangePerUpdate: BN,
118-
proposal: PublicKey
116+
twapMaxObservationChangePerUpdate: BN
119117
): MethodsBuilder<AmmIDLType, any> {
120118
let [amm] = getAmmAddr(this.getProgramId(), baseMint, quoteMint);
121119
let [lpMint] = getAmmLpMintAddr(this.getProgramId(), amm);
@@ -139,29 +137,6 @@ export class AmmClient {
139137
});
140138
}
141139

142-
// async addLiquidity(
143-
// amm: PublicKey,
144-
// ) {
145-
// let storedAmm = await this.getAmm(amm);
146-
147-
// let ix = this.addLiquidityIx(
148-
// amm,
149-
// storedAmm.baseMint,
150-
// storedAmm.quoteMint,
151-
// maxBaseAmount instanceof BN ? maxBaseAmount : new BN(maxBaseAmount),
152-
// maxQuoteAmount instanceof BN ? maxQuoteAmount : new BN(maxQuoteAmount),
153-
// minBaseAmount instanceof BN ? minBaseAmount : new BN(minBaseAmount),
154-
// minQuoteAmount instanceof BN ? minQuoteAmount : new BN(minQuoteAmount),
155-
// user ? user.publicKey : undefined
156-
// );
157-
158-
// if (user) {
159-
// ix = ix.signers([user]);
160-
// }
161-
162-
// return ix.rpc();
163-
// }
164-
165140
async addLiquidity(
166141
amm: PublicKey,
167142
quoteAmount?: number,

sdk/src/AutocratClient.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,15 +289,13 @@ export class AutocratClient {
289289
passBaseMint,
290290
passQuoteMint,
291291
storedDao.twapInitialObservation,
292-
storedDao.twapMaxObservationChangePerUpdate,
293-
proposal
292+
storedDao.twapMaxObservationChangePerUpdate
294293
),
295294
this.ammClient.createAmmIx(
296295
failBaseMint,
297296
failQuoteMint,
298297
storedDao.twapInitialObservation,
299-
storedDao.twapMaxObservationChangePerUpdate,
300-
proposal
298+
storedDao.twapMaxObservationChangePerUpdate
301299
)
302300
)
303301
)

sdk/src/utils/priceMath.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class PriceMath {
1616
}
1717

1818
public static getHumanAmount(chainAmount: BN, decimals: number): number {
19-
return chainAmount.toNumber() / 10 ** decimals
19+
return chainAmount.toNumber() / 10 ** decimals;
2020
}
2121

2222
public static getHumanPrice(

0 commit comments

Comments
 (0)