Skip to content

Commit

Permalink
Refactor oracle v2 (#36)
Browse files Browse the repository at this point in the history
* refactor oracle v2 part 1

* add signcribe

* oracle sign

* relayer relay

* test sign message

* require to import

* require

* typo

* test safe nonce

* safe nonce 1

* safe executeTransaction demo

* submit sign

* test oracle v2

* Completed oracle v2

* fix execute check

* always sign

* test

* fix wrong address

* test oracle

* update block height

* code clean

* delivery

* fix compile

* code clean

* Update oracle contract

* Update safe address

* update log

* update address

* complete relay test

* fix oracle sign

* add timeout to gplc

* update to multisig

* fix syntax

* update log

* always sign message

* fix execute

* fix execute

* fix wrong signatures

* fix oracle relay

* update integration

* resign message

* add gaslimit to relayer relay

* update sepolia rpc

* test oracle

* update oracle

* log last signature

* test

* top 10 signatures

* code clean

* improve logic

* fix wrong message root

* update sign message

* code clean

* update address and add uncaught exception check

* update code sign

* fix oracle sign

* fix oracle sign

* update follow contract

* add pangolin

* fix relay

* fix relay

* lint

---------

Co-authored-by: Guantong <[email protected]>
  • Loading branch information
fewensa and jiguantong authored Feb 6, 2024
1 parent db3da01 commit f0a913b
Show file tree
Hide file tree
Showing 75 changed files with 3,090 additions and 2,715 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ package-lock.json
dist
build
.cache

/relay
*.out
File renamed without changes.
253 changes: 253 additions & 0 deletions assets/abis/Multisig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,253 @@
[
{
"inputs": [
{
"internalType": "address[]",
"name": "signers",
"type": "address[]"
},
{
"internalType": "uint64",
"name": "threshold",
"type": "uint64"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "AddedOwner",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "threshold",
"type": "uint256"
}
],
"name": "ChangedThreshold",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "RemovedOwner",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "uint256",
"name": "_threshold",
"type": "uint256"
}
],
"name": "addOwnerWithThreshold",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_threshold",
"type": "uint256"
}
],
"name": "changeThreshold",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"name": "doneOf",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "expiration",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
},
{
"internalType": "bytes",
"name": "signatures",
"type": "bytes"
}
],
"name": "exec",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "getOwners",
"outputs": [
{
"internalType": "address[]",
"name": "",
"type": "address[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getThreshold",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "isOwner",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "prevOwner",
"type": "address"
},
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "uint256",
"name": "_threshold",
"type": "uint256"
}
],
"name": "removeOwner",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "prevOwner",
"type": "address"
},
{
"internalType": "address",
"name": "oldOwner",
"type": "address"
},
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "swapOwner",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "hash",
"type": "bytes32"
},
{
"internalType": "bytes",
"name": "signatures",
"type": "bytes"
}
],
"name": "verifySignatures",
"outputs": [],
"stateMutability": "view",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
}
]
Loading

0 comments on commit f0a913b

Please sign in to comment.