Skip to content

Commit

Permalink
add agent contract support
Browse files Browse the repository at this point in the history
  • Loading branch information
CoderZhi committed Oct 2, 2022
1 parent 20ddf67 commit 63c3099
Show file tree
Hide file tree
Showing 32 changed files with 3,106 additions and 1,244 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ run:

.PHONY: docker
docker:
$(DOCKERCMD) build -t $(USER)/iotex-election:latest .
$(DOCKERCMD) build -t $(USER)/iotex-election:latest .
3 changes: 2 additions & 1 deletion contract/abigen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ abigen --abi clerk.abi --pkg contract --type Clerk --out clerk.go
abigen --abi vita.abi --pkg contract --type Vita --out vita.go
abigen --abi register.abi --pkg contract --type Register --out register.go
abigen --abi staking.abi --pkg contract --type Staking --out staking.go
abigen --abi pyggstaking.abi --pkg contract --type PyggStaking --out pyggstaking.go
abigen --abi pyggstaking.abi --pkg contract --type PyggStaking --out pyggstaking.go
abigen --abi agent.abi --pkg contract --type Agent --out agent.go
251 changes: 251 additions & 0 deletions contract/agent.abi
Original file line number Diff line number Diff line change
@@ -0,0 +1,251 @@
[
{
"inputs": [
{
"internalType": "address",
"name": "_vita",
"type": "address"
},
{
"internalType": "address",
"name": "_notary",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "AUTHENTICATION_TYPEHASH",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "DOMAIN_SEPARATOR",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "EIP712DOMAIN_TYPEHASH",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_deadline",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "_v",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "_r",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_s",
"type": "bytes32"
}
],
"name": "claim",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_owner",
"type": "address"
},
{
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_deadline",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "_v",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "_r",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_s",
"type": "bytes32"
}
],
"name": "claimFor",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "claimVita",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_user",
"type": "address"
}
],
"name": "claimed",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "wallet",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
}
],
"name": "digest",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "lastClaimCycles",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "notary",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "poolSize",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "vita",
"outputs": [
{
"internalType": "contract Vita",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
]
Loading

0 comments on commit 63c3099

Please sign in to comment.