diff --git a/clarity/contracts/aip-29-usda-burn.clar b/clarity/contracts/aip-29-usda-burn.clar new file mode 100644 index 000000000..ff69c740d --- /dev/null +++ b/clarity/contracts/aip-29-usda-burn.clar @@ -0,0 +1,11 @@ +;; A governance vote to decide the following has been put in place: +;; Burn excess ~700k USDA from 2021 + +;; Back in 2021, due to an oracle failure, an excess amount of USDA had been minted +;; Over time, we burned some of this USDA using revenue (stability fees), but not all. +;; We now accumulated a sufficient amount of USDA (the remaining ~700k), +;; and pending a successful governance vote, we will burn the leftover excess USDA, +;; forever taking it out of circulation + +;; Vote FOR if you agree +;; Vote AGAINST if you disagree diff --git a/scripts/burn-usda.js b/scripts/burn-usda.js index dac676c04..d561dc9b0 100644 --- a/scripts/burn-usda.js +++ b/scripts/burn-usda.js @@ -3,23 +3,23 @@ const CONTRACT_ADDRESS = process.env.CONTRACT_ADDRESS; const tx = require('@stacks/transactions'); const utils = require('./utils'); const network = utils.resolveNetwork(); -const BN = require('bn.js'); +// https://explorer.hiro.so/txid/SP2C2YFP12AJZB4MABJBAJ55XECVS7E4PMMZ89YZR.arkadiko-usda-burner?chain=mainnet async function transact() { const txOptions = { contractAddress: CONTRACT_ADDRESS, contractName: 'arkadiko-usda-burner', functionName: 'burn-usda', - functionArgs: [tx.uintCV(10000000000)], - nonce: new BN(725, 10), + functionArgs: [tx.uintCV(300000 * 1000000)], + fee: 1000, senderKey: process.env.STACKS_PRIVATE_KEY, postConditionMode: 1, - network + network: 'mainnet' }; const transaction = await tx.makeContractCall(txOptions); - const result = tx.broadcastTransaction(transaction, network); - await utils.processing(result, transaction.txid(), 0); + const result = await tx.broadcastTransaction({ transaction: transaction }); + console.log(result); }; transact(); diff --git a/scripts/governance-add-proposal.js b/scripts/governance-add-proposal.js index 92c7fefc8..81e8ee99e 100644 --- a/scripts/governance-add-proposal.js +++ b/scripts/governance-add-proposal.js @@ -4,7 +4,6 @@ const CONTRACT_ADDRESS = process.env.CONTRACT_ADDRESS; const tx = require('@stacks/transactions'); const utils = require('./utils'); const network = utils.resolveNetwork(); -const BN = require('bn.js'); async function transact() { const txOptions = { @@ -13,28 +12,28 @@ async function transact() { functionName: 'propose', functionArgs: [ tx.contractPrincipalCV(CONTRACT_ADDRESS, 'arkadiko-stake-pool-diko-v2-1'), - tx.uintCV(867270), + tx.uintCV(904919), tx.uintCV(1008), - tx.stringUtf8CV('AIP 25 - Update DIKO Emissions'), - tx.stringUtf8CV('https://github.com/arkadiko-dao/arkadiko/pull/599'), + tx.stringUtf8CV('AIP 29 - Excess USDA burn'), + tx.stringUtf8CV('https://github.com/arkadiko-dao/arkadiko/pull/610'), tx.listCV([ tx.tupleCV({ - 'name': tx.stringAsciiCV("aip-25-diko-emissions"), + 'name': tx.stringAsciiCV("aip-29-usda-burn"), 'address': tx.standardPrincipalCV("SP2C2YFP12AJZB4MABJBAJ55XECVS7E4PMMZ89YZR"), - 'qualified-name': tx.contractPrincipalCV("SP2C2YFP12AJZB4MABJBAJ55XECVS7E4PMMZ89YZR", "aip-25-arkadiko-governance-emissions"), + 'qualified-name': tx.contractPrincipalCV("SP2C2YFP12AJZB4MABJBAJ55XECVS7E4PMMZ89YZR", "aip-29-usda-burn"), 'can-mint': tx.falseCV(), 'can-burn': tx.falseCV() }), ]) ], senderKey: process.env.STACKS_PRIVATE_KEY, - fee: new BN(100000, 10), + fee: 10000, postConditionMode: 1, - network + network: 'mainnet' }; const transaction = await tx.makeContractCall(txOptions); - const result = tx.broadcastTransaction(transaction, network); + const result = tx.broadcastTransaction({ transaction: transaction }); await utils.processing(result, transaction.txid(), 0); }; diff --git a/scripts/send-vested-diko.js b/scripts/send-vested-diko.js index 62a89e714..9e7302b15 100644 --- a/scripts/send-vested-diko.js +++ b/scripts/send-vested-diko.js @@ -6,6 +6,8 @@ const network = utils.resolveNetwork(); const BN = require('bn.js'); async function sendDiko(address, amount, nonce) { + if (Number(amount) <= 0) return; + const txOptions = { contractAddress: CONTRACT_ADDRESS, contractName: "arkadiko-token", @@ -23,11 +25,11 @@ async function sendDiko(address, amount, nonce) { }; const transaction = await tx.makeContractCall(txOptions); - const result = tx.broadcastTransaction({ transaction: transaction }); + const result = await tx.broadcastTransaction({ transaction: transaction }); console.log(result); } -let nonce = 4582; +let nonce = 4636; const tokens = { 'SP3TF26QFS3YMYHC9N3ZZTZQKCM4AFYMVW1WMFRTT': 44270833333, 'SPF6GBC7XRM16XE7GSNF87GSYS703XZHFHRM1XYR': 3750000000, @@ -41,7 +43,6 @@ const tokens = { 'SP3K0R9VYW9M6W6KH7TRR1C9P9GZ6KYCEQ0N4CKV2': 7500000000, 'SP1WHCEF60XCC1K5W0B6FDRE5305KXXSHC4D07BK7': 3750000000, 'SP1BPVZMP3SY6D7EHJR6KNMZK4NMWKD2F0QASMD1M': 3750000000, - 'SP1THSVCQSKRCGTNYYKYS58054N2K0MV5D5X09MBP': 18750000000, 'SP11GRR545WY4MH6X43V2GRF253NM8R26J1D3H4RS': 7500000000, 'SP33S9FRE8MK0EK77ZBWTJP9WF0DRQCHF8VHZRY8J': 3750000000, 'SP1CE3NQXDKCJ2KEFFGCVFA5C196S9F0RRX93HY87': 1500000000, diff --git a/web/components/view-proposal.tsx b/web/components/view-proposal.tsx index 5b1104458..5bdc6f822 100644 --- a/web/components/view-proposal.tsx +++ b/web/components/view-proposal.tsx @@ -3,7 +3,8 @@ import { Modal } from '@blockstack/ui'; import { Container } from './home'; import { fetchCallReadOnlyFunction, - Cl + Cl, + cvToJSON } from '@stacks/transactions'; import { stacksNetwork as network } from '@common/utils'; import { useSTXAddress } from '@common/use-stx-address';