Skip to content

Validator stack - Running Workers tick & inserting events #454

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 28 commits into from
Nov 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
5bf771c
validator_worker - running app with Worker struct
elpiel Nov 4, 2021
01a037c
sentry - Application::run
elpiel Nov 4, 2021
2b35f5d
test_harness - leader & follower Workers tick
elpiel Nov 4, 2021
a83b658
Merge branch 'validator-test-kit' into validator-stack-testcases
elpiel Nov 4, 2021
b643b44
Merge branch 'aip-61-adex-v5' into validator-stack-testcases
elpiel Nov 15, 2021
3da22f1
worker - SentryApi - new struct API
elpiel Nov 15, 2021
e650095
worker - leader - On empty acc. don't create NewState
elpiel Nov 15, 2021
e841f00
sentry - fix routing for v5
elpiel Nov 15, 2021
36bc322
sentry - campaign routes - include `0x` when matching
elpiel Nov 15, 2021
9796cd4
ganache - add additional addresses
elpiel Nov 18, 2021
e8dfebd
sentry - access - remove old commented out tests
elpiel Nov 18, 2021
7c1bdf0
primitives - impl TryFrom<&[u8; 42]> for Address
elpiel Nov 18, 2021
0d4f5a4
primitives - mod test_util
elpiel Nov 18, 2021
d0f8cc6
primitives - impl From<&Lazy<Address>> for ValidatorId
elpiel Nov 18, 2021
1638300
sentry - spender - calculate_fee tests
elpiel Nov 18, 2021
9275b8d
adapter - keystore file names use checksum addresses
elpiel Nov 18, 2021
1c87423
small improvements, comments & doc comments
elpiel Nov 19, 2021
dd95361
test_harness - Cargo - add test-util for primitives
elpiel Nov 19, 2021
ad912f8
Update snapshot contracts & ganache.toml contract addresses
elpiel Nov 19, 2021
8d31b44
adapter - enable `test-util` for `primitives`
elpiel Nov 19, 2021
8085550
primitives - Balances.spend only for CheckedState
elpiel Nov 19, 2021
a481760
test_harness - Accounting check after events payout
elpiel Nov 19, 2021
126b3e9
worker - SentryApi - move collect_channels
elpiel Nov 19, 2021
6f3092d
sentry - Cargo - test-util enables primitives/test-util
elpiel Nov 22, 2021
95a687b
update submodule adex-protocol-eth
elpiel Nov 22, 2021
6ef5746
Merge branch 'aip-61-adex-v5' into ethereum-adapter-changes
elpiel Nov 22, 2021
7b74007
Merge pull request #459 from AmbireTech/ethereum-adapter-changes
elpiel Nov 22, 2021
c6e9d09
PR review fixes
elpiel Nov 22, 2021
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
2 changes: 2 additions & 0 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion adapter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ edition = "2021"

[features]

test-util = []
test-util = ["primitives/test-util"]

