Files
common/packages/code-extrinsics/src/encode/extrinsic.spec.js
T
Jaco Greeff 78e01a0e16 Combine util, types & trie into common (#150)
* Pull in trie repo

* Bring in types repo
2018-06-26 21:26:51 +02:00

28 lines
624 B
JavaScript

// Copyright 2017-2018 @polkadot/extrinsics-codec authors & contributors
// This software may be modified and distributed under the terms
// of the ISC license. See the LICENSE file for details.
// @flow
import extrinsics from '@polkadot/extrinsics';
import extrinsic from './extrinsic';
describe('extrinsic', () => {
it('encodes extrinsic correctly', () => {
expect(
extrinsic(
extrinsics.timestamp.public.set,
[10101],
'latest'
)
).toEqual(
new Uint8Array([
// index
3, 0,
// values
117, 39, 0, 0, 0, 0, 0, 0
])
);
});
});