Backporting to beta (#4118)
* Ignore get_price_info test by default. (#4112) * Auto-detect hex encoded bytes in sha3 (#4108) * Auto-detect hex encoded bytes in sha3 * Using types/isHex * Removing unused imports * Use binary chop to estimate gas accurately (#4100) * Initial sketch. * Building. * Fix a few things. * Fix issue, add tracing. * Address grumbles * Raise upper limit if needed * Fix test. * Fixing decoding API with signatures in names (#4125) * Fix call/estimate_gas (#4121) * Return 0 instead of error with out of gas on estimate_gas * Fix stuff up.
This commit is contained in:
committed by
Gav Wood
parent
2b588d57f0
commit
5e70507c78
@@ -35,6 +35,18 @@ describe('abi/spec/Function', () => {
|
||||
});
|
||||
|
||||
describe('constructor', () => {
|
||||
it('returns signature correctly if name already contains it', () => {
|
||||
const func = new Func({
|
||||
name: 'test(bool,string)',
|
||||
inputs: inputsArr,
|
||||
outputs: outputsArr
|
||||
});
|
||||
|
||||
expect(func.name).to.equal('test');
|
||||
expect(func.id).to.equal('test(bool,string)');
|
||||
expect(func.signature).to.equal('02356205');
|
||||
});
|
||||
|
||||
it('stores the parameters as received', () => {
|
||||
expect(func.name).to.equal('test');
|
||||
expect(func.constant).to.be.false;
|
||||
|
||||
Reference in New Issue
Block a user