[dependencies]
primitives = { path = "../primitives" }
Expand Down
11 changes: 7 additions & 4 deletions adapter/src/ethereum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,10 @@ mod test {
use super::test_util::*;
use super::*;
use chrono::Utc;
use primitives::{config::DEVELOPMENT_CONFIG, util::tests::prep_db::IDS};
use primitives::{
config::DEVELOPMENT_CONFIG,
test_util::{CREATOR, IDS, LEADER},
};
use web3::{transports::Http, Web3};
use wiremock::{
matchers::{method, path},
Expand Down Expand Up @@ -636,7 +639,7 @@ mod test {
async fn get_deposit_and_count_create2_when_min_tokens_received() {
let web3 = Web3::new(Http::new(GANACHE_URL).expect("failed to init transport"));

let leader_account = GANACHE_ADDRESSES["leader"];
let leader_account = *LEADER;

// deploy contracts
let token = deploy_token_contract(&web3, 1_000)
Expand All @@ -652,7 +655,7 @@ mod test {
.await
.expect("Correct parameters are passed to the OUTPACE constructor.");

let spender = GANACHE_ADDRESSES["creator"];
let spender = *CREATOR;

let channel = get_test_channel(token_address);

Expand Down Expand Up @@ -693,7 +696,7 @@ mod test {
{
mock_set_balance(
&token.2,
*GANACHE_ADDRESSES["leader"].as_bytes(),
*LEADER.as_bytes(),
*spender.as_bytes(),
&BigNum::from(10_000),
)
Expand Down
149 changes: 25 additions & 124 deletions adapter/src/ethereum/test_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use primitives::{
adapter::KeystoreOptions,
channel::{Channel, Nonce},
config::TokenInfo,
test_util::{ADVERTISER, CREATOR, FOLLOWER, GUARDIAN, GUARDIAN_2, LEADER, PUBLISHER},
Address, BigNum, Config, ValidatorId,
};

Expand Down Expand Up @@ -48,129 +49,41 @@ pub static KEYSTORE_IDENTITY: Lazy<(Address, KeystoreOptions)> = Lazy::new(|| {
(address, keystore_options("keystore.json", "adexvalidator"))
});

pub static GANACHE_KEYSTORES: Lazy<HashMap<String, (Address, KeystoreOptions)>> = Lazy::new(|| {
pub static KEYSTORES: Lazy<HashMap<Address, KeystoreOptions>> = Lazy::new(|| {
vec![
(
"guardian".to_string(),
(
"0xDf08F82De32B8d460adbE8D72043E3a7e25A3B39"
.parse()
.expect("Valid Address"),
keystore_options(
"0xDf08F82De32B8d460adbE8D72043E3a7e25A3B39_keystore.json",
"address0",
),
),
),
(
"leader".to_string(),
(
"0x5a04A8fB90242fB7E1db7d1F51e268A03b7f93A5"
.parse()
.expect("Valid Address"),
keystore_options(
"0x5a04A8fB90242fB7E1db7d1F51e268A03b7f93A5_keystore.json",
"address1",
),
),
),
(
"follower".to_string(),
(
"0xe3896ebd3F32092AFC7D27e9ef7b67E26C49fB02"
.parse()
.expect("Valid Address"),
keystore_options(
"0xe3896ebd3F32092AFC7D27e9ef7b67E26C49fB02_keystore.json",
"address2",
),
),
),
(
"creator".to_string(),
(
"0x0E45891a570Af9e5A962F181C219468A6C9EB4e1"
.parse()
.expect("Valid Address"),
keystore_options(
"0x0E45891a570Af9e5A962F181C219468A6C9EB4e1_keystore.json",
"address3",
),
),
),
(
"advertiser".to_string(),
(
"0x8c4B95383a46D30F056aCe085D8f453fCF4Ed66d"
.parse()
.expect("Valid Address"),
keystore_options(
"0x8c4B95383a46D30F056aCe085D8f453fCF4Ed66d_keystore.json",
"address4",
),
),
),
(
"guardian2".to_string(),
(
"0x1059B025E3F8b8f76A8120D6D6Fd9fBa172c80b8"
.parse()
.expect("Valid Address"),
keystore_options(
"0x1059B025E3F8b8f76A8120D6D6Fd9fBa172c80b8_keystore.json",
"address5",
),
),
*LEADER,
keystore_options(&format!("{}_keystore.json", *LEADER), "ganache0"),
),
]
.into_iter()
.collect()
});

/// Addresses generated on local running `ganache` for testing purposes.
/// see the `ganache-cli.sh` script in the repository
pub static GANACHE_ADDRESSES: Lazy<HashMap<String, Address>> = Lazy::new(|| {
vec![
(
"guardian".to_string(),
"0xDf08F82De32B8d460adbE8D72043E3a7e25A3B39"
.parse()
.expect("Valid Address"),
*FOLLOWER,
keystore_options(&format!("{}_keystore.json", *FOLLOWER), "ganache1"),
),
(
"leader".to_string(),
"0x5a04A8fB90242fB7E1db7d1F51e268A03b7f93A5"
.parse()
.expect("Valid Address"),
*GUARDIAN,
keystore_options(&format!("{}_keystore.json", *GUARDIAN), "ganache2"),
),
(
"follower".to_string(),
"0xe3896ebd3F32092AFC7D27e9ef7b67E26C49fB02"
.parse()
.expect("Valid Address"),
*CREATOR,
keystore_options(&format!("{}_keystore.json", *CREATOR), "ganache3"),
),
(
"creator".to_string(),
"0x0E45891a570Af9e5A962F181C219468A6C9EB4e1"
.parse()
.expect("Valid Address"),
*ADVERTISER,
keystore_options(&format!("{}_keystore.json", *ADVERTISER), "ganache4"),
),
(
"advertiser".to_string(),
"0x8c4B95383a46D30F056aCe085D8f453fCF4Ed66d"
.parse()
.expect("Valid Address"),
*PUBLISHER,
keystore_options(&format!("{}_keystore.json", *PUBLISHER), "ganache5"),
),
(
"guardian2".to_string(),
"0x1059B025E3F8b8f76A8120D6D6Fd9fBa172c80b8"
.parse()
.expect("Valid Address"),
*GUARDIAN_2,
keystore_options(&format!("{}_keystore.json", *GUARDIAN_2), "ganache6"),
),
]
.into_iter()
.collect()
});

/// Local `ganache` is running at:
pub const GANACHE_URL: &str = "http://localhost:8545";

Expand All @@ -193,9 +106,9 @@ fn keystore_options(file_name: &str, password: &str) -> KeystoreOptions {

pub fn get_test_channel(token_address: Address) -> Channel {
Channel {
leader: ValidatorId::from(&GANACHE_ADDRESSES["leader"]),
follower: ValidatorId::from(&GANACHE_ADDRESSES["follower"]),
guardian: GANACHE_ADDRESSES["advertiser"],
leader: ValidatorId::from(&LEADER),
follower: ValidatorId::from(&FOLLOWER),
guardian: *GUARDIAN,
token: token_address,
nonce: Nonce::from(12345_u32),
}
Expand Down Expand Up @@ -251,7 +164,7 @@ pub async fn sweeper_sweep(
channel: &Channel,
depositor: [u8; 20],
) -> web3::contract::Result<H256> {
let from_leader_account = H160(*GANACHE_ADDRESSES["leader"].as_bytes());
let from_leader_account = H160(*LEADER.as_bytes());

sweeper_contract
.call(
Expand Down Expand Up @@ -281,11 +194,7 @@ pub async fn deploy_sweeper_contract(
opt.gas_price = Some(1.into());
opt.gas = Some(6_721_975.into());
}))
.execute(
*SWEEPER_BYTECODE,
(),
H160(GANACHE_ADDRESSES["leader"].to_bytes()),
)
.execute(*SWEEPER_BYTECODE, (), H160(LEADER.to_bytes()))
.await?;

let sweeper_address = Address::from(sweeper_contract.address().to_fixed_bytes());
Expand All @@ -304,18 +213,14 @@ pub async fn deploy_outpace_contract(
opt.gas_price = Some(1.into());
opt.gas = Some(6_721_975.into());
}))
.execute(
*OUTPACE_BYTECODE,
(),
H160(GANACHE_ADDRESSES["leader"].to_bytes()),
)
.execute(*OUTPACE_BYTECODE, (), H160(LEADER.to_bytes()))
.await?;
let outpace_address = Address::from(outpace_contract.address().to_fixed_bytes());

Ok((outpace_address, outpace_contract))
}

/// Deploys the Mock Token contract from `GANACHE_ADDRESS['leader']`
/// Deploys the Mock Token contract from [`LEADER`]
pub async fn deploy_token_contract(
web3: &Web3<Http>,
min_token_units: u64,
Expand All @@ -327,11 +232,7 @@ pub async fn deploy_token_contract(
opt.gas_price = Some(1.into());
opt.gas = Some(6_721_975.into());
}))
.execute(
*MOCK_TOKEN_BYTECODE,
(),
H160(GANACHE_ADDRESSES["leader"].to_bytes()),
)
.execute(*MOCK_TOKEN_BYTECODE, (), H160(LEADER.to_bytes()))
.await?;

let token_info = TokenInfo {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"address":"0e880972a4b216906f05d67eeaaf55d16b5ee4f1","crypto":{"cipher":"aes-128-ctr","ciphertext":"a6517c853f41d70892195c2d49b6bf9cb70b28714df9148a2115422582ed71a7","cipherparams":{"iv":"29a072ed18b810e36461a4dafa3b8816"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"4647c8d015db3c67db397f291c13440b5a657f391470d02568c797d22252ee19"},"mac":"b9a6db84659a13b0d895418a9cff0a2b7b5f671ece4ea5c58b3c6cb403ad5a13"},"id":"be2aa04b-63d8-48ac-8d3b-3ed09a9d88b1","version":3}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"address":"541b401362ea1d489d322579552b099e801f3632","crypto":{"cipher":"aes-128-ctr","ciphertext":"3bd972f8844c918ec26bdd4d3f8d22d9fe2f9d3451147ba938e343d927345d4f","cipherparams":{"iv":"5487bbad4c2b80bf3a92ecf7f28226ce"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"63a4ede118e5df870aafe733b209449ca8a68ba4e0996b95b6a2f35a527772cf"},"mac":"480b35a4cca3029ec50eb9179f192b8535f285b5f0eea4f36ca020109da73953"},"id":"b6be20d9-2e37-44fd-ad66-ac0c35433367","version":3}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"address":"6b83e7d6b72c098d48968441e0d05658dc17adb9","crypto":{"cipher":"aes-128-ctr","ciphertext":"858809639fa1dbf62e75b4169cdc5943b5f45303bfe9b951521fc6693b1ce9a8","cipherparams":{"iv":"61bdcc7b9cd9d89fa96c56d9bff89f93"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"d5ecc7916286c175e8577282cd04ed261cce572f53a2a2305265025104a867c2"},"mac":"7796fbe5bd53dffb3e950f33cf925b4e514deb36f53aa2bc4168121172202dd7"},"id":"2a72e9cf-2641-452d-85f5-3a24cc4b3639","version":3}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"address":"79d358a3194d737880b3efd94adccd246af9f535","crypto":{"cipher":"aes-128-ctr","ciphertext":"7476b220ad1319f5529db288ff3d28714036a08d4cbc8b4773576bbd441335f1","cipherparams":{"iv":"f1abaecd7c61b9a618e9d554f29663ab"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"de714bab560d07fa3c0fd65c91017c9f299ff81ba5452230efc992c8a45953c6"},"mac":"7859828865cf7475a406f3316a06484a19ca4731425ba32d69732b8669ab656a"},"id":"b3104849-29e1-4ae7-9f35-9d9416ecf800","version":3}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"address":"80690751969b234697e9059e04ed72195c3507fa","crypto":{"cipher":"aes-128-ctr","ciphertext":"c2634ba60e6e06ecb93cc86cd01acaba46f20f6c0a8d0e7ee2369fc395d1e1da","cipherparams":{"iv":"59d357b9fc87ef7ca49cbdc05bb4d45a"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"044091f31212d7fcfe76cf1a900e809cbd2ffbde27d792f094217855194c3033"},"mac":"94b10daeec744c1ec9a420c87ba932ddd3d64eb91fe665ed38d8971c47baedcc"},"id":"6c42b310-341a-44d1-b878-4487820aa67c","version":3}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"address":"dd589b43793934ef6ad266067a0d1d4896b0dff0","crypto":{"cipher":"aes-128-ctr","ciphertext":"c4098713be826e80f96def36c6c8712dde7d6d3e955041b266e6efff9130e94b","cipherparams":{"iv":"4650dad28bfb0d9004c289e9c449dfa9"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"072411161330f562f46a2acff9114cc6ed6d6e93e21b80cbb294ba5a2cc9663c"},"mac":"3e31a0891954b63590c9f94c626b5ecc555f96c4c6a50a5b9b90d84400ab40b4"},"id":"5cb4f686-fa3f-4aa6-a43b-ea413f37f5aa","version":3}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"address":"e882ebf439207a70ddccb39e13ca8506c9f45fd9","crypto":{"cipher":"aes-128-ctr","ciphertext":"c2458d5ac69b72af7232e037a4cbda13f6c12b84ec28fba2a234e7a799ee6938","cipherparams":{"iv":"473f47d68e8d81ef61800fe49575a4b4"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"37836aae8dcbf65925f7d72c211caea16fc9e66c545ed5f4d53ee078d5322af0"},"mac":"9f77532bb970ed2a2007bb79e98cfc773a823308b49cc016ac37f8dfd20791f1"},"id":"7f46e65b-3fe0-4c89-8096-9ae1ee13fb52","version":3}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"address":"acbada2d5830d1875ae3d2de207a1363b316df2f","crypto":{"cipher":"aes-128-ctr","ciphertext":"a0d31409ed0b0d7645184f9af9e1c604b496ab2723e937fa1041b0c2c1bf9039","cipherparams":{"iv":"162a6071a0a9d14a478aaec1651fff5d"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"0a9959172a7dfa8b2a9d991dcc807a1487710b8db4baea9cd94a013979d84d1c"},"mac":"123b89889ce16f8388b807d3b8edc9930533ce9f7283092b1f4a2e8e5c8e2b71"},"id":"9ff0e2f0-b047-4665-9739-c1f23c675921","version":3}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"address":"e061e1eb461eabe512759aa18a201b20fe90631d","crypto":{"cipher":"aes-128-ctr","ciphertext":"2933df95448d0e38f7e1131470ab34ad3594c0350fa2aa609624e5f07ec0c234","cipherparams":{"iv":"3ce58291f69c56c12f82f4100db59f42"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"5c436a526de371d88ec969863c69fd2609343346518df7129db2ad42c57bc60a"},"mac":"bf3376d3b15faddc9ffbfd7bbac786879d0f915b37129290972f67d3c6843e6f"},"id":"ef2cf869-65fd-42d1-99dd-1cb5f0c62db6","version":3}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"address":"f3f583aec5f7c030722fe992a5688557e1b86ef7","crypto":{"cipher":"aes-128-ctr","ciphertext":"344d7cc0938dd957f26d051faf4a2bb1e2218c6a0e4bc34ff4a82a186bbdac64","cipherparams":{"iv":"5f21cb8d89daa243b1bc654754a35ec2"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"dfd642d19d7a7f1628e3d008b6567e3993c44b2109112ef3708a4ccd91e08bee"},"mac":"168df507bd8bb1de7bd09cf821dac0e3c1c2e4c099a77febb5255c2df537a449"},"id":"ef8571f7-a68a-4c6b-a595-78c4ec928908","version":3}
12 changes: 0 additions & 12 deletions docker-compose.yml

