Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix oxfordbox failing noop test #2681

Merged
merged 4 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions integration-tests/contract-failing-noop.spec.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
import { InMemorySigner } from "@taquito/signer";
import { CONFIGS, defaultSecretKey } from "./config";
import { CONFIGS, defaultSecretKey, isSandbox } from "./config";
import { OpKind, TezosToolkit } from "@taquito/taquito";
import { verifySignature } from "@taquito/utils";

CONFIGS().forEach(({ setup }) => {
let rpc = 'https://mainnet-archive.ecadinfra.com/'
const Tezos = new TezosToolkit(rpc);
Tezos.setSignerProvider(new InMemorySigner(defaultSecretKey.secret_key));
CONFIGS().forEach(({ setup, rpc, lib }) => {
const testnet = isSandbox({ rpc }) ? it.skip : it;
let Tezos: TezosToolkit
let signer = new InMemorySigner(defaultSecretKey.secret_key)

describe(`Test failing_noop through contract api, based on head, and secret_key using: ${rpc}`, () => {
beforeEach(async (done) => {
describe(`Test failing_noop through contract api, based on head, and secret_key`, () => {
beforeAll(async (done) => {
await setup();
Tezos = new TezosToolkit('https://mainnet-archive.ecadinfra.com/');
Tezos.setSignerProvider(signer);
done();
});

it('Verify that the contract.failingNoop result is as expected when the block and secret key are kept constant', async (done) => {
testnet('Verify that the contract.failingNoop result is as expected when the block and secret key are kept constant', async (done) => {
const signed = await Tezos.contract.failingNoop({
arbitrary: "48656C6C6F20576F726C64", // Hello World
basedOnBlock: 0,
Expand All @@ -36,8 +38,10 @@ CONFIGS().forEach(({ setup }) => {
});

describe(`Test failing_noop through contract api using: ${rpc}`, () => {
beforeEach(async (done) => {
beforeAll(async (done) => {
await setup();
Tezos = lib
Tezos.setSignerProvider(signer);
done();
});

Expand Down
22 changes: 13 additions & 9 deletions integration-tests/wallet-failing-noop.spec.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
import { InMemorySigner } from "@taquito/signer";
import { CONFIGS, defaultSecretKey } from "./config";
import { CONFIGS, defaultSecretKey, isSandbox } from "./config";
import { OpKind, TezosToolkit } from "@taquito/taquito";
import { verifySignature } from "@taquito/utils";

CONFIGS().forEach(({ setup }) => {
let rpc = 'https://mainnet-archive.ecadinfra.com/'
const Tezos = new TezosToolkit(rpc);
Tezos.setSignerProvider(new InMemorySigner(defaultSecretKey.secret_key));
CONFIGS().forEach(({ setup, rpc, lib }) => {
const testnet = isSandbox({ rpc }) ? it.skip : it;
let Tezos: TezosToolkit
let signer = new InMemorySigner(defaultSecretKey.secret_key)

describe(`Test failing_noop through wallet api, based on head, and secret_key using: ${rpc}`, () => {
beforeEach(async (done) => {
describe(`Test failing_noop through wallet api, based on head, and secret_key`, () => {
beforeAll(async (done) => {
await setup();
Tezos = new TezosToolkit('https://mainnet-archive.ecadinfra.com/');
Tezos.setSignerProvider(signer);
done();
});

it('Verify that the wallet.signFailingNoop result is as expected when the block and private key are kept constant', async done => {
testnet('Verify that the wallet.signFailingNoop result is as expected when the block and private key are kept constant', async done => {
const signed = await Tezos.wallet.signFailingNoop({
arbitrary: "48656C6C6F20576F726C64", // Hello World
basedOnBlock: 0,
Expand All @@ -37,8 +39,10 @@ CONFIGS().forEach(({ setup }) => {
});

describe(`Test failing_noop through wallet api using: ${rpc}`, () => {
beforeEach(async (done) => {
beforeAll(async (done) => {
await setup();
Tezos = lib;
Tezos.setSignerProvider(signer);
done();
});

Expand Down
Loading