Add multiple faucet addresses
This commit is contained in:
parent
ad6eb5817e
commit
f6ac2f975e
@ -35,7 +35,7 @@ describe("CosmosClient.getTx and .searchTx", () => {
|
||||
const wallet = await Secp256k1HdWallet.fromMnemonic(faucet.mnemonic);
|
||||
const accounts = await wallet.getAccounts();
|
||||
const [{ address: walletAddress }] = accounts;
|
||||
const client = new SigningCosmosClient(launchpad.endpoint, faucet.address, wallet);
|
||||
const client = new SigningCosmosClient(launchpad.endpoint, faucet.address0, wallet);
|
||||
|
||||
{
|
||||
const memo = "Sending more than I can afford";
|
||||
@ -44,7 +44,7 @@ describe("CosmosClient.getTx and .searchTx", () => {
|
||||
const sendMsg: MsgSend = {
|
||||
type: "cosmos-sdk/MsgSend",
|
||||
value: {
|
||||
from_address: faucet.address,
|
||||
from_address: faucet.address0,
|
||||
to_address: recipient,
|
||||
amount: transferAmount,
|
||||
},
|
||||
@ -65,7 +65,7 @@ describe("CosmosClient.getTx and .searchTx", () => {
|
||||
const result = await client.broadcastTx(tx.value);
|
||||
if (isBroadcastTxFailure(result)) {
|
||||
sendUnsuccessful = {
|
||||
sender: faucet.address,
|
||||
sender: faucet.address0,
|
||||
recipient: recipient,
|
||||
hash: transactionId,
|
||||
height: result.height,
|
||||
@ -81,7 +81,7 @@ describe("CosmosClient.getTx and .searchTx", () => {
|
||||
await sleep(75); // wait until tx is indexed
|
||||
const txDetails = await new LcdClient(launchpad.endpoint).txById(result.transactionHash);
|
||||
sendSuccessful = {
|
||||
sender: faucet.address,
|
||||
sender: faucet.address0,
|
||||
recipient: recipient,
|
||||
hash: result.transactionHash,
|
||||
height: Number.parseInt(txDetails.height, 10),
|
||||
|
||||
@ -208,7 +208,7 @@ describe("CosmosClient", () => {
|
||||
const sendMsg: MsgSend = {
|
||||
type: "cosmos-sdk/MsgSend",
|
||||
value: {
|
||||
from_address: faucet.address,
|
||||
from_address: faucet.address0,
|
||||
to_address: makeRandomAddress(),
|
||||
amount: [
|
||||
{
|
||||
@ -230,7 +230,7 @@ describe("CosmosClient", () => {
|
||||
};
|
||||
|
||||
const chainId = await client.getChainId();
|
||||
const { accountNumber, sequence } = await client.getSequence(faucet.address);
|
||||
const { accountNumber, sequence } = await client.getSequence(faucet.address0);
|
||||
const signDoc = makeSignDoc([sendMsg], fee, chainId, memo, accountNumber, sequence);
|
||||
const { signed, signature } = await wallet.signAmino(walletAddress, signDoc);
|
||||
const signedTx = makeStdTx(signed, signature);
|
||||
|
||||
@ -58,7 +58,7 @@ describe("encoding", () => {
|
||||
const msg1: MsgDelegate = {
|
||||
type: "cosmos-sdk/MsgDelegate",
|
||||
value: {
|
||||
delegator_address: faucet.address,
|
||||
delegator_address: faucet.address0,
|
||||
validator_address: launchpad.validator.address,
|
||||
amount: coin(1234, "ustake"),
|
||||
},
|
||||
@ -66,7 +66,7 @@ describe("encoding", () => {
|
||||
const msg2: MsgSend = {
|
||||
type: "cosmos-sdk/MsgSend",
|
||||
value: {
|
||||
from_address: faucet.address,
|
||||
from_address: faucet.address0,
|
||||
to_address: makeRandomAddress(),
|
||||
amount: coins(1234567, "ucosm"),
|
||||
},
|
||||
@ -95,7 +95,7 @@ describe("encoding", () => {
|
||||
const msg1: MsgDelegate = {
|
||||
type: "cosmos-sdk/MsgDelegate",
|
||||
value: {
|
||||
delegator_address: faucet.address,
|
||||
delegator_address: faucet.address0,
|
||||
validator_address: launchpad.validator.address,
|
||||
amount: coin(1234, "ustake"),
|
||||
},
|
||||
@ -103,7 +103,7 @@ describe("encoding", () => {
|
||||
const msg2: MsgSend = {
|
||||
type: "cosmos-sdk/MsgSend",
|
||||
value: {
|
||||
from_address: faucet.address,
|
||||
from_address: faucet.address0,
|
||||
to_address: makeRandomAddress(),
|
||||
amount: coins(1234567, "ucosm"),
|
||||
},
|
||||
|
||||
@ -45,10 +45,10 @@ describe("AuthExtension", () => {
|
||||
it("has correct pubkey for faucet", async () => {
|
||||
pendingWithoutLaunchpad();
|
||||
const client = makeAuthClient(launchpad.endpoint);
|
||||
const { result } = await client.auth.account(faucet.address);
|
||||
const { result } = await client.auth.account(faucet.address0);
|
||||
expect(result.value).toEqual(
|
||||
jasmine.objectContaining({
|
||||
public_key: faucet.pubkey,
|
||||
public_key: faucet.pubkey0,
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
@ -33,13 +33,13 @@ describe("DistributionExtension", () => {
|
||||
beforeAll(async () => {
|
||||
if (launchpadEnabled()) {
|
||||
const wallet = await Secp256k1HdWallet.fromMnemonic(faucet.mnemonic);
|
||||
const client = new SigningCosmosClient(launchpad.endpoint, faucet.address, wallet);
|
||||
const client = new SigningCosmosClient(launchpad.endpoint, faucet.address0, wallet);
|
||||
|
||||
const chainId = await client.getChainId();
|
||||
const msg: MsgDelegate = {
|
||||
type: "cosmos-sdk/MsgDelegate",
|
||||
value: {
|
||||
delegator_address: faucet.address,
|
||||
delegator_address: faucet.address0,
|
||||
validator_address: launchpad.validator.address,
|
||||
amount: coin(25000, "ustake"),
|
||||
},
|
||||
@ -47,7 +47,7 @@ describe("DistributionExtension", () => {
|
||||
const memo = "Test delegation for launchpad";
|
||||
const { accountNumber, sequence } = await client.getSequence();
|
||||
const signDoc = makeSignDoc([msg], defaultFee, chainId, memo, accountNumber, sequence);
|
||||
const { signed, signature } = await wallet.signAmino(faucet.address, signDoc);
|
||||
const { signed, signature } = await wallet.signAmino(faucet.address0, signDoc);
|
||||
const signedTx = makeStdTx(signed, signature);
|
||||
|
||||
const result = await client.broadcastTx(signedTx);
|
||||
@ -61,7 +61,7 @@ describe("DistributionExtension", () => {
|
||||
it("works", async () => {
|
||||
pendingWithoutLaunchpad();
|
||||
const client = makeDistributionClient(launchpad.endpoint);
|
||||
const response = await client.distribution.delegatorRewards(faucet.address);
|
||||
const response = await client.distribution.delegatorRewards(faucet.address0);
|
||||
expect(response).toEqual({
|
||||
height: jasmine.stringMatching(nonNegativeIntegerMatcher),
|
||||
result: {
|
||||
@ -81,7 +81,10 @@ describe("DistributionExtension", () => {
|
||||
it("works", async () => {
|
||||
pendingWithoutLaunchpad();
|
||||
const client = makeDistributionClient(launchpad.endpoint);
|
||||
const response = await client.distribution.delegatorReward(faucet.address, launchpad.validator.address);
|
||||
const response = await client.distribution.delegatorReward(
|
||||
faucet.address0,
|
||||
launchpad.validator.address,
|
||||
);
|
||||
expect(response).toEqual({
|
||||
height: jasmine.stringMatching(nonNegativeIntegerMatcher),
|
||||
result: [],
|
||||
@ -93,10 +96,10 @@ describe("DistributionExtension", () => {
|
||||
it("works", async () => {
|
||||
pendingWithoutLaunchpad();
|
||||
const client = makeDistributionClient(launchpad.endpoint);
|
||||
const response = await client.distribution.withdrawAddress(faucet.address);
|
||||
const response = await client.distribution.withdrawAddress(faucet.address0);
|
||||
expect(response).toEqual({
|
||||
height: jasmine.stringMatching(nonNegativeIntegerMatcher),
|
||||
result: faucet.address,
|
||||
result: faucet.address0,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@ -31,7 +31,7 @@ describe("GovExtension", () => {
|
||||
beforeAll(async () => {
|
||||
if (launchpadEnabled()) {
|
||||
const wallet = await Secp256k1HdWallet.fromMnemonic(faucet.mnemonic);
|
||||
const client = new SigningCosmosClient(launchpad.endpoint, faucet.address, wallet);
|
||||
const client = new SigningCosmosClient(launchpad.endpoint, faucet.address0, wallet);
|
||||
|
||||
const chainId = await client.getChainId();
|
||||
const proposalMsg = {
|
||||
@ -44,7 +44,7 @@ describe("GovExtension", () => {
|
||||
title: "Test Proposal",
|
||||
},
|
||||
},
|
||||
proposer: faucet.address,
|
||||
proposer: faucet.address0,
|
||||
initial_deposit: coins(25000000, "ustake"),
|
||||
},
|
||||
};
|
||||
@ -58,7 +58,7 @@ describe("GovExtension", () => {
|
||||
proposalAccountNumber,
|
||||
proposalSequence,
|
||||
);
|
||||
const { signature: proposalSignature } = await wallet.signAmino(faucet.address, proposalSignDoc);
|
||||
const { signature: proposalSignature } = await wallet.signAmino(faucet.address0, proposalSignDoc);
|
||||
const proposalTx = {
|
||||
msg: [proposalMsg],
|
||||
fee: defaultFee,
|
||||
@ -76,7 +76,7 @@ describe("GovExtension", () => {
|
||||
type: "cosmos-sdk/MsgVote",
|
||||
value: {
|
||||
proposal_id: proposalId,
|
||||
voter: faucet.address,
|
||||
voter: faucet.address0,
|
||||
option: "Yes",
|
||||
},
|
||||
};
|
||||
@ -90,7 +90,7 @@ describe("GovExtension", () => {
|
||||
voteAccountNumber,
|
||||
voteSequence,
|
||||
);
|
||||
const { signature: voteSignature } = await wallet.signAmino(faucet.address, voteSignDoc);
|
||||
const { signature: voteSignature } = await wallet.signAmino(faucet.address0, voteSignDoc);
|
||||
const voteTx = {
|
||||
msg: [voteMsg],
|
||||
fee: defaultFee,
|
||||
@ -211,7 +211,7 @@ describe("GovExtension", () => {
|
||||
height: jasmine.stringMatching(nonNegativeIntegerMatcher),
|
||||
result: {
|
||||
proposal_id: proposalId,
|
||||
proposer: faucet.address,
|
||||
proposer: faucet.address0,
|
||||
},
|
||||
});
|
||||
});
|
||||
@ -227,7 +227,7 @@ describe("GovExtension", () => {
|
||||
result: [
|
||||
{
|
||||
proposal_id: proposalId,
|
||||
depositor: faucet.address,
|
||||
depositor: faucet.address0,
|
||||
amount: [{ denom: "ustake", amount: "25000000" }],
|
||||
},
|
||||
],
|
||||
@ -239,12 +239,12 @@ describe("GovExtension", () => {
|
||||
it("works", async () => {
|
||||
pendingWithoutLaunchpad();
|
||||
const client = makeGovClient(launchpad.endpoint);
|
||||
const response = await client.gov.deposit(proposalId, faucet.address);
|
||||
const response = await client.gov.deposit(proposalId, faucet.address0);
|
||||
expect(response).toEqual({
|
||||
height: jasmine.stringMatching(nonNegativeIntegerMatcher),
|
||||
result: {
|
||||
proposal_id: proposalId,
|
||||
depositor: faucet.address,
|
||||
depositor: faucet.address0,
|
||||
amount: [{ denom: "ustake", amount: "25000000" }],
|
||||
},
|
||||
});
|
||||
@ -278,7 +278,7 @@ describe("GovExtension", () => {
|
||||
result: [
|
||||
{
|
||||
proposal_id: proposalId,
|
||||
voter: faucet.address,
|
||||
voter: faucet.address0,
|
||||
option: "Yes",
|
||||
},
|
||||
],
|
||||
@ -290,11 +290,11 @@ describe("GovExtension", () => {
|
||||
it("works", async () => {
|
||||
pendingWithoutLaunchpad();
|
||||
const client = makeGovClient(launchpad.endpoint);
|
||||
const response = await client.gov.vote(proposalId, faucet.address);
|
||||
const response = await client.gov.vote(proposalId, faucet.address0);
|
||||
expect(response).toEqual({
|
||||
height: jasmine.stringMatching(nonNegativeIntegerMatcher),
|
||||
result: {
|
||||
voter: faucet.address,
|
||||
voter: faucet.address0,
|
||||
proposal_id: proposalId,
|
||||
option: "Yes",
|
||||
},
|
||||
|
||||
@ -195,7 +195,7 @@ describe("LcdClient", () => {
|
||||
const wallet = await Secp256k1HdWallet.fromMnemonic(faucet.mnemonic);
|
||||
const accounts = await wallet.getAccounts();
|
||||
const [{ address: walletAddress }] = accounts;
|
||||
const client = new SigningCosmosClient(launchpad.endpoint, faucet.address, wallet);
|
||||
const client = new SigningCosmosClient(launchpad.endpoint, faucet.address0, wallet);
|
||||
|
||||
{
|
||||
const recipient = makeRandomAddress();
|
||||
@ -205,7 +205,7 @@ describe("LcdClient", () => {
|
||||
};
|
||||
const result = await client.sendTokens(recipient, [transferAmount]);
|
||||
successful = {
|
||||
sender: faucet.address,
|
||||
sender: faucet.address0,
|
||||
recipient: recipient,
|
||||
hash: result.transactionHash,
|
||||
};
|
||||
@ -223,7 +223,7 @@ describe("LcdClient", () => {
|
||||
const sendMsg: MsgSend = {
|
||||
type: "cosmos-sdk/MsgSend",
|
||||
value: {
|
||||
from_address: faucet.address,
|
||||
from_address: faucet.address0,
|
||||
to_address: recipient,
|
||||
amount: transferAmount,
|
||||
},
|
||||
@ -246,7 +246,7 @@ describe("LcdClient", () => {
|
||||
const result = await client.broadcastTx(signedTx);
|
||||
assert(isBroadcastTxFailure(result));
|
||||
unsuccessful = {
|
||||
sender: faucet.address,
|
||||
sender: faucet.address0,
|
||||
recipient: recipient,
|
||||
hash: transactionId,
|
||||
};
|
||||
@ -320,7 +320,7 @@ describe("LcdClient", () => {
|
||||
beforeAll(async () => {
|
||||
if (launchpadEnabled()) {
|
||||
const wallet = await Secp256k1HdWallet.fromMnemonic(faucet.mnemonic);
|
||||
const client = new SigningCosmosClient(launchpad.endpoint, faucet.address, wallet);
|
||||
const client = new SigningCosmosClient(launchpad.endpoint, faucet.address0, wallet);
|
||||
|
||||
const recipient = makeRandomAddress();
|
||||
const transferAmount = [
|
||||
@ -334,7 +334,7 @@ describe("LcdClient", () => {
|
||||
await sleep(75); // wait until tx is indexed
|
||||
const txDetails = await new LcdClient(launchpad.endpoint).txById(result.transactionHash);
|
||||
broadcasted = {
|
||||
sender: faucet.address,
|
||||
sender: faucet.address0,
|
||||
recipient: recipient,
|
||||
hash: result.transactionHash,
|
||||
height: Number.parseInt(txDetails.height, 10),
|
||||
@ -509,7 +509,7 @@ describe("LcdClient", () => {
|
||||
const theMsg: MsgSend = {
|
||||
type: "cosmos-sdk/MsgSend",
|
||||
value: {
|
||||
from_address: faucet.address,
|
||||
from_address: faucet.address0,
|
||||
to_address: defaultRecipientAddress,
|
||||
amount: [
|
||||
{
|
||||
@ -531,7 +531,7 @@ describe("LcdClient", () => {
|
||||
};
|
||||
|
||||
const client = LcdClient.withExtensions({ apiUrl: launchpad.endpoint }, setupAuthExtension);
|
||||
const { account_number, sequence } = (await client.auth.account(faucet.address)).result.value;
|
||||
const { account_number, sequence } = (await client.auth.account(faucet.address0)).result.value;
|
||||
|
||||
const signDoc = makeSignDoc([theMsg], fee, launchpad.chainId, memo, account_number, sequence);
|
||||
const { signed, signature } = await wallet.signAmino(walletAddress, signDoc);
|
||||
|
||||
@ -33,14 +33,14 @@ describe("StakingExtension", () => {
|
||||
beforeAll(async () => {
|
||||
if (launchpadEnabled()) {
|
||||
const wallet = await Secp256k1HdWallet.fromMnemonic(faucet.mnemonic);
|
||||
const client = new SigningCosmosClient(launchpad.endpoint, faucet.address, wallet);
|
||||
const client = new SigningCosmosClient(launchpad.endpoint, faucet.address0, wallet);
|
||||
|
||||
const chainId = await client.getChainId();
|
||||
{
|
||||
const msg: MsgDelegate = {
|
||||
type: "cosmos-sdk/MsgDelegate",
|
||||
value: {
|
||||
delegator_address: faucet.address,
|
||||
delegator_address: faucet.address0,
|
||||
validator_address: launchpad.validator.address,
|
||||
amount: coin(25000, "ustake"),
|
||||
},
|
||||
@ -48,7 +48,7 @@ describe("StakingExtension", () => {
|
||||
const memo = "Test delegation for wasmd";
|
||||
const { accountNumber, sequence } = await client.getSequence();
|
||||
const signDoc = makeSignDoc([msg], defaultFee, chainId, memo, accountNumber, sequence);
|
||||
const { signed, signature } = await wallet.signAmino(faucet.address, signDoc);
|
||||
const { signed, signature } = await wallet.signAmino(faucet.address0, signDoc);
|
||||
const signedTx = makeStdTx(signed, signature);
|
||||
|
||||
const result = await client.broadcastTx(signedTx);
|
||||
@ -58,7 +58,7 @@ describe("StakingExtension", () => {
|
||||
const msg: MsgUndelegate = {
|
||||
type: "cosmos-sdk/MsgUndelegate",
|
||||
value: {
|
||||
delegator_address: faucet.address,
|
||||
delegator_address: faucet.address0,
|
||||
validator_address: launchpad.validator.address,
|
||||
amount: coin(100, "ustake"),
|
||||
},
|
||||
@ -66,7 +66,7 @@ describe("StakingExtension", () => {
|
||||
const memo = "Test undelegation for wasmd";
|
||||
const { accountNumber, sequence } = await client.getSequence();
|
||||
const signDoc = makeSignDoc([msg], defaultFee, chainId, memo, accountNumber, sequence);
|
||||
const { signed, signature } = await wallet.signAmino(faucet.address, signDoc);
|
||||
const { signed, signature } = await wallet.signAmino(faucet.address0, signDoc);
|
||||
const signedTx = makeStdTx(signed, signature);
|
||||
|
||||
const result = await client.broadcastTx(signedTx);
|
||||
@ -81,12 +81,12 @@ describe("StakingExtension", () => {
|
||||
it("works", async () => {
|
||||
pendingWithoutLaunchpad();
|
||||
const client = makeStakingClient(launchpad.endpoint);
|
||||
const response = await client.staking.delegatorDelegations(faucet.address);
|
||||
const response = await client.staking.delegatorDelegations(faucet.address0);
|
||||
expect(response).toEqual({
|
||||
height: jasmine.stringMatching(nonNegativeIntegerMatcher),
|
||||
result: [
|
||||
{
|
||||
delegator_address: faucet.address,
|
||||
delegator_address: faucet.address0,
|
||||
validator_address: launchpad.validator.address,
|
||||
shares: jasmine.stringMatching(bigDecimalMatcher),
|
||||
balance: { denom: "ustake", amount: jasmine.stringMatching(nonNegativeIntegerMatcher) },
|
||||
@ -100,12 +100,12 @@ describe("StakingExtension", () => {
|
||||
it("works", async () => {
|
||||
pendingWithoutLaunchpad();
|
||||
const client = makeStakingClient(launchpad.endpoint);
|
||||
const { height, result } = await client.staking.delegatorUnbondingDelegations(faucet.address);
|
||||
const { height, result } = await client.staking.delegatorUnbondingDelegations(faucet.address0);
|
||||
expect(height).toMatch(nonNegativeIntegerMatcher);
|
||||
assert(result);
|
||||
expect(result).toEqual([
|
||||
{
|
||||
delegator_address: faucet.address,
|
||||
delegator_address: faucet.address0,
|
||||
validator_address: launchpad.validator.address,
|
||||
entries: jasmine.arrayContaining([
|
||||
{
|
||||
@ -124,7 +124,7 @@ describe("StakingExtension", () => {
|
||||
it("works", async () => {
|
||||
pendingWithoutLaunchpad();
|
||||
const client = makeStakingClient(launchpad.endpoint);
|
||||
const response = await client.staking.delegatorTransactions(faucet.address);
|
||||
const response = await client.staking.delegatorTransactions(faucet.address0);
|
||||
expect(response.length).toEqual(3);
|
||||
});
|
||||
});
|
||||
@ -133,7 +133,7 @@ describe("StakingExtension", () => {
|
||||
it("works", async () => {
|
||||
pendingWithoutLaunchpad();
|
||||
const client = makeStakingClient(launchpad.endpoint);
|
||||
const response = await client.staking.delegatorValidators(faucet.address);
|
||||
const response = await client.staking.delegatorValidators(faucet.address0);
|
||||
expect(response).toEqual({
|
||||
height: jasmine.stringMatching(nonNegativeIntegerMatcher),
|
||||
result: [
|
||||
@ -172,7 +172,7 @@ describe("StakingExtension", () => {
|
||||
it("works", async () => {
|
||||
pendingWithoutLaunchpad();
|
||||
const client = makeStakingClient(launchpad.endpoint);
|
||||
const response = await client.staking.delegatorValidator(faucet.address, launchpad.validator.address);
|
||||
const response = await client.staking.delegatorValidator(faucet.address0, launchpad.validator.address);
|
||||
expect(response).toEqual({
|
||||
height: jasmine.stringMatching(nonNegativeIntegerMatcher),
|
||||
result: {
|
||||
@ -209,11 +209,11 @@ describe("StakingExtension", () => {
|
||||
it("works", async () => {
|
||||
pendingWithoutLaunchpad();
|
||||
const client = makeStakingClient(launchpad.endpoint);
|
||||
const response = await client.staking.delegation(faucet.address, launchpad.validator.address);
|
||||
const response = await client.staking.delegation(faucet.address0, launchpad.validator.address);
|
||||
expect(response).toEqual({
|
||||
height: jasmine.stringMatching(nonNegativeIntegerMatcher),
|
||||
result: {
|
||||
delegator_address: faucet.address,
|
||||
delegator_address: faucet.address0,
|
||||
validator_address: launchpad.validator.address,
|
||||
shares: jasmine.stringMatching(bigDecimalMatcher),
|
||||
balance: { denom: "ustake", amount: jasmine.stringMatching(nonNegativeIntegerMatcher) },
|
||||
@ -227,13 +227,13 @@ describe("StakingExtension", () => {
|
||||
pendingWithoutLaunchpad();
|
||||
const client = makeStakingClient(launchpad.endpoint);
|
||||
const { height, result } = await client.staking.unbondingDelegation(
|
||||
faucet.address,
|
||||
faucet.address0,
|
||||
launchpad.validator.address,
|
||||
);
|
||||
expect(height).toMatch(nonNegativeIntegerMatcher);
|
||||
assert(result);
|
||||
expect(result).toEqual({
|
||||
delegator_address: faucet.address,
|
||||
delegator_address: faucet.address0,
|
||||
validator_address: launchpad.validator.address,
|
||||
entries: jasmine.arrayContaining([
|
||||
{
|
||||
@ -392,7 +392,7 @@ describe("StakingExtension", () => {
|
||||
height: jasmine.stringMatching(nonNegativeIntegerMatcher),
|
||||
result: jasmine.arrayContaining([
|
||||
{
|
||||
delegator_address: faucet.address,
|
||||
delegator_address: faucet.address0,
|
||||
validator_address: launchpad.validator.address,
|
||||
shares: jasmine.stringMatching(bigDecimalMatcher),
|
||||
balance: { denom: "ustake", amount: jasmine.stringMatching(nonNegativeIntegerMatcher) },
|
||||
@ -419,7 +419,7 @@ describe("StakingExtension", () => {
|
||||
assert(result);
|
||||
expect(result).toEqual([
|
||||
{
|
||||
delegator_address: faucet.address,
|
||||
delegator_address: faucet.address0,
|
||||
validator_address: launchpad.validator.address,
|
||||
entries: jasmine.arrayContaining([
|
||||
{
|
||||
|
||||
@ -19,7 +19,7 @@ describe("SigningCosmosClient", () => {
|
||||
describe("makeReadOnly", () => {
|
||||
it("can be constructed with default fees", async () => {
|
||||
const wallet = await Secp256k1HdWallet.fromMnemonic(faucet.mnemonic);
|
||||
const client = new SigningCosmosClient(launchpad.endpoint, faucet.address, wallet);
|
||||
const client = new SigningCosmosClient(launchpad.endpoint, faucet.address0, wallet);
|
||||
const openedClient = (client as unknown) as PrivateSigningCosmosClient;
|
||||
expect(openedClient.fees).toEqual({
|
||||
send: {
|
||||
@ -37,7 +37,7 @@ describe("SigningCosmosClient", () => {
|
||||
it("can be constructed with custom gas price", async () => {
|
||||
const wallet = await Secp256k1HdWallet.fromMnemonic(faucet.mnemonic);
|
||||
const gasPrice = GasPrice.fromString("3.14utest");
|
||||
const client = new SigningCosmosClient(launchpad.endpoint, faucet.address, wallet, gasPrice);
|
||||
const client = new SigningCosmosClient(launchpad.endpoint, faucet.address0, wallet, gasPrice);
|
||||
const openedClient = (client as unknown) as PrivateSigningCosmosClient;
|
||||
expect(openedClient.fees).toEqual({
|
||||
send: {
|
||||
@ -59,7 +59,7 @@ describe("SigningCosmosClient", () => {
|
||||
};
|
||||
const client = new SigningCosmosClient(
|
||||
launchpad.endpoint,
|
||||
faucet.address,
|
||||
faucet.address0,
|
||||
wallet,
|
||||
undefined,
|
||||
gasLimits,
|
||||
@ -84,7 +84,13 @@ describe("SigningCosmosClient", () => {
|
||||
const gasLimits = {
|
||||
send: 160000,
|
||||
};
|
||||
const client = new SigningCosmosClient(launchpad.endpoint, faucet.address, wallet, gasPrice, gasLimits);
|
||||
const client = new SigningCosmosClient(
|
||||
launchpad.endpoint,
|
||||
faucet.address0,
|
||||
wallet,
|
||||
gasPrice,
|
||||
gasLimits,
|
||||
);
|
||||
const openedClient = (client as unknown) as PrivateSigningCosmosClient;
|
||||
expect(openedClient.fees).toEqual({
|
||||
send: {
|
||||
@ -104,7 +110,7 @@ describe("SigningCosmosClient", () => {
|
||||
it("always uses authAccount implementation", async () => {
|
||||
pendingWithoutLaunchpad();
|
||||
const wallet = await Secp256k1HdWallet.fromMnemonic(faucet.mnemonic);
|
||||
const client = new SigningCosmosClient(launchpad.endpoint, faucet.address, wallet);
|
||||
const client = new SigningCosmosClient(launchpad.endpoint, faucet.address0, wallet);
|
||||
|
||||
const openedClient = (client as unknown) as PrivateCosmosClient;
|
||||
const blockLatestSpy = spyOn(openedClient.lcdClient, "blocksLatest").and.callThrough();
|
||||
@ -122,7 +128,7 @@ describe("SigningCosmosClient", () => {
|
||||
it("works", async () => {
|
||||
pendingWithoutLaunchpad();
|
||||
const wallet = await Secp256k1HdWallet.fromMnemonic(faucet.mnemonic);
|
||||
const client = new SigningCosmosClient(launchpad.endpoint, faucet.address, wallet);
|
||||
const client = new SigningCosmosClient(launchpad.endpoint, faucet.address0, wallet);
|
||||
|
||||
// instantiate
|
||||
const transferAmount: readonly Coin[] = [
|
||||
@ -154,12 +160,12 @@ describe("SigningCosmosClient", () => {
|
||||
it("works", async () => {
|
||||
pendingWithoutLaunchpad();
|
||||
const wallet = await Secp256k1HdWallet.fromMnemonic(faucet.mnemonic);
|
||||
const client = new SigningCosmosClient(launchpad.endpoint, faucet.address, wallet);
|
||||
const client = new SigningCosmosClient(launchpad.endpoint, faucet.address0, wallet);
|
||||
|
||||
const msg: MsgDelegate = {
|
||||
type: "cosmos-sdk/MsgDelegate",
|
||||
value: {
|
||||
delegator_address: faucet.address,
|
||||
delegator_address: faucet.address0,
|
||||
validator_address: launchpad.validator.address,
|
||||
amount: coin(1234, "ustake"),
|
||||
},
|
||||
@ -177,12 +183,12 @@ describe("SigningCosmosClient", () => {
|
||||
it("works", async () => {
|
||||
pendingWithoutLaunchpad();
|
||||
const wallet = await Secp256k1HdWallet.fromMnemonic(faucet.mnemonic);
|
||||
const client = new SigningCosmosClient(launchpad.endpoint, faucet.address, wallet);
|
||||
const client = new SigningCosmosClient(launchpad.endpoint, faucet.address0, wallet);
|
||||
|
||||
const msg1: MsgDelegate = {
|
||||
type: "cosmos-sdk/MsgDelegate",
|
||||
value: {
|
||||
delegator_address: faucet.address,
|
||||
delegator_address: faucet.address0,
|
||||
validator_address: launchpad.validator.address,
|
||||
amount: coin(1234, "ustake"),
|
||||
},
|
||||
@ -190,7 +196,7 @@ describe("SigningCosmosClient", () => {
|
||||
const msg2: MsgSend = {
|
||||
type: "cosmos-sdk/MsgSend",
|
||||
value: {
|
||||
from_address: faucet.address,
|
||||
from_address: faucet.address0,
|
||||
to_address: makeRandomAddress(),
|
||||
amount: coins(1234567, "ucosm"),
|
||||
},
|
||||
|
||||
@ -38,11 +38,15 @@ export const launchpad = {
|
||||
export const faucet = {
|
||||
mnemonic:
|
||||
"economy stock theory fatal elder harbor betray wasp final emotion task crumble siren bottom lizard educate guess current outdoor pair theory focus wife stone",
|
||||
pubkey: {
|
||||
pubkey0: {
|
||||
type: "tendermint/PubKeySecp256k1",
|
||||
value: "A08EGB7ro1ORuFhjOnZcSgwYlpe0DSFjVNUIkNNQxwKQ",
|
||||
},
|
||||
address: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6",
|
||||
address0: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6",
|
||||
address1: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5",
|
||||
address2: "cosmos1xy4yqngt0nlkdcenxymg8tenrghmek4nmqm28k",
|
||||
address3: "cosmos142u9fgcjdlycfcez3lw8x6x5h7rfjlnfhpw2lx",
|
||||
address4: "cosmos1hsm76p4ahyhl5yh3ve9ur49r5kemhp2r0dcjvx",
|
||||
};
|
||||
|
||||
/** Unused account */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user