works for simple case
This commit is contained in:
@@ -81,7 +81,7 @@ export class DependentCalldataBlock extends CalldataBlock {
|
||||
private parent: CalldataBlock;
|
||||
private dependency: CalldataBlock;
|
||||
|
||||
constructor(name: string, signature: string, /*offsetInBytes: number,*/ relocatable: boolean, parent: CalldataBlock, dependency: CalldataBlock) {
|
||||
constructor(name: string, signature: string, /*offsetInBytes: number,*/ relocatable: boolean, dependency: CalldataBlock, parent: CalldataBlock) {
|
||||
const headerSizeInBytes = 0;
|
||||
const bodySizeInBytes = DependentCalldataBlock.DEPENDENT_PAYLOAD_SIZE_IN_BYTES;
|
||||
super(name, signature, /*offsetInBytes,*/ headerSizeInBytes, bodySizeInBytes, relocatable);
|
||||
@@ -174,6 +174,7 @@ export class Calldata {
|
||||
let block: CalldataBlock | undefined;
|
||||
let offset = 0;
|
||||
while ((block = blockQueue.pop()) !== undefined) {
|
||||
console.log(block.getName());
|
||||
block.setOffset(offset);
|
||||
if (block instanceof DependentCalldataBlock) {
|
||||
blockQueue.push(block.getDependency());
|
||||
|
||||
@@ -116,7 +116,7 @@ describe.only('ABI Encoder', () => {
|
||||
});
|
||||
|
||||
|
||||
it('Types with default widths', async () => {
|
||||
it.skip('Types with default widths', async () => {
|
||||
const method = new AbiEncoder.Method(AbiSamples.typesWithDefaultWidthsAbi);
|
||||
console.log(method);
|
||||
const args = [new BigNumber(1), new BigNumber(-1), '0x56', [new BigNumber(1)], [new BigNumber(-1)], ['0x56']];
|
||||
@@ -329,7 +329,7 @@ describe.only('ABI Encoder', () => {
|
||||
expect(calldata).to.be.equal(expectedCalldata);
|
||||
});
|
||||
|
||||
it.only('Yessir', async () => {
|
||||
it('Yessir', async () => {
|
||||
const method = new AbiEncoder.Method(AbiSamples.simpleAbi);
|
||||
const calldata = method.encode([new BigNumber(5), 'five']);
|
||||
console.log(calldata);
|
||||
|
||||
Reference in New Issue
Block a user