Skip to content

Commit

Permalink
Adding Chainalysis Oracle contract (#2442)
Browse files Browse the repository at this point in the history
# Description
First step of enforcing an on-chain registry of banned users. This
contract is going to be used in the following PR to check addresses
which aren't allowed to place orders.

# Changes
- [x] Vendor and build contract artefacts

## How to test
CI
  • Loading branch information
fleupold authored Feb 28, 2024
1 parent 9164d2b commit 77deee8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions crates/contracts/artifacts/ChainalysisOracle.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"abi":[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"addr","type":"address"}],"name":"NonSanctionedAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"addr","type":"address"}],"name":"SanctionedAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"addrs","type":"address[]"}],"name":"SanctionedAddressesAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"addrs","type":"address[]"}],"name":"SanctionedAddressesRemoved","type":"event"},{"inputs":[{"internalType":"address[]","name":"newSanctions","type":"address[]"}],"name":"addToSanctionsList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isSanctioned","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isSanctionedVerbose","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"removeSanctions","type":"address[]"}],"name":"removeFromSanctionsList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]}
5 changes: 5 additions & 0 deletions crates/contracts/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,11 @@ fn main() {
builder.add_network_str(SEPOLIA, "0x86dcd3293C53Cf8EFd7303B57beb2a3F671dDE98")
});

// Chainalysis oracle for sanctions screening
generate_contract_with_config("ChainalysisOracle", |builder| {
builder.add_network_str(MAINNET, "0x40C57923924B5c5c5455c48D93317139ADDaC8fb")
});

// Support contracts used for trade and token simulations.
generate_contract("Trader");
generate_contract("Solver");
Expand Down
6 changes: 5 additions & 1 deletion crates/contracts/src/bin/vendor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,11 @@ fn run() -> Result<()> {
.github(
"ISwaprPair",
"levelkdev/dxswap-core/3511bab996096f9c9c9bc3af0d94222650fd1e40/build/IDXswapPair.json",
)?;
)?
.manual(
"ChainalysisOracle",
"Chainalysis does not publish its code",
);

Ok(())
}
Expand Down
1 change: 1 addition & 0 deletions crates/contracts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ include_contracts! {
IUniswapV3Factory;
IZeroEx;
PancakeRouter;
ChainalysisOracle;
SushiSwapRouter;
SwaprRouter;
TestnetUniswapV2Router02;
Expand Down

0 comments on commit 77deee8

Please sign in to comment.