Skip to content

Commit

Permalink
Add NativeTotalSupply
Browse files Browse the repository at this point in the history
  • Loading branch information
leej1012 committed Oct 20, 2023
1 parent a0bdb90 commit 8960189
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@
import com.github.ontio.aop.RequestLimit;
import com.github.ontio.model.common.ResponseBean;
import com.github.ontio.service.impl.SummaryServiceImpl;
import com.github.ontio.util.ConstantParam;
import com.github.ontio.util.ErrorInfo;
import com.github.ontio.util.Helper;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.hibernate.validator.constraints.Length;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;

Expand Down Expand Up @@ -100,4 +104,13 @@ public BigDecimal queryNativeTotalCirculatingSupply(@PathVariable String token)
return rs;
}

@ApiOperation(value = "Get ONT,ONG total supply")
@GetMapping(value = "/v2/summary/native/total-supply/{token}")
public BigDecimal queryNativeTotalSupply(@PathVariable String token) {
if (ConstantParam.ONT.equalsIgnoreCase(token) || ConstantParam.ONG.equalsIgnoreCase(token)) {
return new BigDecimal("1000000000");
} else {
return null;
}
}
}

0 comments on commit 8960189

Please sign in to comment.