mirror of
https://github.com/Brotocol-xyz/bro-sdk.git
synced 2026-01-12 14:54:21 +08:00
feat: upgrade btc-peg-in-endpoint-v2-03 > btc-peg-in-endpoint-v2-04
This commit is contained in:
@@ -14,8 +14,8 @@ stringAsciiT,
|
||||
noneT
|
||||
} from "../smartContractHelpers/codegenImport"
|
||||
|
||||
export const btcPegInEndpointV203 = defineContract({
|
||||
"btc-peg-in-endpoint-v2-03": {
|
||||
export const btcPegInEndpointV204 = defineContract({
|
||||
"btc-peg-in-endpoint-v2-04": {
|
||||
callback: {
|
||||
input: [
|
||||
{ name: 'sender', type: principalT },
|
||||
@@ -1,11 +1,11 @@
|
||||
import { defineContract } from "../smartContractHelpers/codegenImport";
|
||||
import { btcPegInEndpointV203 } from "./contract_xlink_btc-peg-in-endpoint-v2-03"
|
||||
import { btcPegInEndpointV204 } from "./contract_xlink_btc-peg-in-endpoint-v2-04"
|
||||
import { btcPegOutEndpointV201 } from "./contract_xlink_btc-peg-out-endpoint-v2-01"
|
||||
import { crossPegInEndpointV203 } from "./contract_xlink_cross-peg-in-endpoint-v2-03"
|
||||
import { crossPegOutEndpointV201 } from "./contract_xlink_cross-peg-out-endpoint-v2-01"
|
||||
|
||||
export const xlinkContracts = defineContract({
|
||||
...btcPegInEndpointV203,
|
||||
...btcPegInEndpointV204,
|
||||
...btcPegOutEndpointV201,
|
||||
...crossPegInEndpointV203,
|
||||
...crossPegOutEndpointV201
|
||||
|
||||
@@ -7,7 +7,7 @@ import { xlinkContractsDeployerTestnet } from "../src/stacksUtils/stxContractAdd
|
||||
process.env.STACKS_CORE_API_URL ?? STACKS_TESTNET.coreApiUrl,
|
||||
xlinkContractsDeployerTestnet,
|
||||
[
|
||||
"btc-peg-in-endpoint-v2-03",
|
||||
"btc-peg-in-endpoint-v2-04",
|
||||
"btc-peg-out-endpoint-v2-01",
|
||||
"cross-peg-in-endpoint-v2-03",
|
||||
"cross-peg-out-endpoint-v2-01",
|
||||
|
||||
@@ -45,19 +45,19 @@ export const getBtc2StacksFeeInfo = async (
|
||||
|
||||
const resp = await props({
|
||||
isPaused: executeReadonlyCallXLINK(
|
||||
"btc-peg-in-endpoint-v2-03",
|
||||
"btc-peg-in-endpoint-v2-04",
|
||||
"is-peg-in-paused",
|
||||
{},
|
||||
executeOptions,
|
||||
),
|
||||
feeRate: executeReadonlyCallXLINK(
|
||||
"btc-peg-in-endpoint-v2-03",
|
||||
"btc-peg-in-endpoint-v2-04",
|
||||
"get-peg-in-fee",
|
||||
{},
|
||||
executeOptions,
|
||||
).then(numberFromStacksContractNumber),
|
||||
minFeeAmount: executeReadonlyCallXLINK(
|
||||
"btc-peg-in-endpoint-v2-03",
|
||||
"btc-peg-in-endpoint-v2-04",
|
||||
"get-peg-in-min-fee",
|
||||
{},
|
||||
executeOptions,
|
||||
|
||||
@@ -77,7 +77,7 @@ export async function createBridgeOrder_BitcoinToStacks(info: {
|
||||
|
||||
if (hasLength(swapRoute, 0)) {
|
||||
data = await executeReadonlyCallXLINK(
|
||||
"btc-peg-in-endpoint-v2-03",
|
||||
"btc-peg-in-endpoint-v2-04",
|
||||
"create-order-cross-or-fail",
|
||||
{
|
||||
order: {
|
||||
@@ -159,7 +159,7 @@ export async function createBridgeOrder_BitcoinToEVM(info: {
|
||||
let data: undefined | Uint8Array
|
||||
if (hasLength(swapRoute, 0)) {
|
||||
data = await executeReadonlyCallXLINK(
|
||||
"btc-peg-in-endpoint-v2-03",
|
||||
"btc-peg-in-endpoint-v2-04",
|
||||
"create-order-cross-or-fail",
|
||||
{
|
||||
order: {
|
||||
|
||||
@@ -33,7 +33,7 @@ export async function validateBridgeOrder(
|
||||
|
||||
if (hasLength(swapRoute, 0)) {
|
||||
resp = await executeReadonlyCallXLINK(
|
||||
"btc-peg-in-endpoint-v2-03",
|
||||
"btc-peg-in-endpoint-v2-04",
|
||||
"validate-tx-cross",
|
||||
{
|
||||
"commit-tx": {
|
||||
|
||||
Reference in New Issue
Block a user