Skip to content

Commit

Permalink
test: add stake, unstake and finalize_unstake to local forger tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ac10n committed Sep 20, 2023
1 parent 697b356 commit 7e335dc
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
66 changes: 66 additions & 0 deletions integration-tests/data/allTestsCases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,72 @@ export const commonCases: TestCase[] = [
],
},
},
{
name: 'Transaction with stake entrypoint',
operation: {
branch: 'BLzyjjHKEKMULtvkpSHxuZxx6ei6fpntH2BTkYZiLgs8zLVstvX',
contents: [
{
kind: OpKind.TRANSACTION,
counter: '1',
source: 'tz1QZ6KY7d3BuZDT1d19dUxoQrtFPN2QJ3hn',
fee: '10000',
gas_limit: '10',
storage_limit: '10',
parameters: {
entrypoint: 'stake',
value: { prim: 'Unit' },
},
destination: 'tz1QZ6KY7d3BuZDT1d19dUxoQrtFPN2QJ3hn',
amount: '1000000',
},
],
},
},
{
name: 'Transaction with unstake entrypoint',
operation: {
branch: 'BLzyjjHKEKMULtvkpSHxuZxx6ei6fpntH2BTkYZiLgs8zLVstvX',
contents: [
{
kind: OpKind.TRANSACTION,
counter: '1',
source: 'tz1QZ6KY7d3BuZDT1d19dUxoQrtFPN2QJ3hn',
fee: '10000',
gas_limit: '10',
storage_limit: '10',
parameters: {
entrypoint: 'unstake',
value: { prim: 'Unit' },
},
destination: 'tz1QZ6KY7d3BuZDT1d19dUxoQrtFPN2QJ3hn',
amount: '1000000',
},
],
},
},
{
name: 'Transaction with finalize_unstake entrypoint',
operation: {
branch: 'BLzyjjHKEKMULtvkpSHxuZxx6ei6fpntH2BTkYZiLgs8zLVstvX',
contents: [
{
kind: OpKind.TRANSACTION,
counter: '1',
source: 'tz1QZ6KY7d3BuZDT1d19dUxoQrtFPN2QJ3hn',
fee: '10000',
gas_limit: '10',
storage_limit: '10',
parameters: {
entrypoint: 'finalize_unstake',
value: { prim: 'Unit' },
},
destination: 'tz1QZ6KY7d3BuZDT1d19dUxoQrtFPN2QJ3hn',
amount: '0',
},
],
},
},
{
name: 'Transaction with remove_delegate entrypoint',
operation: {
Expand Down
3 changes: 3 additions & 0 deletions packages/taquito-local-forging/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ export const entrypointMapping: { [key: string]: string } = {
'03': 'set_delegate',
'04': 'remove_delegate',
'05': 'deposit',
'06': 'stake',
'07': 'unstake',
'08': 'finalize_unstake',
};

export const entrypointMappingReverse = (() => {
Expand Down

0 comments on commit 7e335dc

Please sign in to comment.