How to use the web3-core-helpers.formatters.inputTransactionFormatter function in web3-core-helpers

To help you get started, we’ve selected a few web3-core-helpers examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ethereum / web3.js / packages / web3-eth-contract / src / index.js View on Github external
delete receipt.logs;
                        }
                        return receipt;
                    },
                    contractDeployFormatter: function (receipt) {
                        var newContract = _this._parent.clone();
                        newContract.options.address = receipt.contractAddress;
                        return newContract;
                    }
                };

                var sendTransaction = (new Method({
                    name: 'sendTransaction',
                    call: 'eth_sendTransaction',
                    params: 1,
                    inputFormatter: [formatters.inputTransactionFormatter],
                    requestManager: _this._parent._requestManager,
                    accounts: _this.constructor._ethAccounts || _this._ethAccounts, // is eth.accounts (necessary for wallet signing)
                    defaultAccount: _this._parent.defaultAccount,
                    defaultBlock: _this._parent.defaultBlock,
                    extraFormatters: extraFormatters
                })).createFunction();

                return sendTransaction(args.options, args.callback);

        }

    }

};
github wanchain / wanx / src / lib / wan-attach-rpc.js View on Github external
call: 'wan_scanOTAbyAccount',
        params: 2,
        inputFormatter: [formatters.inputAddressFormatter,formatters.inputBlockNumberFormatter]
    });

    const genRingSignData = new Method({
        name: 'genRingSignData',
        call: 'personal_genRingSignData',
        params: 3,
    });

    const sendPrivacyCxtTransaction = new Method({
        name: 'sendPrivacyCxtTransaction',
        call: 'personal_sendPrivacyCxtTransaction',
        params: 2,
        inputFormatter: [formatters.inputTransactionFormatter, null]
    });


    return [
        computeOTAPPKeys,
        generateOneTimeAddress,
        getOTABalance,
        getOTAMixSet,
        getSupportWanCoinOTABalances,
        getSupportStampOTABalances,
        getWanAddress,
        scanOTAbyAccount,
        genRingSignData,
        sendPrivacyCxtTransaction,
    ];
};
github ethereum / web3.js / packages / web3-eth-personal / src / index.js View on Github external
new Method({
            name: 'importRawKey',
            call: 'personal_importRawKey',
            params: 2
        }),
        new Method({
            name: 'sendTransaction',
            call: 'personal_sendTransaction',
            params: 2,
            inputFormatter: [formatters.inputTransactionFormatter, null]
        }),
        new Method({
            name: 'signTransaction',
            call: 'personal_signTransaction',
            params: 2,
            inputFormatter: [formatters.inputTransactionFormatter, null]
        }),
        new Method({
            name: 'sign',
            call: 'personal_sign',
            params: 3,
            inputFormatter: [formatters.inputSignFormatter, formatters.inputAddressFormatter, null]
        }),
        new Method({
            name: 'ecRecover',
            call: 'personal_ecRecover',
            params: 2,
            inputFormatter: [formatters.inputSignFormatter, null]
        })
    ];
    methods.forEach(function(method) {
        method.attachToObject(_this);