Skip to content

Feat/v2 #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 33 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
141d911
upgraded staking contract
kahwaipd May 15, 2024
1042793
created minter contract
kahwaipd May 15, 2024
5b8a923
fixed all build errors
kahwaipd May 20, 2024
a7855d3
updated voting token
kahwaipd May 23, 2024
d5a6a99
added agent token
kahwaipd May 23, 2024
ef75207
factory is ready for first test
kahwaipd May 23, 2024
4ab9a9f
completed virtual genesis
kahwaipd May 28, 2024
f8303f6
added test cases for manual unlocking LP
kahwaipd May 29, 2024
abad2d3
added tax function on AgentToken, able to mint AgentToken on contribu…
kahwaipd Jun 5, 2024
2ea2570
done testing auto swap tax
kahwaipd Jun 5, 2024
1572b08
allow founder to withdraw stake amount > initial lock
kahwaipd Jun 6, 2024
443d951
prepare for migration
kahwaipd Jun 6, 2024
1de9190
Merge branch 'feat/reward-v2' into merge
kahwaipd Jun 6, 2024
73236ee
added migration script
kahwaipd Jun 6, 2024
d11d458
fixed virtual genesis bug
kahwaipd Jun 6, 2024
bfa2ae9
make initialLock public
kahwaipd Jun 6, 2024
2012456
reward wip
kahwaipd Jun 10, 2024
079817d
updated test cases
kahwaipd Jun 10, 2024
938bbef
wip
kahwaipd Jun 10, 2024
e5cdc4a
Merge branch 'feat/v2' into feat/reward-v2
kahwaipd Jun 10, 2024
cef413d
done distribution logic
kahwaipd Jun 11, 2024
6a9d8db
done claim reward function
kahwaipd Jun 11, 2024
2e5ce7b
completed rewards test cases
kahwaipd Jun 12, 2024
b3b469f
fixed failed test cases
kahwaipd Jun 12, 2024
5ad64be
Feat/reward v2 (#24)
kahwaipd Jun 12, 2024
83f54eb
added rewards deployment script
kahwaipd Jun 12, 2024
45efda0
upgraded migrate script
kahwaipd Jun 12, 2024
06c2fcc
update with test cases
kahwaipd Jun 13, 2024
0001e86
Merge remote-tracking branch 'origin/feat/v2' into feat/v2
kahwaipd Jun 13, 2024
bb89402
updated minter
kahwaipd Jun 13, 2024
7c2d5f1
Feat/auto execute (#27)
kahwaipd Jun 18, 2024
40b754f
Feat/v2 changes (#28)
kahwaipd Jun 19, 2024
197c72c
added migration function for agent nft
kahwaipd Jun 19, 2024
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
4,144 changes: 4,132 additions & 12 deletions .openzeppelin/base-sepolia.json

Large diffs are not rendered by default.

265 changes: 265 additions & 0 deletions AgentNft-2-storage-layout.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,265 @@
{
"storage": [
{
"astId": 20008,
"contract": "contracts/virtualPersona/AgentNft.sol:AgentNft",
"label": "coreTypes",
"offset": 0,
"slot": "0",
"type": "t_mapping(t_uint8,t_string_storage)"
},
{
"astId": 20010,
"contract": "contracts/virtualPersona/AgentNft.sol:AgentNft",
"label": "_nextCoreType",
"offset": 0,
"slot": "1",
"type": "t_uint8"
},
{
"astId": 21242,
"contract": "contracts/virtualPersona/AgentNft.sol:AgentNft",
"label": "_validatorsMap",
"offset": 0,
"slot": "2",
"type": "t_mapping(t_uint256,t_mapping(t_address,t_bool))"
},
{
"astId": 21248,
"contract": "contracts/virtualPersona/AgentNft.sol:AgentNft",
"label": "_baseValidatorScore",
"offset": 0,
"slot": "3",
"type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))"
},
{
"astId": 21253,
"contract": "contracts/virtualPersona/AgentNft.sol:AgentNft",
"label": "_validators",
"offset": 0,
"slot": "4",
"type": "t_mapping(t_uint256,t_array(t_address)dyn_storage)"
},
{
"astId": 21263,
"contract": "contracts/virtualPersona/AgentNft.sol:AgentNft",
"label": "_getScoreOf",
"offset": 0,
"slot": "5",
"type": "t_function_internal_view(t_uint256,t_address)returns(t_uint256)"
},
{
"astId": 21271,
"contract": "contracts/virtualPersona/AgentNft.sol:AgentNft",
"label": "_getMaxScore",
"offset": 8,
"slot": "5",
"type": "t_function_internal_view(t_uint256)returns(t_uint256)"
},
{
"astId": 21283,
"contract": "contracts/virtualPersona/AgentNft.sol:AgentNft",
"label": "_getPastScore",
"offset": 16,
"slot": "5",
"type": "t_function_internal_view(t_uint256,t_address,t_uint256)returns(t_uint256)"
},
{
"astId": 18899,
"contract": "contracts/virtualPersona/AgentNft.sol:AgentNft",
"label": "_nextVirtualId",
"offset": 0,
"slot": "6",
"type": "t_uint256"
},
{
"astId": 18903,
"contract": "contracts/virtualPersona/AgentNft.sol:AgentNft",
"label": "_stakingTokenToVirtualId",
"offset": 0,
"slot": "7",
"type": "t_mapping(t_address,t_uint256)"
},
{
"astId": 18947,
"contract": "contracts/virtualPersona/AgentNft.sol:AgentNft",
"label": "virtualInfos",
"offset": 0,
"slot": "8",
"type": "t_mapping(t_uint256,t_struct(VirtualInfo)20267_storage)"
},
{
"astId": 18949,
"contract": "contracts/virtualPersona/AgentNft.sol:AgentNft",
"label": "_contributionNft",
"offset": 0,
"slot": "9",
"type": "t_address"
},
{
"astId": 18951,
"contract": "contracts/virtualPersona/AgentNft.sol:AgentNft",
"label": "_serviceNft",
"offset": 0,
"slot": "10",
"type": "t_address"
}
],
"types": {
"t_address": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"t_array(t_address)dyn_storage": {
"base": "t_address",
"encoding": "dynamic_array",
"label": "address[]",
"numberOfBytes": "32"
},
"t_array(t_uint8)dyn_storage": {
"base": "t_uint8",
"encoding": "dynamic_array",
"label": "uint8[]",
"numberOfBytes": "32"
},
"t_bool": {
"encoding": "inplace",
"label": "bool",
"numberOfBytes": "1"
},
"t_function_internal_view(t_uint256)returns(t_uint256)": {
"encoding": "inplace",
"label": "function (uint256) view returns (uint256)",
"numberOfBytes": "8"
},
"t_function_internal_view(t_uint256,t_address)returns(t_uint256)": {
"encoding": "inplace",
"label": "function (uint256,address) view returns (uint256)",
"numberOfBytes": "8"
},
"t_function_internal_view(t_uint256,t_address,t_uint256)returns(t_uint256)": {
"encoding": "inplace",
"label": "function (uint256,address,uint256) view returns (uint256)",
"numberOfBytes": "8"
},
"t_mapping(t_address,t_bool)": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => bool)",
"numberOfBytes": "32",
"value": "t_bool"
},
"t_mapping(t_address,t_mapping(t_uint256,t_uint256))": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => mapping(uint256 => uint256))",
"numberOfBytes": "32",
"value": "t_mapping(t_uint256,t_uint256)"
},
"t_mapping(t_address,t_uint256)": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => uint256)",
"numberOfBytes": "32",
"value": "t_uint256"
},
"t_mapping(t_uint256,t_array(t_address)dyn_storage)": {
"encoding": "mapping",
"key": "t_uint256",
"label": "mapping(uint256 => address[])",
"numberOfBytes": "32",
"value": "t_array(t_address)dyn_storage"
},
"t_mapping(t_uint256,t_mapping(t_address,t_bool))": {
"encoding": "mapping",
"key": "t_uint256",
"label": "mapping(uint256 => mapping(address => bool))",
"numberOfBytes": "32",
"value": "t_mapping(t_address,t_bool)"
},
"t_mapping(t_uint256,t_struct(VirtualInfo)20267_storage)": {
"encoding": "mapping",
"key": "t_uint256",
"label": "mapping(uint256 => struct IAgentNft.VirtualInfo)",
"numberOfBytes": "32",
"value": "t_struct(VirtualInfo)20267_storage"
},
"t_mapping(t_uint256,t_uint256)": {
"encoding": "mapping",
"key": "t_uint256",
"label": "mapping(uint256 => uint256)",
"numberOfBytes": "32",
"value": "t_uint256"
},
"t_mapping(t_uint8,t_string_storage)": {
"encoding": "mapping",
"key": "t_uint8",
"label": "mapping(uint8 => string)",
"numberOfBytes": "32",
"value": "t_string_storage"
},
"t_string_storage": {
"encoding": "bytes",
"label": "string",
"numberOfBytes": "32"
},
"t_struct(VirtualInfo)20267_storage": {
"encoding": "inplace",
"label": "struct IAgentNft.VirtualInfo",
"members": [
{
"astId": 20257,
"contract": "contracts/virtualPersona/AgentNft.sol:AgentNft",
"label": "dao",
"offset": 0,
"slot": "0",
"type": "t_address"
},
{
"astId": 20259,
"contract": "contracts/virtualPersona/AgentNft.sol:AgentNft",
"label": "token",
"offset": 0,
"slot": "1",
"type": "t_address"
},
{
"astId": 20261,
"contract": "contracts/virtualPersona/AgentNft.sol:AgentNft",
"label": "founder",
"offset": 0,
"slot": "2",
"type": "t_address"
},
{
"astId": 20263,
"contract": "contracts/virtualPersona/AgentNft.sol:AgentNft",
"label": "tba",
"offset": 0,
"slot": "3",
"type": "t_address"
},
{
"astId": 20266,
"contract": "contracts/virtualPersona/AgentNft.sol:AgentNft",
"label": "coreTypes",
"offset": 0,
"slot": "4",
"type": "t_array(t_uint8)dyn_storage"
}
],
"numberOfBytes": "160"
},
"t_uint256": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
},
"t_uint8": {
"encoding": "inplace",
"label": "uint8",
"numberOfBytes": "1"
}
}
}
Loading