Skip to content

Commit

Permalink
Create new WiserSWap admin treasury.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ava's DAO committed Jan 1, 2024
1 parent f112ea1 commit 1785391
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion watchtower/daemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ const sleep = ms => new Promise(r => setTimeout(r, ms))
console.log('Starting Exchange Manager...')

const IS_LIVE_BROADCAST = false
const ACTIVE_ACCOUNT_IDX = 1
const ACTIVE_ACCOUNT_IDX = 4
// 0 - nexa:nqtsq5g54ckrh9kdwq66ulfnm44mk9h838y9lc0j9pfu3lj0 (master)
// 1 - nexa:nqtsq5g5ku8at5c7uv8e56jahwf20vkn3t4zvp3yv667qs37 (minting)
// 2 - nexa:nqtsq5g5p52r529qhawqut0zua5t227kk5c07nay74fs2wux (melting)
// 3 - nexa:nqtsq5g5shvtv8820c2hrnadgjldjcldljrwethcl85scpxk (persona)
// 4 - nexa:nqtsq5g5gh6mn4qa6u33g8mjr3e8w9wxjrldhw7kvymc38lp (WiserSwap)

;(async () => {
/* Initialize locals. */
Expand Down
5 changes: 4 additions & 1 deletion wiser/pages/pools.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ useHead({
import { useSystemStore } from '@/stores/system'
const System = useSystemStore()
const runtimeConfig = useRuntimeConfig()
const apiEndpoint = runtimeConfig.public.API_ENDPOINT
const SATOSHIS_PER_NEXA = 100
const pools = ref(null)
const init = async () => {
pools.value = await $fetch('/api/pools')
pools.value = await $fetch(`${apiEndpoint}/pools`)
.catch(err => console.error(err))
console.log('POOLS', pools.value)
}
Expand Down
6 changes: 4 additions & 2 deletions wiser/stores/amm/swap_v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ const Wallet = useWalletStore()
/* Set constants. */
const STUDIO_ID_HEX = '9732745682001b06e332b6a4a0dd0fffc4837c707567f8cbfe0f6a9b12080000'
const WISERSWAP_HEX = '6c6c6c6c6c6c6c5779009c63c076cd01217f517f7c817f775279c701217f517f7c817f77537a7b888876c678c7517f7c76010087636d00677f77517f7c76010087636d00677f758168689578cc7bcd517f7c76010087636d00677f77517f7c76010087636d00677f758168686e95537aa269c4c353939d02220202102752535a79547aa403005114597a7e56795a7a95557996765379a4c4557a9476cd547a88cca16903005114577a7e5679587a95557a9676547aa4c4557a9476cd547a88cca16972965479009e63765579a169685579009e63765679a269686d6d6d7567577a519d5779827758797ea988577a577aad6d6d6d68'
const ADMIN_PKH = '00511445f5b9d41dd723141f721c727715c690fedbbbd6'
const ADMIN_FEE = '0100' // 256 or 2.56% (FIXME: This is bug limit.)

let secp256k1

Expand Down Expand Up @@ -113,7 +115,7 @@ export default async (
scriptPubKey = new Uint8Array([
OP.ZERO,
OP.ONE,
...encodeDataPush(adminPkh),
...encodeDataPush(ADMIN_PKH),
])
// console.info('\n Script Public Key:', binToHex(scriptPubKey))

Expand All @@ -125,7 +127,7 @@ export default async (
)

/* Set exchange admin fee. */
adminFee = _scriptArgs?.adminFee.toString(16)
adminFee = ADMIN_FEE.toString(16)
if (adminFee.length % 2 === 1) {
adminFee = '0' + adminFee
}
Expand Down

0 comments on commit 1785391

Please sign in to comment.