etherisc / depeg-contracts Goto Github PK
View Code? Open in Web Editor NEWDepeg Insurance Product Contracts
License: Apache License 2.0
Depeg Insurance Product Contracts
License: Apache License 2.0
>>> instSrv.getClaim('0x44668814f7c4d7fd37a1aa2687904cbdf5fcc63e7849b8e639cc3bd94cb0f559', 0)
(3, 50000000, 50000000, 0x0000000000000000000000000000000000000000000000000000000005e69ec00000000000000000000000000000000000000000000000000000000063eba036, 1676386518, 1676386530)
>>> instSrv.getPayout('0x44668814f7c4d7fd37a1aa2687904cbdf5fcc63e7849b8e639cc3bd94cb0f559', 0);
(0, 1, 50000000, 0x, 1676386530, 1676386530)
>>> instSrv.getPolicy('0x44668814f7c4d7fd37a1aa2687904cbdf5fcc63e7849b8e639cc3bd94cb0f559')
(2, 9588888, 9588888, 1, 0, 5000000000, 50000000, 1676386258, 1676386530)
>>> usd2.balanceOf('0xA3C552FA4756dd343394785283923bE2f27f8814')
0
applyForNewPolicy
for one of the staked bundles but the values would also match with the latest (unstaked bundle)-> policy was added to the unstaked bundle
Mac OS
Firefox
Metamask
Risk bundle created at 03:38:47 PM
Risk bundle closed at 03:51:37 PM, ~770 sec passed since creation -> ~2.75 DIP as rewards
Risk bundle burned at 03:52:59 PM, ~ 852 sec passed since creation -> ~3.04 DIP as rewards
DIP rewards claimed at 04:59:31 PM, ~4844 sec passed since creation -> ~17.28 DIP as rewards
~15.86 DIP as rewards obtained
Mac OS
Safari
Metamask
.env file missing to run tests. one option would be to add an empty .env file in gif-contracts.
tests/conftest.py:99:
substring = 'gif-contracts'
def get_package(substring: str):
for dependency in config[CONFIG_DEPENDENCIES]:
if substring in dependency:
print("using package '{}' for '{}'".format(
dependency,
substring))
return project.load(dependency, raise_if_loaded=False)
E ValueError: Dotenv specified in config but not found at path: /home/runner/.brownie/packages/etherisc/gif-contracts@0a64b7e/.env
the ui needs those values to show information.
additional to best quote option
also see etherisc/depeg-ui#221
currently its fixed to 7.6.0 due to an issue in 7.7.0.
When version > 7.7.0 is released, try its it works again.
FAILED tests/test_policy_lifecycle.py::test_happy_path - brownie.exceptions.VirtualMachineError: revert: ERC721: invalid token ID```
is
function applyForPolicy(
uint256 sumInsured,
uint256 duration,
uint256 maxPremium
)
should
function applyForPolicy(
address insuredWallet,
uint256 sumInsured,
uint256 duration,
uint256 maxPremium
)
This is required for debugging purposes. Could be useful to show in the ui too.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.