-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2065 local forging support new operations for lima 2 (#2139)
* feat: support new types for new operations UpdateConsensusKey and DrainDelegate in Lima re #2066 * test: update_consensus_key unit test added for limanet re #2066 * feat: support new operation UpdateConsensusKey for Lima re #2065 * feat: support new operation updateConsensusKey in local-forger for Lima re #2065 * revert: removed unnecesorry change of updateConsensusKey in rpc-batch-provider re #2065 * revert: changes of update_consensus_key in RpcContractProvider and RPCEstimateProvider re #2065 * feat: support new operation drainDelegate for Lima re #2065 * feat: support new encoding for ticket & ticket depreacted in lima with tests re #2072 * fix: added ASSERT_SOME in ticketCode and fixed 2 integration tests in lima re #2072 * fix: fixs merge conflicts * fix: replaced ASSERT_SOME with its expansion in ticketCode re #2072 * test: added local-forgin integration tests for new operations re #2065 * fix: address comments removed duplicate tests and move kathcases to commoncases re #2065 * fix: address comments to remove kathcases integration tests re #2065 * test: address comments add forge and parse operation test suite back with lima cases re #2065 * test: addressing comments updated file name and added simicolons re #2065 * test: address comments added semicolon re #2065 * fix: configure localforger with lima protocol hash with lima cases re #2065 * fix: removed update_consensus_key & drain_delegate from encodersProto14 and decoderProto14 re #2065
- Loading branch information
1 parent
5652389
commit fd18fcb
Showing
23 changed files
with
2,742 additions
and
1,740 deletions.
There are no files selected for viewing
110 changes: 110 additions & 0 deletions
110
integration-tests/contract-deploy-having-ticket.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
import { CONFIGS } from "./config"; | ||
import { ticketCode } from './data/code_with_ticket'; | ||
import { ticketCodeProto14 } from './data/code_with_ticket_proto14'; | ||
import { Protocols } from "@taquito/taquito"; | ||
|
||
CONFIGS().forEach(({ lib, rpc, setup, protocol }) => { | ||
const Tezos = lib; | ||
const kathmandunet = protocol === Protocols.PtKathman ? test: test.skip; | ||
const limanetAndAlpha = protocol === Protocols.PtLimaPtL || protocol === Protocols.ProtoALpha ? test: test.skip; | ||
|
||
describe(`Test origination of a token contract using: ${rpc}`, () => { | ||
|
||
beforeEach(async (done) => { | ||
await setup(); | ||
done(); | ||
}); | ||
|
||
kathmandunet('Originates a contract having ticket with init and the contract api', async (done) => { | ||
const op = await Tezos.contract.originate({ | ||
code: ticketCodeProto14, | ||
init: `(Pair None None)` | ||
}); | ||
|
||
await op.confirmation(); | ||
expect(op.hash).toBeDefined(); | ||
expect(op.includedInBlock).toBeLessThan(Number.POSITIVE_INFINITY); | ||
|
||
done(); | ||
}); | ||
|
||
kathmandunet('Originates a contract having ticket with init in JSON and the contract api', async (done) => { | ||
const op = await Tezos.contract.originate({ | ||
code: ticketCodeProto14, | ||
init: { prim: 'Pair', args: [ { prim: 'None' }, { prim: 'None' } ] } | ||
}); | ||
|
||
await op.confirmation(); | ||
expect(op.hash).toBeDefined(); | ||
expect(op.includedInBlock).toBeLessThan(Number.POSITIVE_INFINITY); | ||
|
||
done(); | ||
}); | ||
|
||
kathmandunet('Originates a contract having ticket with storage and the contract api', async (done) => { | ||
const op = await Tezos.contract.originate({ | ||
code: ticketCodeProto14, | ||
storage: { | ||
'%x': null, | ||
'%y': null | ||
} | ||
}); | ||
|
||
await op.confirmation(); | ||
expect(op.hash).toBeDefined(); | ||
expect(op.includedInBlock).toBeLessThan(Number.POSITIVE_INFINITY); | ||
|
||
done(); | ||
}); | ||
}); | ||
|
||
describe(`Test origination of a token contract using: ${rpc}`, () => { | ||
|
||
beforeEach(async (done) => { | ||
await setup(); | ||
done(); | ||
}); | ||
|
||
limanetAndAlpha('Originates a contract having ticket with init and the contract api', async (done) => { | ||
const op = await Tezos.contract.originate({ | ||
code: ticketCode, | ||
init: `(Pair None None)` | ||
}); | ||
|
||
await op.confirmation(); | ||
expect(op.hash).toBeDefined(); | ||
expect(op.includedInBlock).toBeLessThan(Number.POSITIVE_INFINITY); | ||
|
||
done(); | ||
}); | ||
|
||
limanetAndAlpha('Originates a contract having ticket with init in JSON and the contract api', async (done) => { | ||
const op = await Tezos.contract.originate({ | ||
code: ticketCode, | ||
init: { prim: 'Pair', args: [ { prim: 'None' }, { prim: 'None' } ] } | ||
}); | ||
|
||
await op.confirmation(); | ||
expect(op.hash).toBeDefined(); | ||
expect(op.includedInBlock).toBeLessThan(Number.POSITIVE_INFINITY); | ||
|
||
done(); | ||
}); | ||
|
||
limanetAndAlpha('Originates a contract having ticket with storage and the contract api', async (done) => { | ||
const op = await Tezos.contract.originate({ | ||
code: ticketCode, | ||
storage: { | ||
'%x': null, | ||
'%y': null | ||
} | ||
}); | ||
|
||
await op.confirmation(); | ||
expect(op.hash).toBeDefined(); | ||
expect(op.includedInBlock).toBeLessThan(Number.POSITIVE_INFINITY); | ||
|
||
done(); | ||
}); | ||
}); | ||
}) |
67 changes: 0 additions & 67 deletions
67
integration-tests/contract-edo-deploy-having-ticket.spec.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.