Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,343 changes: 2,217 additions & 126 deletions djed-sdk/dist/esm/index.js

Large diffs are not rendered by default.

2,357 changes: 2,232 additions & 125 deletions djed-sdk/dist/umd/index.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion djed-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"main": "dist/umd/index.js",
"module": "dist/esm/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"build": "rollup -c",
"prepare": "npm run build"
},
"keywords": [],
"author": "",
Expand Down
1 change: 1 addition & 0 deletions djed-sdk/src/artifacts/API3OracleABI.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"abi":[{"type":"constructor","inputs":[{"name":"_proxyAddress","type":"address","internalType":"address"},{"name":"_api3Decimals","type":"uint256","internalType":"uint256"},{"name":"_decimals","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptTermsOfService","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"proxyAddress","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"type":"function","name":"readData","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"scalingFactor","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"}]}
1 change: 1 addition & 0 deletions djed-sdk/src/artifacts/ChainlinkOracleABI.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"abi":[{"type":"constructor","inputs":[{"name":"_dataFeedAddress","type":"address","internalType":"address"},{"name":"_decimals","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"acceptTermsOfService","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"readData","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"scalingFactor","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"}]}
61 changes: 61 additions & 0 deletions djed-sdk/src/artifacts/DjedIsisABI.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"contractName": "Djed",
"abi": [
{
"inputs": [
{ "internalType": "address", "name": "oracleAddress", "type": "address" },
{ "internalType": "uint256", "name": "_scalingFactor", "type": "uint256" },
{ "internalType": "address", "name": "_treasury", "type": "address" },
{ "internalType": "uint256", "name": "_initialTreasuryFee", "type": "uint256" },
{ "internalType": "uint256", "name": "_treasuryRevenueTarget", "type": "uint256" },
{ "internalType": "uint256", "name": "_reserveRatioMin", "type": "uint256" },
{ "internalType": "uint256", "name": "_reserveRatioMax", "type": "uint256" },
{ "internalType": "uint256", "name": "_fee", "type": "uint256" },
{ "internalType": "uint256", "name": "_thresholdSupplySC", "type": "uint256" },
{ "internalType": "uint256", "name": "_rcMinPrice", "type": "uint256" },
{ "internalType": "uint256", "name": "_txLimit", "type": "uint256" }
],
"stateMutability": "payable",
"type": "constructor"
},
{ "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "buyer", "type": "address" }, { "indexed": true, "internalType": "address", "name": "receiver", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amountRC", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "amountBC", "type": "uint256" }], "name": "BoughtReserveCoins", "type": "event" },
{ "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "buyer", "type": "address" }, { "indexed": true, "internalType": "address", "name": "receiver", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amountSC", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "amountBC", "type": "uint256" }], "name": "BoughtStableCoins", "type": "event" },
{ "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "seller", "type": "address" }, { "indexed": true, "internalType": "address", "name": "receiver", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amountSC", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "amountRC", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "amountBC", "type": "uint256" }], "name": "SoldBothCoins", "type": "event" },
{ "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "seller", "type": "address" }, { "indexed": true, "internalType": "address", "name": "receiver", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amountRC", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "amountBC", "type": "uint256" }], "name": "SoldReserveCoins", "type": "event" },
{ "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "seller", "type": "address" }, { "indexed": true, "internalType": "address", "name": "receiver", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amountSC", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "amountBC", "type": "uint256" }], "name": "SoldStableCoins", "type": "event" },
{ "inputs": [{ "internalType": "uint256", "name": "_currentPaymentAmount", "type": "uint256" }], "name": "E", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
{ "inputs": [], "name": "L", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
{ "inputs": [{ "internalType": "uint256", "name": "_currentPaymentAmount", "type": "uint256" }], "name": "R", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
{ "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "address", "name": "receiver", "type": "address" }, { "internalType": "uint256", "name": "fee_ui", "type": "uint256" }, { "internalType": "address", "name": "ui", "type": "address" }], "name": "buyReserveCoins", "outputs": [], "stateMutability": "nonpayable", "type": "function" },
{ "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "address", "name": "receiver", "type": "address" }, { "internalType": "uint256", "name": "feeUI", "type": "uint256" }, { "internalType": "address", "name": "ui", "type": "address" }], "name": "buyStableCoins", "outputs": [], "stateMutability": "nonpayable", "type": "function" },
{ "inputs": [], "name": "fee", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
{ "inputs": [], "name": "initialTreasuryFee", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
{ "inputs": [], "name": "oracle", "outputs": [{ "internalType": "contract IFreeOracle", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" },
{ "inputs": [], "name": "ratio", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
{ "inputs": [{ "internalType": "uint256", "name": "_currentPaymentAmount", "type": "uint256" }], "name": "rcBuyingPrice", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
{ "inputs": [], "name": "rcDecimalScalingFactor", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
{ "inputs": [], "name": "rcMinPrice", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
{ "inputs": [{ "internalType": "uint256", "name": "_currentPaymentAmount", "type": "uint256" }], "name": "rcTargetPrice", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
{ "inputs": [], "name": "reserveCoin", "outputs": [{ "internalType": "contract Coin", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" },
{ "inputs": [], "name": "reserveRatioMax", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
{ "inputs": [], "name": "reserveRatioMin", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
{ "inputs": [], "name": "scDecimalScalingFactor", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
{ "inputs": [{ "internalType": "uint256", "name": "_currentPaymentAmount", "type": "uint256" }], "name": "scPrice", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
{ "inputs": [], "name": "scalingFactor", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
{ "inputs": [{ "internalType": "uint256", "name": "amountSC", "type": "uint256" }, { "internalType": "uint256", "name": "amountRC", "type": "uint256" }, { "internalType": "address", "name": "receiver", "type": "address" }, { "internalType": "uint256", "name": "fee_ui", "type": "uint256" }, { "internalType": "address", "name": "ui", "type": "address" }], "name": "sellBothCoins", "outputs": [], "stateMutability": "nonpayable", "type": "function" },
{ "inputs": [{ "internalType": "uint256", "name": "amountRC", "type": "uint256" }, { "internalType": "address", "name": "receiver", "type": "address" }, { "internalType": "uint256", "name": "fee_ui", "type": "uint256" }, { "internalType": "address", "name": "ui", "type": "address" }], "name": "sellReserveCoins", "outputs": [], "stateMutability": "nonpayable", "type": "function" },
{ "inputs": [{ "internalType": "uint256", "name": "amountSC", "type": "uint256" }, { "internalType": "address", "name": "receiver", "type": "address" }, { "internalType": "uint256", "name": "feeUI", "type": "uint256" }, { "internalType": "address", "name": "ui", "type": "address" }], "name": "sellStableCoins", "outputs": [], "stateMutability": "nonpayable", "type": "function" },
{ "inputs": [], "name": "stableCoin", "outputs": [{ "internalType": "contract Coin", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" },
{ "inputs": [], "name": "thresholdSupplySC", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
{ "inputs": [], "name": "treasury", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" },
{ "inputs": [], "name": "treasuryFee", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
{ "inputs": [], "name": "treasuryRevenue", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
{ "inputs": [], "name": "treasuryRevenueTarget", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
{ "inputs": [], "name": "txLimit", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
{ "inputs": [{ "internalType": "uint256", "name": "_currentPaymentAmount", "type": "uint256" }], "name": "scMaxPrice", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
{ "inputs": [{ "internalType": "uint256", "name": "_currentPaymentAmount", "type": "uint256" }], "name": "scMinPrice", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
{ "inputs": [], "name": "ratioMax", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
{ "inputs": [], "name": "ratioMin", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" },
{ "inputs": [], "name": "updateOracleValues", "outputs": [], "stateMutability": "nonpayable", "type": "function" }
]
}
Loading