Comments (1)
The gas price currently comes from the Ethereum network, but yes I should add the ability to override it for those wish to have finer grained control. Give me a day to think about the best way to support this in a more general way.
I think I will add a optional function to signers for getGasPrice(tx)
.
I would also like to add a feature where the gasPrice can be set to specific constants, in which case it will use the ethers gas oracle; for example "low" would use the current safe low value for the network. I still need to think more about this though, since it will greatly increase the traffic to my public API.
If you need something ASAP, for now, you can just create a custom signer, which will allow you to override this.
var ethers = require('ethers');
var meow = require('ethers-meow');
function CustomSigner(privateKey) {
this.provider = ethers.providers.getDefaultProvider();
var wallet = new ethers.Wallet(privateKey, this.provider);
this.address = wallet.address;
this.sendTransaction = function(tx) {
tx.gasPrice = 25000000000;
console.log(tx);
return wallet.sendTransaction(tx);
}
}
var customSigner = new CustomSigner('0x0123456789012345678901234567890123456789012345678901234567890123');
var manager = new meow.Manager(customSigner);
manager.giveBirth(1000);
from ethers-meow.
Related Issues (11)
- Add auction commands HOT 5
- Add interface to geneSciences HOT 1
- Add mnemonic phrase support (to ethers-cli) HOT 1
- how to install? HOT 2
- getKittyIds HOT 2
- Adding existing Wallet HOT 5
- Is this using the CryptoKitties API or is it actually using Raw commands HOT 4
- Is there a way to find out who gifted you a kitty? HOT 2
- functions without cost HOT 2
- How to run javascript in command line interface? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ethers-meow.