cc.youchain.tx.gas.StaticGasProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core Show documentation
Show all versions of core Show documentation
YOUChain Common library in JAVA.
package cc.youchain.tx.gas;
import java.math.BigInteger;
public class StaticGasProvider implements ContractGasProvider {
private BigInteger gasPrice;
private BigInteger gasLimit;
public StaticGasProvider(BigInteger gasPrice, BigInteger gasLimit) {
this.gasPrice = gasPrice;
this.gasLimit = gasLimit;
}
@Override
public BigInteger getGasPrice(String contractFunc) {
return gasPrice;
}
@Override
public BigInteger getGasPrice() {
return gasPrice;
}
@Override
public BigInteger getGasLimit(String contractFunc) {
return gasLimit;
}
@Override
public BigInteger getGasLimit() {
return gasLimit;
}
}