This file was deleted.

12 changes: 6 additions & 6 deletions docs/config/ganache.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ ip_rate_limit = { type = 'ip', timeframe = 1200000 }
sid_rate_limit = { type = 'sid', timeframe = 0 }

# Ganache Snapshot address
outpace_address = '0xcb097e455b7159f902e2eb45562fc397ae6b0f3d'
outpace_address = '0xabc27d46a458e2e49dabfef45ca74dedbac3dd06'
# Ganache Snapshot address
sweeper_address = '0xdd41b0069256a28972458199a3c9cf036384c156'
sweeper_address = '0x7dd57c0324284102a757153e18f2cb1acdb7d2bd'

ethereum_network = 'http://localhost:8545'
# Mocked relayer
Expand All @@ -45,11 +45,11 @@ validators_whitelist = []

[[token_address_whitelist]]
# Mocked TOKEN
address = '0x9db7bff788522dbe8fa2e8cbd568a58c471ccd5e'
address = '0x2bcaf6968aec8a3b5126fbfab5fd419da6e8ad8e'
# 1 * 10^18 = 1.0000 TOKEN
min_token_units_for_deposit = '1000000000000000000'
# multiplier = 10^14 - 10^18 (token precision) = 10^-4
# min_validator_fee = 1 * 10^-4 = 0.000_1
min_validator_fee = '100000000000000'
# multiplier = 10^13 - 10^18 (token precision) = 10^-5
# min_validator_fee = 1 * 10^-5 = 0.000_01
min_validator_fee = '10000000000000'
precision = 18

