怎么给某个合约地址授权?
我是这么写的,但是点击按钮,没有反应:
// before all, request privilege, first
const handleReqPri = () => {
const w = new Web3(ether);
const wethAdr = getWETHContract(w);
const strBlindAuctionAdr = getBlindAuctionAddress();
wethAdr.methods
.approve(strBlindAuctionAdr, new BigNumber("100000000000000000"))
.call()
.then(function (result: any) {
console.log("handleReqPri ===>", result);
})
.catch((_error: any) => {
// If the request fails, the Promise will reject with an error.
console.error("privilege error ? : ", _error);
});
};