Skip to content

Commit

Permalink
Merge pull request #47 from 00labs/develop
Browse files Browse the repository at this point in the history
Prod deploy
  • Loading branch information
mliu authored Dec 24, 2024
2 parents 79286f0 + e5b51fa commit d99a337
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 42 deletions.
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@huma-finance/soroban-pool-storage": "^0.0.17",
"@huma-finance/soroban-sep41": "^0.0.17",
"@huma-finance/soroban-tranche-vault": "^0.0.17",
"@stellar/stellar-sdk": "^12.1.0",
"@stellar/stellar-sdk": "13.0.0",
"dotenv": "^16.0.3",
"ts-node": "^10.9.1",
"tslib": "^2.5.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/sdk/src/utils/common.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Address, nativeToScVal, SorobanRpc, xdr } from '@stellar/stellar-sdk'
import { Address, nativeToScVal, rpc, xdr } from '@stellar/stellar-sdk'
import {
StellarNetwork,
NetworkMetadatas,
Expand Down Expand Up @@ -69,7 +69,7 @@ export const findPoolMetadata = (network: StellarNetwork, poolName: string) => {
}

export const getLatestLedger = async (network: StellarNetwork) => {
const server = new SorobanRpc.Server(StellarPublicRpcUrl[network], {
const server = new rpc.Server(StellarPublicRpcUrl[network], {
allowHttp: true,
})
return server.getLatestLedger()
Expand Down
20 changes: 10 additions & 10 deletions packages/sdk/src/utils/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
BASE_FEE,
Contract,
Operation,
SorobanRpc,
rpc,
TransactionBuilder,
xdr,
} from '@stellar/stellar-sdk'
Expand All @@ -17,8 +17,8 @@ import {
} from './network'

const handlePendingTransaction = async (
sendResponse: SorobanRpc.Api.SendTransactionResponse,
server: SorobanRpc.Server,
sendResponse: rpc.Api.SendTransactionResponse,
server: rpc.Server,
) => {
if (sendResponse.status === 'PENDING') {
let getResponse = await server.getTransaction(sendResponse.hash)
Expand Down Expand Up @@ -48,7 +48,7 @@ export const simulateTransaction = async (
method: string,
params: xdr.ScVal[] = [],
) => {
const server = new SorobanRpc.Server(StellarPublicRpcUrl[network])
const server = new rpc.Server(StellarPublicRpcUrl[network])
const contract = new Contract(contractAddress)
const account = await server.getAccount(wallet.userInfo.publicKey)
const builtTransaction = new TransactionBuilder(account, {
Expand All @@ -65,12 +65,12 @@ export const simulateTransaction = async (
export const restoreTransaction = async (
wallet: StellarWallet,
network: StellarNetwork,
simResponse: SorobanRpc.Api.SimulateTransactionResponse,
simResponse: rpc.Api.SimulateTransactionResponse,
) => {
const server = new SorobanRpc.Server(StellarPublicRpcUrl[network])
const server = new rpc.Server(StellarPublicRpcUrl[network])
const account = await server.getAccount(wallet.userInfo.publicKey)

const restoreNeeded = SorobanRpc.Api.isSimulationRestore(simResponse)
const restoreNeeded = rpc.Api.isSimulationRestore(simResponse)
if (!restoreNeeded) {
return
}
Expand Down Expand Up @@ -98,12 +98,12 @@ export const restoreTransaction = async (
export const extendTTLTransaction = async (
wallet: StellarWallet,
network: StellarNetwork,
simResponse: SorobanRpc.Api.SimulateTransactionResponse,
simResponse: rpc.Api.SimulateTransactionResponse,
) => {
const server = new SorobanRpc.Server(StellarPublicRpcUrl[network])
const server = new rpc.Server(StellarPublicRpcUrl[network])
const account = await server.getAccount(wallet.userInfo.publicKey)

const restoreNeeded = SorobanRpc.Api.isSimulationRestore(simResponse)
const restoreNeeded = rpc.Api.isSimulationRestore(simResponse)
if (!restoreNeeded) {
return
}
Expand Down
31 changes: 2 additions & 29 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2245,20 +2245,6 @@
resolved "https://registry.yarnpkg.com/@stellar/js-xdr/-/js-xdr-3.1.2.tgz#db7611135cf21e989602fd72f513c3bed621bc74"
integrity sha512-VVolPL5goVEIsvuGqDc5uiKxV03lzfWdvYg1KikvwheDmTBO68CKDji3bAZ/kppZrx5iTA8z3Ld5yuytcvhvOQ==

"@stellar/stellar-base@^12.0.1":
version "12.1.1"
resolved "https://registry.yarnpkg.com/@stellar/stellar-base/-/stellar-base-12.1.1.tgz#16a07e74995725c544510be7086723c28300ed11"
integrity sha512-gOBSOFDepihslcInlqnxKZdIW9dMUO1tpOm3AtJR33K2OvpXG6SaVHCzAmCFArcCqI9zXTEiSoh70T48TmiHJA==
dependencies:
"@stellar/js-xdr" "^3.1.2"
base32.js "^0.1.0"
bignumber.js "^9.1.2"
buffer "^6.0.3"
sha.js "^2.3.6"
tweetnacl "^1.0.3"
optionalDependencies:
sodium-native "^4.1.1"

"@stellar/stellar-base@^13.0.1":
version "13.0.1"
resolved "https://registry.yarnpkg.com/@stellar/stellar-base/-/stellar-base-13.0.1.tgz#0897f77349ded61e838c0d55519f36f720efe3c9"
Expand Down Expand Up @@ -2287,19 +2273,6 @@
toml "^3.0.0"
urijs "^1.19.1"

"@stellar/stellar-sdk@^12.1.0":
version "12.1.0"
resolved "https://registry.npmjs.org/@stellar/stellar-sdk/-/stellar-sdk-12.1.0.tgz"
integrity sha512-Va0hu9SaPezmMbO5eMwL5D15Wrx1AGWRtxayUDRWV2Fr3ynY58mvCZS1vsgNQ4kE8MZe3nBVKv6T9Kzqwgx1PQ==
dependencies:
"@stellar/stellar-base" "^12.0.1"
axios "^1.7.2"
bignumber.js "^9.1.2"
eventsource "^2.0.2"
randombytes "^2.1.0"
toml "^3.0.0"
urijs "^1.19.1"

"@tootallnate/once@2":
version "2.0.0"
resolved "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz"
Expand Down Expand Up @@ -2993,7 +2966,7 @@ axe-core@^4.10.0:
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.10.2.tgz#85228e3e1d8b8532a27659b332e39b7fa0e022df"
integrity sha512-RE3mdQ7P3FRSe7eqCWoeQ/Z9QXrtniSjp1wUjt5nRC3WIpz5rSCve6o3fsZ2aCpJtrZjSZgjwXAoTO5k4tEI0w==

axios@^1.0.0, axios@^1.7.2, axios@^1.7.4, axios@^1.7.7:
axios@^1.0.0, axios@^1.7.4, axios@^1.7.7:
version "1.7.9"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.9.tgz#d7d071380c132a24accda1b2cfc1535b79ec650a"
integrity sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==
Expand Down Expand Up @@ -9174,7 +9147,7 @@ socks@^2.6.2, socks@^2.8.3:
ip-address "^9.0.5"
smart-buffer "^4.2.0"

sodium-native@^4.1.1, sodium-native@^4.3.0:
sodium-native@^4.3.0:
version "4.3.1"
resolved "https://registry.yarnpkg.com/sodium-native/-/sodium-native-4.3.1.tgz#221a11b10876259b85ccd288dd28f07ed4dbf35f"
integrity sha512-YdP64gAdpIKHfL4ttuX4aIfjeunh9f+hNeQJpE9C8UMndB3zkgZ7YmmGT4J2+v6Ibyp6Wem8D1TcSrtdW0bqtg==
Expand Down

0 comments on commit d99a337

Please sign in to comment.