Skip to content

Commit

Permalink
Merge pull request #112 from Itheum/d-david
Browse files Browse the repository at this point in the history
Bond contract interface implementation and validation refactoring
  • Loading branch information
damienen authored Mar 4, 2024
2 parents 0972dc1 + ba5f3d8 commit 0ef3362
Show file tree
Hide file tree
Showing 17 changed files with 1,078 additions and 378 deletions.
5 changes: 3 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@itheum/sdk-mx-data-nft",
"version": "2.7.0",
"version": "2.7.0-beta.4",
"description": "SDK for Itheum's Data NFT Technology on MultiversX Blockchain",
"main": "out/index.js",
"types": "out/index.d.js",
Expand Down
248 changes: 236 additions & 12 deletions src/abis/core-mx-life-bonding-sc.abi.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,30 @@
{
"name": "nonce",
"type": "u64"
}
],
"outputs": []
},
{
"name": "proof",
"mutability": "mutable",
"payableInTokens": [
"*"
],
"inputs": [],
"outputs": []
},
{
"name": "claimRefund",
"mutability": "mutable",
"inputs": [
{
"name": "token_identifier",
"type": "TokenIdentifier"
},
{
"name": "new_lock_period",
"type": "optional<u64>",
"multi_arg": true
"name": "nonce",
"type": "u64"
}
],
"outputs": []
Expand Down Expand Up @@ -167,21 +186,18 @@
]
},
{
"name": "getCompensations",
"name": "getCompensationBlacklist",
"mutability": "readonly",
"inputs": [
{
"name": "token_identifier",
"type": "TokenIdentifier"
},
{
"name": "nonce",
"name": "compensation_id",
"type": "u64"
}
],
"outputs": [
{
"type": "Compensation"
"type": "variadic<Address>",
"multi_result": true
}
]
},
Expand All @@ -204,6 +220,60 @@
"name": "getCompensation",
"mutability": "readonly",
"inputs": [
{
"name": "compensation_id",
"type": "u64"
}
],
"outputs": [
{
"type": "Compensation"
}
]
},
{
"name": "getCompensations",
"mutability": "readonly",
"inputs": [
{
"name": "input",
"type": "variadic<multi<TokenIdentifier,u64>>",
"multi_arg": true
}
],
"outputs": [
{
"type": "List<Compensation>"
}
]
},
{
"name": "getPagedCompensations",
"mutability": "readonly",
"inputs": [
{
"name": "start_index",
"type": "u64"
},
{
"name": "end_index",
"type": "u64"
}
],
"outputs": [
{
"type": "List<Compensation>"
}
]
},
{
"name": "getAddressRefundForCompensation",
"mutability": "readonly",
"inputs": [
{
"name": "address",
"type": "Address"
},
{
"name": "token_identifier",
"type": "TokenIdentifier"
Expand All @@ -215,7 +285,7 @@
],
"outputs": [
{
"type": "Compensation"
"type": "Option<tuple<Compensation,Option<Refund>>>"
}
]
},
Expand Down Expand Up @@ -276,6 +346,35 @@
}
]
},
{
"name": "getPagedBonds",
"mutability": "readonly",
"inputs": [
{
"name": "start_index",
"type": "u64"
},
{
"name": "end_index",
"type": "u64"
}
],
"outputs": [
{
"type": "List<Bond>"
}
]
},
{
"name": "getBondsLen",
"mutability": "readonly",
"inputs": [],
"outputs": [
{
"type": "u32"
}
]
},
{
"name": "getLockPeriodsBonds",
"mutability": "readonly",
Expand All @@ -286,6 +385,57 @@
}
]
},
{
"name": "setBlacklist",
"mutability": "mutable",
"inputs": [
{
"name": "compensation_id",
"type": "u64"
},
{
"name": "addresses",
"type": "variadic<Address>",
"multi_arg": true
}
],
"outputs": []
},
{
"name": "removeBlacklist",
"mutability": "mutable",
"inputs": [
{
"name": "compensation_id",
"type": "u64"
},
{
"name": "addresses",
"type": "variadic<Address>",
"multi_arg": true
}
],
"outputs": []
},
{
"name": "initiateRefund",
"mutability": "mutable",
"inputs": [
{
"name": "token_identifier",
"type": "TokenIdentifier"
},
{
"name": "nonce",
"type": "u64"
},
{
"name": "timestamp",
"type": "u64"
}
],
"outputs": []
},
{
"name": "sanction",
"mutability": "mutable",
Expand Down Expand Up @@ -349,6 +499,18 @@
],
"outputs": []
},
{
"name": "removeAcceptedCallers",
"mutability": "mutable",
"inputs": [
{
"name": "callers",
"type": "variadic<Address>",
"multi_arg": true
}
],
"outputs": []
},
{
"name": "setBondToken",
"mutability": "mutable",
Expand All @@ -372,6 +534,18 @@
],
"outputs": []
},
{
"name": "removePeriodsBonds",
"mutability": "mutable",
"inputs": [
{
"name": "lock_periods",
"type": "variadic<u64>",
"multi_arg": true
}
],
"outputs": []
},
{
"name": "setMinimumPenalty",
"mutability": "mutable",
Expand Down Expand Up @@ -475,12 +649,20 @@
{
"name": "bond_amount",
"type": "BigUint"
},
{
"name": "remaining_amount",
"type": "BigUint"
}
]
},
"Compensation": {
"type": "struct",
"fields": [
{
"name": "compensation_id",
"type": "u64"
},
{
"name": "token_identifier",
"type": "TokenIdentifier"
Expand All @@ -490,7 +672,32 @@
"type": "u64"
},
{
"name": "total_compenstation_amount",
"name": "accumulated_amount",
"type": "BigUint"
},
{
"name": "proof_amount",
"type": "BigUint"
},
{
"name": "end_date",
"type": "u64"
}
]
},
"EsdtTokenPayment": {
"type": "struct",
"fields": [
{
"name": "token_identifier",
"type": "TokenIdentifier"
},
{
"name": "token_nonce",
"type": "u64"
},
{
"name": "amount",
"type": "BigUint"
}
]
Expand All @@ -512,6 +719,23 @@
}
]
},
"Refund": {
"type": "struct",
"fields": [
{
"name": "address",
"type": "Address"
},
{
"name": "proof_of_refund",
"type": "EsdtTokenPayment"
},
{
"name": "compensation_id",
"type": "u64"
}
]
},
"State": {
"type": "enum",
"variants": [
Expand Down
Loading

0 comments on commit 0ef3362

Please sign in to comment.