Skip to content

Commit 137f103

Browse files
authored
Merge pull request #8 from blockstack/fix/testnet-contracts
fix: deploy new testnet contracts #4
2 parents 4add090 + ef352a1 commit 137f103

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ DESCRIPTION
129129
130130
The default contracts can be found below:
131131
132-
Testnet: https://explorer.stacks.co/txid/STR8P3RD1EHA8AA37ERSSSZSWKS9T2GYQFGXNA4C.send-many?chain=testnet
132+
Testnet: https://explorer.stacks.co/txid/ST3F1X4QGV2SM8XD96X45M6RTQXKA1PZJZZCQAB4B.send-many?chain=testnet
133133
Mainnet: https://explorer.stacks.co/txid/SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.send-many?chain=mainnet
134134
135135
Example usage:
@@ -188,7 +188,7 @@ DESCRIPTION
188188
189189
The default contracts can be found below:
190190
191-
Testnet: https://explorer.stacks.co/txid/STR8P3RD1EHA8AA37ERSSSZSWKS9T2GYQFGXNA4C.send-many-memo?chain=testnet
191+
Testnet: https://explorer.stacks.co/txid/ST3F1X4QGV2SM8XD96X45M6RTQXKA1PZJZZCQAB4B.send-many-memo?chain=testnet
192192
Mainnet: https://explorer.stacks.co/txid/SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.send-many-memo?chain=mainnet
193193
194194
Example usage:
@@ -252,7 +252,7 @@ DESCRIPTION
252252
253253
The default contracts can be found below:
254254
255-
Testnet: https://explorer.stacks.co/txid/STR8P3RD1EHA8AA37ERSSSZSWKS9T2GYQFGXNA4C.send-many-memo?chain=testnet
255+
Testnet: https://explorer.stacks.co/txid/ST3F1X4QGV2SM8XD96X45M6RTQXKA1PZJZZCQAB4B.send-many-memo?chain=testnet
256256
Mainnet: https://explorer.stacks.co/txid/SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.send-many-memo?chain=mainnet
257257
258258
Example usage:

src/commands/deploy-contract.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ import { StacksMocknet, StacksMainnet, StacksTestnet } from '@stacks/network';
44
import {
55
broadcastTransaction,
66
ChainID,
7+
ContractDeployOptions,
78
makeContractDeploy,
89
} from '@stacks/transactions';
910
import { promises as fs } from 'fs';
11+
import BN from 'bn.js';
1012

1113
type NetworkString = 'mocknet' | 'mainnet' | 'testnet';
1214
type Contract = 'send-many' | 'send-many-memo' | 'memo-expected';
@@ -121,12 +123,16 @@ only the raw transaction hex will be logged.
121123
network.coreApiUrl = flags.nodeUrl;
122124
}
123125

124-
const tx = await makeContractDeploy({
126+
const txOptions: ContractDeployOptions = {
125127
contractName: contract,
126128
codeBody: await this.getContractCode(contract),
127129
senderKey: flags.privateKey,
128130
network,
129-
});
131+
};
132+
if (flags.nonce !== undefined) {
133+
txOptions.nonce = new BN(flags.nonce);
134+
}
135+
const tx = await makeContractDeploy(txOptions);
130136

131137
const verbose = !flags.quiet;
132138

src/commands/send-many-memo-safe.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import fetch, { Response } from 'node-fetch';
1717
type NetworkString = 'mocknet' | 'mainnet' | 'testnet';
1818

1919
const DEFAULT_TESTNET_CONTRACT =
20-
'STR8P3RD1EHA8AA37ERSSSZSWKS9T2GYQFGXNA4C.send-many-memo';
20+
'ST3F1X4QGV2SM8XD96X45M6RTQXKA1PZJZZCQAB4B.send-many-memo';
2121
const DEFAULT_MAINNET_CONTRACT =
2222
'SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.send-many-memo';
2323

src/commands/send-many-memo.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { STXPostCondition } from '@stacks/transactions/dist/transactions/src/pos
1616
type NetworkString = 'mocknet' | 'mainnet' | 'testnet';
1717

1818
const DEFAULT_TESTNET_CONTRACT =
19-
'STR8P3RD1EHA8AA37ERSSSZSWKS9T2GYQFGXNA4C.send-many-memo';
19+
'ST3F1X4QGV2SM8XD96X45M6RTQXKA1PZJZZCQAB4B.send-many-memo';
2020
const DEFAULT_MAINNET_CONTRACT =
2121
'SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.send-many-memo';
2222

src/commands/send-many.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { STXPostCondition } from '@stacks/transactions/dist/transactions/src/pos
1616
type NetworkString = 'mocknet' | 'mainnet' | 'testnet';
1717

1818
const DEFAULT_TESTNET_CONTRACT =
19-
'STR8P3RD1EHA8AA37ERSSSZSWKS9T2GYQFGXNA4C.send-many';
19+
'ST3F1X4QGV2SM8XD96X45M6RTQXKA1PZJZZCQAB4B.send-many';
2020
const DEFAULT_MAINNET_CONTRACT =
2121
'SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.send-many';
2222

0 commit comments

Comments
 (0)