@f5i23q999d/cow-sdk
Version:
<p align="center"> <img width="400" src="https://github.com/cowprotocol/cow-sdk/raw/main/docs/images/CoW.png" /> </p>
13 lines • 587 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.factoryGetErc20Decimals = void 0;
const contracts_1 = require("@ethersproject/contracts");
const ERC20_DECIMALS_ABI = ['function decimals() external view returns (uint8)'];
function factoryGetErc20Decimals(provider) {
return (_chainId, tokenAddress) => {
const contract = new contracts_1.Contract(tokenAddress, ERC20_DECIMALS_ABI, provider);
return contract.decimals();
};
}
exports.factoryGetErc20Decimals = factoryGetErc20Decimals;
//# sourceMappingURL=getErc20Decimals.js.map