2 changes: 1 addition & 1 deletion lib/protocol-eth
Submodule protocol-eth updated 66 files
+23 −7 README.md
+1 −0 abi/Identity5.2.json
+1 −0 abi/IdentityFactory5.2.json
+1 −0 abi/QuickAccManager.json
+1 −0 abi/RemainingBalancesOracle.json
+ audits/Ambire Contest — Code 423n4.pdf
+15 −4 build.sh
+18 −0 contracts/DeployAmbire.sol
+1 −1 contracts/Guardian.sol
+78 −76 contracts/Identity.sol
+49 −14 contracts/IdentityFactory.sol
+1 −1 contracts/Migrations.sol
+1 −1 contracts/OUTPACE.sol
+1 −1 contracts/StakingPool.sol
+1 −1 contracts/SupplyController.sol
+2 −2 contracts/adx/ADXLoyaltyPool.sol
+2 −2 contracts/adx/ADXToken.sol
+1 −1 contracts/deposits/Depositor.sol
+1 −1 contracts/deposits/Sweeper.sol
+2 −2 contracts/extra/ADXFlashLoans.sol
+1 −1 contracts/extra/ADXLoyaltyArbitrage.sol
+1 −1 contracts/extra/AdExENSRegistrar.sol
+1 −1 contracts/extra/Gasless.sol
+1 −1 contracts/extra/StakingMigrator.sol
+1 −1 contracts/interfaces/IADXToken.sol
+1 −1 contracts/interfaces/IERC20.sol
+1 −1 contracts/interfaces/IStakingPool.sol
+48 −0 contracts/libs/BytesLib.sol
+1 −1 contracts/libs/MerkleProof.sol
+1 −1 contracts/libs/SafeERC20.sol
+1 −1 contracts/libs/SignatureValidator.sol
+65 −0 contracts/libs/SignatureValidatorV2.sol
+1 −1 contracts/mocks/BadToken.sol
+1 −1 contracts/mocks/Libs.sol
+1 −1 contracts/mocks/MockChainlink.sol
+1 −1 contracts/mocks/MockUniswap.sol
+1 −1 contracts/mocks/Token.sol
+1 −1 contracts/mocks/WorstToken.sol
+206 −0 contracts/wallet/QuickAccManager.sol
+41 −0 contracts/wallet/RemainingBalancesOracle.sol
+40 −19 contracts/wallet/Zapper.sol
+227 −0 js/Bundle.js
+0 −98 js/Identity.js
+42 −84 js/IdentityProxyDeploy.js
+8 −4 js/index.js
+0 −5 js/solc.js
+0 −42 migrations/1_initial_migration.js
+1,045 −939 package-lock.json
+2 −2 package.json
+1 −1 resources/bytecode/Depositor.bin
+1 −1 resources/bytecode/Depositor.json
+1 −0 resources/bytecode/Identity5.2.bin
+1 −0 resources/bytecode/Identity5.2.json
+1 −1 resources/bytecode/OUTPACE.bin
+1 −1 resources/bytecode/OUTPACE.json
+1 −1 resources/bytecode/Sweeper.bin
+1 −1 resources/bytecode/Sweeper.json
+5 −6 test/TestADXToken.js
+171 −83 test/TestIdentity.js
+4 −4 test/TestLoyaltyPool.js
+1 −1 test/TestOutpace.js
+12 −18 test/TestStakingPool.js
+18 −14 truffle-config.js
+169 −0 v4/contracts/Identityv4.2.sol
+0 −0 v4/test/TestADXFlashLoans.js
+0 −0 v4/test/simulate.js
3 changes: 3 additions & 0 deletions primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ edition = "2021"

[features]
postgres = ["bytes", "tokio-postgres", "deadpool-postgres"]
# Enables the testing utilities like addresses, dummy Campaigns, Validators, IPFSes, AdUnits, etc.
# All Addresses and keystore files exist in the ganache-cli setup for testing with the EthereumAdapter
test-util = []

[dependencies]
# (De)Serialization
Expand Down
Loading