.json`.`response`.`jsonBody`
4 |
5 | > see: [\Adshares\Adserver\Http\Controllers\App\AppController::mock](/app/Http/Controllers/App/AppController.php#L69)
6 |
7 |
--------------------------------------------------------------------------------
/mocks/wallet-history_get.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "status": "349.80",
4 | "date": "Sat Feb 23 2018 12:24:00 GMT",
5 | "address": "0001-0000001F-34FC",
6 | "link": "https://etherscan.io/address/0001-0000001F-34FC"
7 | },
8 | {
9 | "status": "320.80",
10 | "date": "Fri Feb 23 2018 12:24:00 GMT",
11 | "address": "0001-0000001F-34FC",
12 | "link": "https://etherscan.io/address/0001-0000001F-34FC"
13 | },
14 | {
15 | "status": "622.80",
16 | "date": "Thu Feb 22 2018 12:24:00 GMT",
17 | "address": "0001-0000001F-34FC",
18 | "link": "https://etherscan.io/address/0001-0000001F-34FC"
19 | },
20 | {
21 | "status": "432.80",
22 | "date": "Wed Feb 21 2018 12:24:00 GMT",
23 | "address": "0001-0000001F-34FC",
24 | "link": "https://etherscan.io/address/0001-0000001F-34FC"
25 | }
26 | ]
27 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "testing": "yarn run development",
5 | "test": "yarn run development",
6 | "local": "yarn run development",
7 | "demo": "yarn run development",
8 | "dev": "yarn run development",
9 | "prod": "yarn run production",
10 | "development": "mix",
11 | "production": "mix --production",
12 | "watch": "mix watch",
13 | "hot": "mix watch --hot",
14 | "watch-poll": "mix watch -- --watch-options-poll=1000"
15 | },
16 | "devDependencies": {
17 | "axios": "^0.21",
18 | "bootstrap": "^4.3",
19 | "cross-env": "^7.0.3",
20 | "jquery": "^3.4",
21 | "laravel-mix": "^6.0.49",
22 | "lodash": "^4.17.13",
23 | "popper.js": "^1.14"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/phpcs.xml.dist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
18 |
19 | app/
20 | src/
21 | tests/
22 | lib/
23 |
24 |
25 |
--------------------------------------------------------------------------------
/public/panel-assets-default/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/public/panel-assets-default/favicon.ico
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow: /
3 |
--------------------------------------------------------------------------------
/public/web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/resources/fonts/mock-font.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/resources/fonts/mock-font.ttf
--------------------------------------------------------------------------------
/resources/img/empty.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/resources/img/empty.gif
--------------------------------------------------------------------------------
/resources/img/placeholder_seed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/resources/img/placeholder_seed.png
--------------------------------------------------------------------------------
/resources/js/cryptovoxels/template.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2018-2022 Adshares sp. z o.o.
3 | *
4 | * This file is part of AdServer
5 | *
6 | * AdServer is free software: you can redistribute and/or modify it
7 | * under the terms of the GNU General Public License as published
8 | * by the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * AdServer is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty
13 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 | * See the GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with AdServer. If not, see
18 | */
19 |
20 | let config = {
21 | 'payout_network': '{PAYOUT_NETWORK}',
22 | 'payout_address': '{PAYOUT_ADDRESS}',
23 | 'adserver': '{SERVER_URL}',
24 | }
25 |
26 | fetch(config.adserver + '/supply/cryptovoxels.js').then(function (response) {
27 | response.text().then(function (text) {
28 | eval(text)
29 | })
30 | })
31 |
--------------------------------------------------------------------------------
/resources/js/header/header.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2018 Adshares sp. z o.o.
3 | *
4 | * This file is part of AdServer
5 | *
6 | * AdServer is free software: you can redistribute and/or modify it
7 | * under the terms of the GNU General Public License as published
8 | * by the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * AdServer is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty
13 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 | * See the GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with AdServer. If not, see
18 | */
19 |
20 | (function(window, document){
21 |
--------------------------------------------------------------------------------
/resources/lang/en/auth.php:
--------------------------------------------------------------------------------
1 | 'These credentials do not match our records.',
17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
18 |
19 | ];
20 |
--------------------------------------------------------------------------------
/resources/lang/en/pagination.php:
--------------------------------------------------------------------------------
1 | '« Previous',
17 | 'next' => 'Next »',
18 |
19 | ];
20 |
--------------------------------------------------------------------------------
/resources/lang/en/passwords.php:
--------------------------------------------------------------------------------
1 | 'Passwords must be at least six characters and match the confirmation.',
17 | 'reset' => 'Your password has been reset!',
18 | 'sent' => 'We have e-mailed your password reset link!',
19 | 'token' => 'This password reset token is invalid.',
20 | 'user' => "We can't find a user with that e-mail address.",
21 |
22 | ];
23 |
--------------------------------------------------------------------------------
/resources/lang/en/why-this-ad.php:
--------------------------------------------------------------------------------
1 |
19 | */
20 |
21 | return [
22 |
23 | ];
24 |
--------------------------------------------------------------------------------
/resources/sass/_variables.scss:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2018 Adshares sp. z o.o.
3 | *
4 | * This file is part of AdServer
5 | *
6 | * AdServer is free software: you can redistribute and/or modify it
7 | * under the terms of the GNU General Public License as published
8 | * by the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * AdServer is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty
13 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 | * See the GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with AdServer. If not, see
18 | */
19 |
20 |
21 | // Body
22 | $body-bg: #f5f8fa;
23 |
24 | // Typography
25 | $font-family-sans-serif: "Raleway", sans-serif;
26 | $font-size-base: 0.9rem;
27 | $line-height-base: 1.6;
28 |
--------------------------------------------------------------------------------
/resources/sass/app.scss:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2018 Adshares sp. z o.o.
3 | *
4 | * This file is part of AdServer
5 | *
6 | * AdServer is free software: you can redistribute and/or modify it
7 | * under the terms of the GNU General Public License as published
8 | * by the Free Software Foundation, either version 3 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * AdServer is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty
13 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 | * See the GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with AdServer. If not, see
18 | */
19 |
20 |
21 | // Fonts
22 | @import url("https://fonts.googleapis.com/css?family=Raleway:300,400,600");
23 |
24 | // Variables
25 | @import "variables";
26 |
27 | // Bootstrap
28 | @import '~bootstrap/scss/bootstrap';
29 |
30 | .navbar-laravel {
31 | background-color: #fff;
32 | box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
33 | }
34 |
--------------------------------------------------------------------------------
/resources/views/common/newsletter-unsubscribe.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Unsubscribed
6 |
7 |
8 |
9 | @if (isset($success) && $success)
10 |
11 | You have been unsubscribed successfully.
12 |
13 |
14 | If you want to subscribe again, log in to your account and change the newsletter setting.
15 |
16 | @else
17 |
18 | We were not able to unsubscribe you. Please try again later or log in to your account and unsubscribe using
19 | newsletter settings.
20 |
21 | @endif
22 |
23 |
24 |
--------------------------------------------------------------------------------
/resources/views/demand/view-event-legacy.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/resources/views/demand/view-event.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/resources/views/emails/auth-recovery.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | # Password Recovery
3 |
4 | Please use button below to set up your new password
5 |
6 | @component('mail::button', ['url' => config('app.adpanel_url').$uri.$token])
7 | Set up new password
8 | @endcomponent
9 |
10 | Thanks,
11 |
12 | {{ config('app.adserver_name') }} Team
13 | @endcomponent
14 |
--------------------------------------------------------------------------------
/resources/views/emails/banner-classified.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | Hello,
3 |
4 | Your advertisement was classified.
5 |
6 | Thanks,
7 |
8 | {{ config('app.adserver_name') }} Team
9 | @endcomponent
10 |
--------------------------------------------------------------------------------
/resources/views/emails/campaign-resume.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | Hello,
3 |
4 | Funds have been successfully deposited into your account and your campaigns have been automatically resumed.
5 | In order to check your balance, please log in to the platform and select “Billing & Payments” from the dropdown menu in the upper right corner.
6 |
7 | Thanks,
8 |
9 | {{ config('app.adserver_name') }} Team
10 | @endcomponent
11 |
--------------------------------------------------------------------------------
/resources/views/emails/crm/campaign-created.blade.php:
--------------------------------------------------------------------------------
1 | userId={{ $userUuid }}
2 | email={{ $email }}
3 | adserverName={{ config('app.adserver_name') }}
4 | adserverId={{ config('app.adserver_id') }}
5 | campaignName={{ $campaign->name }}
6 | targetUrl={{ $campaign->landing_url }}
7 | budget={{ $budget }}
8 | startDate={{ $startDate }}
9 | endDate={{ $endDate }}
10 | advertiser=true
11 |
--------------------------------------------------------------------------------
/resources/views/emails/crm/site-added.blade.php:
--------------------------------------------------------------------------------
1 | userId={{ $userUuid }}
2 | email={{ $email }}
3 | adserverName={{ config('app.adserver_name') }}
4 | adserverId={{ config('app.adserver_id') }}
5 | publisher=true
6 | websiteUrl={{ $site->url }}
7 | websiteName={{ $site->name }}
8 | category={{ $categories }}
9 | contentLanguage={{ $site->primary_language }}
10 |
--------------------------------------------------------------------------------
/resources/views/emails/crm/user-registered.blade.php:
--------------------------------------------------------------------------------
1 | userId={{ $uuid }}
2 | email={{ $email }}
3 | refToken={{ $refToken }}
4 | registrationDate={{ $registrationDate }}
5 | adserverName={{ config('app.adserver_name') }}
6 | adserverId={{ config('app.adserver_id') }}
7 |
--------------------------------------------------------------------------------
/resources/views/emails/deposit-processed.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | Hello,
3 |
4 | We would like to inform you that {{ $amount }} {{ $currency }} has been deposited into your account.
5 | In order to check your account, please log in to the platform, select “Billing & payments” from the dropdown menu in the upper right corner.
6 |
7 |
8 | Thanks,
9 |
10 | {{ config('app.adserver_name') }} Team
11 | @endcomponent
12 |
--------------------------------------------------------------------------------
/resources/views/emails/invoice-created.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | Hello,
3 |
4 | Your invoice has been attached to the message. You can also download it from this link:
5 | {{ $invoice->downloadUrl }}
6 |
7 | Thanks,
8 |
9 | {{ config('app.adserver_name') }} Team
10 | @endcomponent
11 |
--------------------------------------------------------------------------------
/resources/views/emails/newsletter.blade.php:
--------------------------------------------------------------------------------
1 | {!! $body !!}
2 |
3 | @isset($unsubscribe_url)
4 |
5 | This is notification from {{ config('app.adserver_name') }} Team.
6 |
Unsubscribe
7 |
8 | @endisset
9 |
--------------------------------------------------------------------------------
/resources/views/emails/notifications/campaign-accepted.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | Dear Advertiser,
3 |
4 | Your campaign, "{{ $campaignName }}", has been verified and accepted.
5 | @if(!$allBannersAccepted)
6 | However, certain banners didn't meet our guidelines due to quality and thematic issues.
7 | @endif
8 |
9 | Log in [here]{{ $campaignUrl }} to view your campaign details, make any final adjustments, or monitor its progress.
10 | Need help? Feel free to email us at [{{ $contactEmail }}](mailto:{{ $contactEmail }})
11 | @if($bookingUrl)
12 | or set up a meeting with one of our consultants: [BOOKING LINK]({{ $bookingUrl }})
13 | @endif
14 |
15 | Best regards,
16 | {{ config('app.adserver_name') }} Team
17 | @endcomponent
18 |
--------------------------------------------------------------------------------
/resources/views/emails/notifications/campaign-draft.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | Dear Advertiser,
3 |
4 | We noticed that your campaign, "{{ $campaignName }}" is currently saved as a draft.
5 |
6 | To publish your campaign and start reaching your target audience, click [here]({{ $campaignUrl }}).
7 | Need help? Feel free to email us at [{{ $contactEmail }}](mailto:{{ $contactEmail }})
8 | @if($bookingUrl)
9 | or set up a meeting with one of our consultants: [BOOKING LINK]({{ $bookingUrl }})
10 | @endif
11 |
12 | Best regards,
13 | {{ config('app.adserver_name') }} Team
14 | @endcomponent
15 |
--------------------------------------------------------------------------------
/resources/views/emails/notifications/campaign-ended-extend.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | Dear Advertiser,
3 |
4 | We've noticed it's been a few weeks since your last campaign and we haven't seen you around.
5 |
6 | Your audience is waiting, and there are new opportunities to reach them!
7 | Log back in [here]({{ $dashboardUrl }}) to start your next successful campaign.
8 | Need help? Feel free to email us at [{{ $contactEmail }}](mailto:{{ $contactEmail }})
9 | @if($bookingUrl)
10 | or set up a meeting with one of our consultants: [BOOKING LINK]({{ $bookingUrl }})
11 | @endif
12 |
13 | We look forward to your return!
14 |
15 | Best regards,
16 | {{ config('app.adserver_name') }} Team
17 | @endcomponent
18 |
--------------------------------------------------------------------------------
/resources/views/emails/notifications/campaign-ended.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | Dear Advertiser,
3 |
4 | Your campaign, "{{ $campaignName }}" has successfully concluded.
5 |
6 | Log in [here]({{ $campaignUrl }}) to review its performance, download your report, or start planning your next campaign.
7 | If you have any questions or need assistance, please don't hesitate to email us at [{{ $contactEmail }}](mailto:{{ $contactEmail }})
8 | @if($bookingUrl)
9 | or set up a meeting with one of our consultants: [BOOKING LINK]({{ $bookingUrl }})
10 | @endif
11 |
12 | Thank you for choosing **{{ config('app.adserver_name') }}** for your advertising needs!
13 |
14 | Best regards,
15 | {{ config('app.adserver_name') }} Team
16 | @endcomponent
17 |
--------------------------------------------------------------------------------
/resources/views/emails/notifications/campaign-ends.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | Dear Advertiser,
3 |
4 | Your campaign, "{{ $campaignName }}" will conclude in three days.
5 |
6 | Review campaign results or download your report [here]({{ $campaignUrl }}).
7 | Need help? Feel free to email us at [{{ $contactEmail }}](mailto:{{ $contactEmail }})
8 | @if($bookingUrl)
9 | or set up a meeting with one of our consultants: [BOOKING LINK]({{ $bookingUrl }})
10 | @endif
11 |
12 | Best regards,
13 | {{ config('app.adserver_name') }} Team
14 | @endcomponent
15 |
--------------------------------------------------------------------------------
/resources/views/emails/notifications/funds-ended.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | Dear Advertiser,
3 |
4 | We've noticed your account balance has been depleted.
5 |
6 | To avoid disruption to your campaigns, please top up your account [here]({{ $depositUrl }}).
7 | Need help? Feel free to email us at [{{ $contactEmail }}](mailto:{{ $contactEmail }})
8 | @if($bookingUrl)
9 | or set up a meeting with one of our consultants: [BOOKING LINK]({{ $bookingUrl }})
10 | @endif
11 |
12 | Best regards,
13 | {{ config('app.adserver_name') }} Team
14 | @endcomponent
15 |
--------------------------------------------------------------------------------
/resources/views/emails/notifications/funds-ends.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | Dear Advertiser,
3 |
4 | We've noticed your account balance is nearing depletion.
5 |
6 | To avoid interruption to your campaigns, consider adding funds to your account [here]({{ $depositUrl }}).
7 | Need help? Feel free to email us at [{{ $contactEmail }}](mailto:{{ $contactEmail }})
8 | @if($bookingUrl)
9 | or set up a meeting with one of our consultants: [BOOKING LINK]({{ $bookingUrl }})
10 | @endif
11 |
12 | Best regards,
13 | {{ config('app.adserver_name') }} Team
14 | @endcomponent
15 |
--------------------------------------------------------------------------------
/resources/views/emails/notifications/inactive-advertiser.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | Dear Advertiser,
3 |
4 | Welcome to {{ config('app.adserver_name') }}! We noticed you haven't created your first campaign yet.
5 |
6 | Click [here]({{ $dashboardUrl }}) to start setting up your campaign.
7 | Need help? Feel free to email us at [{{ $contactEmail }}](mailto:{{ $contactEmail }})
8 | @if($bookingUrl)
9 | or set up a meeting with one of our consultants: [BOOKING LINK]({{ $bookingUrl }})
10 | @endif
11 |
12 | We're excited to help you reach your advertising goals!
13 |
14 | Best regards,
15 | {{ config('app.adserver_name') }} Team
16 | @endcomponent
17 |
--------------------------------------------------------------------------------
/resources/views/emails/notifications/inactive-publisher.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | Dear Publisher,
3 |
4 | Welcome to {{ config('app.adserver_name') }}! We noticed that you haven't added your website yet.
5 |
6 | Click [here]({{ $dashboardUrl }}) to add your website and start monetizing your content with our advertising solutions.
7 | Need help? Feel free to email us at [{{ $contactEmail }}](mailto:{{ $contactEmail }})
8 | @if($bookingUrl)
9 | or set up a meeting with one of our consultants: [BOOKING LINK]({{ $bookingUrl }})
10 | @endif
11 |
12 | We're excited to work with you!
13 |
14 | Best regards,
15 | {{ config('app.adserver_name') }} Team
16 | @endcomponent
17 |
--------------------------------------------------------------------------------
/resources/views/emails/notifications/inactive-user-extend.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | Dear User,
3 |
4 | It seems like it's been a while since we've seen you.
5 | There's so much waiting for you at {{ config('app.adserver_name') }}.
6 |
7 | Click [here]({{ $panelUrl }}) to access your account.
8 | Remember, if you need any assistance or have questions, feel free to email us at [{{ $contactEmail }}](mailto:{{ $contactEmail }})
9 | @if($bookingUrl)
10 | or set up a meeting with one of our consultants: [BOOKING LINK]({{ $bookingUrl }})
11 | @endif
12 |
13 | We look forward to seeing you again!
14 |
15 | Best regards,
16 | {{ config('app.adserver_name') }} Team
17 | @endcomponent
18 |
19 |
20 |
--------------------------------------------------------------------------------
/resources/views/emails/notifications/inactive-user-who-deposit.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | Dear Advertiser,
3 |
4 | Welcome to {{ config('app.adserver_name') }}! We noticed that you've successfully credited your account but haven't launched your first campaign yet.
5 |
6 | Get started today! Click [here]({{ $dashboardUrl }}) to create and launch your campaign.
7 | Need help? Feel free to email us at [{{ $contactEmail }}](mailto:{{ $contactEmail }})
8 | @if($bookingUrl)
9 | or set up a meeting with one of our consultants: [BOOKING LINK]({{ $bookingUrl }})
10 | @endif
11 |
12 | Let's make the most of your advertising goals together!
13 |
14 | Best regards,
15 | {{ config('app.adserver_name') }} Team
16 | @endcomponent
17 |
--------------------------------------------------------------------------------
/resources/views/emails/notifications/inactive-user.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | Dear User,
3 |
4 | Welcome to {{ config('app.adserver_name') }}! We noticed you haven't created your first campaign or added your website yet.
5 |
6 | Click [here]({{ $advertiserDashboardUrl }}) to start setting up your campaign
7 | or [here]({{ $publisherDashboardUrl }}) to add your website and start monetizing your content with our advertising solutions.
8 | Need help? Feel free to email us at [{{ $contactEmail }}](mailto:{{ $contactEmail }})
9 | @if($bookingUrl)
10 | or set up a meeting with one of our consultants: [BOOKING LINK]({{ $bookingUrl }})
11 | @endif
12 |
13 | We're excited to work with you!
14 |
15 | Best regards,
16 | {{ config('app.adserver_name') }} Team
17 | @endcomponent
18 |
--------------------------------------------------------------------------------
/resources/views/emails/notifications/site-accepted.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | Dear Publisher,
3 |
4 | Your @switch($mediumName)
5 | @case('web')
6 | website @break
7 | @case('metaverse')
8 | Metaverse site @break
9 | @default
10 | site @endswitch
11 | **{{ $siteName }}** has been verified and accepted.
12 |
13 | You can now start monetizing your @switch($mediumName)
14 | @case('web')
15 | digital content. @break
16 | @case('metaverse')
17 | digital land. @break
18 | @default
19 | site. @endswitch
20 | Log in [here]({{ $siteUrl }}) to manage your account, track your earnings, or get insights to grow your revenue.
21 | Need help? Feel free to email us at [{{ $contactEmail }}](mailto:{{ $contactEmail }})
22 | @if($bookingUrl)
23 | or set up a meeting with one of our consultants: [BOOKING LINK]({{ $bookingUrl }})
24 | @endif
25 |
26 | Best regards, {{ config('app.adserver_name') }} Team
27 | @endcomponent
28 |
--------------------------------------------------------------------------------
/resources/views/emails/notifications/site-draft.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | Dear Publisher,
3 |
4 | We noticed that your @switch($mediumName)
5 | @case('web')
6 | website @break
7 | @case('metaverse')
8 | Metaverse site @break
9 | @default
10 | site @endswitch
11 | is currently saved as a draft.
12 |
13 | To start monetizing your @switch($mediumName)
14 | @case('web')
15 | digital content, @break
16 | @case('metaverse')
17 | digital land, @break
18 | @default
19 | site, @endswitch
20 | click [here]({{ $dashboardUrl }}).
21 | Need help? Feel free to email us at [{{ $contactEmail }}](mailto:{{ $contactEmail }})
22 | @if($bookingUrl)
23 | or set up a meeting with one of our consultants: [BOOKING LINK]({{ $bookingUrl }})
24 | @endif
25 |
26 | Best regards,
27 | {{ config('app.adserver_name') }} Team
28 | @endcomponent
29 |
--------------------------------------------------------------------------------
/resources/views/emails/panel-placeholders-change.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | Hello,
3 |
4 | The panel placeholders were changed on {{ $date }}. Make sure the changes were yours.
5 |
6 | Thanks,
7 |
8 | {{ config('app.adserver_name') }} Team
9 | @endcomponent
10 |
--------------------------------------------------------------------------------
/resources/views/emails/site-ads-txt-invalid.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | # File ads.txt on site "{{ $siteName }}" is invalid
3 |
4 | Please check ads.txt file on site "{{ $siteName }}". It is not accessible on expected url ({{ $adsTxtUrl }}) or does not contain expected entry.
5 |
6 |
7 | {{ $adsTxtEntry }}
8 |
9 |
10 | For more information please visit documentation page https://adshar.es/adstxt.
11 |
12 | Thanks,
13 |
14 | {{ config('app.adserver_name') }} Team
15 | @endcomponent
16 |
--------------------------------------------------------------------------------
/resources/views/emails/site-ads-txt-valid.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | # File ads.txt on site "{{ $siteName }}" is correct
3 |
4 | Your ads.txt file is correct. You can now earn using {{ config('app.adserver_name') }}.
5 |
6 | Thanks,
7 |
8 | {{ config('app.adserver_name') }} Team
9 | @endcomponent
10 |
--------------------------------------------------------------------------------
/resources/views/emails/site-approval-pending.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | # Site acceptance is pending
3 |
4 | Hello,
5 |
6 | User {{ $user }} added site {{ $url }} which needs approval.
7 |
8 | Thanks,
9 |
10 | {{ config('app.adserver_name') }} Team
11 | @endcomponent
12 |
--------------------------------------------------------------------------------
/resources/views/emails/technical-error.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | # Technical Error: {{ $title }}
3 |
4 | {{ $message }}
5 |
6 | Do not ignore this error because it causes a serious problem on your server.
7 |
8 | Thanks,
9 |
10 | {{ config('app.adserver_name') }} Team
11 | @endcomponent
12 |
--------------------------------------------------------------------------------
/resources/views/emails/user-banned.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | # Account banned
3 |
4 | Your account has been banned due to: {{ $reason }}.
5 | If you want to explain, contact support {{ config('app.support_email') }}
6 |
7 | Thanks,
8 |
9 | {{ config('app.adserver_name') }} Team
10 | @endcomponent
11 |
--------------------------------------------------------------------------------
/resources/views/emails/user-confirmed.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | Hello,
3 |
4 | Your account has been confirmed.
5 |
6 | Thanks,
7 |
8 | {{ config('app.adserver_name') }} Team
9 | @endcomponent
10 |
--------------------------------------------------------------------------------
/resources/views/emails/user-email-activate.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | # Account Activation
3 |
4 | Thank you for registering with Adshares. Please click button below to activate your account
5 |
6 | @component('mail::button', ['url' => config('app.adpanel_url').$uri.$token])
7 | Accept and Activate
8 | @endcomponent
9 |
10 | Thanks,
11 |
12 | {{ config('app.adserver_name') }} Team
13 | @endcomponent
14 |
--------------------------------------------------------------------------------
/resources/views/emails/user-email-change-confirm-1-old.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | # Confirm email change request
3 |
4 | Please confirm your email change request, once confirmed you will receive another confirmation email on your new email account
5 |
6 | @component('mail::button', ['url' => config('app.adpanel_url').$uri.$token])
7 | Confirm email change request
8 | @endcomponent
9 |
10 | Thanks,
11 |
12 | {{ config('app.adserver_name') }} Team
13 | @endcomponent
14 |
--------------------------------------------------------------------------------
/resources/views/emails/user-email-change-confirm-2-new.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | # Confirm your new email
3 |
4 | Please confirm this is your new email that you want to link with your Adshares account
5 |
6 | @component('mail::button', ['url' => config('app.adpanel_url').$uri.$token])
7 | Confirm and save new email
8 | @endcomponent
9 |
10 | Thanks,
11 |
12 | {{ config('app.adserver_name') }} Team
13 | @endcomponent
14 |
--------------------------------------------------------------------------------
/resources/views/emails/user-password-change-confirm.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | # Confirm password change request
3 |
4 | Please confirm your password change request
5 |
6 | @component('mail::button', ['url' => config('app.adpanel_url').$uri.$token])
7 | Confirm password change
8 | @endcomponent
9 |
10 | Thanks,
11 |
12 | {{ config('app.adserver_name') }} Team
13 | @endcomponent
14 |
--------------------------------------------------------------------------------
/resources/views/emails/user-password-change.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | # Password change
3 |
4 | The password to your account was changed.
5 | If you are not responsible for this change, contact support immediately {{ config('app.support_email') }}
6 |
7 | Thanks,
8 |
9 | {{ config('app.adserver_name') }} Team
10 | @endcomponent
11 |
--------------------------------------------------------------------------------
/resources/views/emails/wallet-connect-confirm.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | # Confirm cryptocurrency wallet connection request
3 |
4 | Please confirm you want to connect your Adshares account to this cryptocurrency wallet:
5 |
6 | - Wallet address: {{ $address }}
7 | - Wallet network: {{ $network }}
8 |
9 | @component('mail::button', ['url' => config('app.adpanel_url').$uri.$token])
10 | Confirm wallet connection
11 | @endcomponent
12 |
13 | Thanks,
14 |
15 | {{ config('app.adserver_name') }} Team
16 | @endcomponent
17 |
--------------------------------------------------------------------------------
/resources/views/emails/wallet-connected.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | # Your cryptocurrency wallet has been successfully connected
3 |
4 | - Wallet address: {{ $address }}
5 | - Wallet network: {{ $network }}
6 |
7 | Thanks,
8 |
9 | {{ config('app.adserver_name') }} Team
10 | @endcomponent
11 |
--------------------------------------------------------------------------------
/resources/views/emails/wallet-funds-email.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | ## Not enough funds on your account.
3 |
4 | Please transfer {{ $transferValue }} ADS from Cold Wallet to Hot Wallet - {{ $address }}.
5 |
6 | Thanks,
7 |
8 | {{ config('app.adserver_name') }} Team
9 | @endcomponent
10 |
--------------------------------------------------------------------------------
/resources/views/emails/withdrawal-approval.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | # Confirm withdrawal
3 |
4 | Please confirm your withdrawal request.
5 | - Recipient Address: {{ $address }}
6 | - Network: {{ $network }}
7 | - Currency: {{ $currency }}
8 | - Amount: {{ $amount }} ADS
9 | @if ($fee > 0)
10 | - Fee: {{ $fee }} ADS
11 | - **TOTAL**: {{ $total }} ADS
12 | @endif
13 |
14 | @component('mail::button', ['url' => $url])
15 | Confirm Withdrawal
16 | @endcomponent
17 |
18 | Thanks,
19 |
20 | {{ config('app.adserver_name') }} Team
21 | @endcomponent
22 |
--------------------------------------------------------------------------------
/resources/views/emails/withdrawal-success.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | # Withdrawal success
3 |
4 | Withdrawal order has been added.
5 | - Recipient Address: {{ $address }}
6 | - Network: {{ $network }}
7 | - Currency: {{ $currency }}
8 | - Amount: {{ $amount }} ADS
9 | @if ($fee > 0)
10 | - Fee: {{ $fee }} ADS
11 | - **TOTAL**: {{ $total }} ADS
12 | @endif
13 |
14 | Thanks,
15 |
16 | {{ config('app.adserver_name') }} Team
17 | @endcomponent
18 |
--------------------------------------------------------------------------------
/resources/views/info/policy.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | @if (isset($content))
9 | {!! $content !!}
10 | @else
11 | Contact support {{ config('app.support_email') }}
12 | @endif
13 |
14 |
15 |
--------------------------------------------------------------------------------
/scripts/build.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -e
4 |
5 | if [[ -v GIT_CLONE ]]
6 | then
7 | # Checkout repo and change directory
8 |
9 | # Install git
10 | git --version || apt-get install -y git
11 |
12 | git clone \
13 | --depth=1 \
14 | https://github.com/adshares/adserver.git \
15 | --branch ${BUILD_BRANCH:-master} \
16 | ${BUILD_PATH}/build
17 |
18 | cd ${BUILD_PATH}/build
19 | fi
20 |
21 | composer install
22 |
23 | yarn install
24 | yarn run ${APP_ENV}
25 |
26 | mkdir -p storage/app/public/banners
27 | chmod a+rwX -R storage
28 |
29 | GIT_TAG=$(git tag -l --points-at HEAD | head -n 1)
30 | GIT_HASH="#"$(git rev-parse --short HEAD)
31 |
32 | APP_VERSION=${APP_VERSION:-${GIT_TAG:-${GIT_HASH}}}
33 |
34 | echo "APP_VERSION=$APP_VERSION" | tee .env.from-build
35 |
36 |
--------------------------------------------------------------------------------
/scripts/pre-install.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -e
4 |
5 | apt-get -qq -y --no-install-recommends install \
6 | php7.2-fpm php7.2-mysql php7.2-bcmath php7.2-bz2 php7.2-cli php7.2-curl \
7 | php7.2-gd php7.2-intl php7.2-json php7.2-mbstring php7.2-opcache \
8 | php7.2-readline php7.2-sqlite3 php7.2-zip
9 |
--------------------------------------------------------------------------------
/sonar-project.properties:
--------------------------------------------------------------------------------
1 | sonar.host.url=https://sonarcloud.io
2 | sonar.organization=adshares-github
3 | sonar.projectKey=adshares-adserver
4 | sonar.projectName=Adshares AdServer
5 | sonar.projectVersion=2.8
6 |
7 | # =====================================================
8 | # Meta-data for the project
9 | # =====================================================
10 |
11 | sonar.links.homepage=https://adshares.net/
12 | sonar.links.ci=https://app.travis-ci.com/github/adshares/adserver
13 | sonar.links.scm=https://github.com/adshares/adserver
14 | sonar.links.issue=https://github.com/adshares/adserver/issues
15 |
16 | # =====================================================
17 | # Properties that will be shared amongst all modules
18 | # =====================================================
19 |
20 | # SQ standard properties
21 | sonar.sourceEncoding=UTF-8
22 | sonar.sources=app,src
23 | sonar.tests=tests
24 | sonar.php.tests.reportPath=./storage/phpunit/logfile.xml
25 | sonar.php.coverage.reportPaths=./storage/phpunit/coverage.xml
26 |
--------------------------------------------------------------------------------
/src/Advertiser/Dto/Input/InvalidInputException.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Advertiser\Dto\Input;
25 |
26 | use RuntimeException;
27 |
28 | class InvalidInputException extends RuntimeException
29 | {
30 | }
31 |
--------------------------------------------------------------------------------
/src/Classify/Application/Exception/BannerNotVerifiedException.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Classify\Application\Exception;
25 |
26 | use RuntimeException;
27 |
28 | class BannerNotVerifiedException extends RuntimeException
29 | {
30 | }
31 |
--------------------------------------------------------------------------------
/src/Common/Application/Dto/TaxonomyV2/InputTargetingItem.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Common\Application\Dto\TaxonomyV2;
25 |
26 | class InputTargetingItem extends TargetingItem
27 | {
28 | public function __construct(string $key, string $label)
29 | {
30 | parent::__construct('input', $key, $label);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/Common/Application/Format/Json/JsonDataRequest.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Common\Application\Format\Json;
25 |
26 | interface JsonDataRequest
27 | {
28 | public function __toString(): string;
29 | }
30 |
--------------------------------------------------------------------------------
/src/Common/Application/Model/Currency.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Common\Application\Model;
25 |
26 | enum Currency: string
27 | {
28 | case ADS = 'ADS';
29 | case USD = 'USD';
30 | }
31 |
--------------------------------------------------------------------------------
/src/Common/Application/Service/AdClassify.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Common\Application\Service;
25 |
26 | use Adshares\Common\Application\Dto\TaxonomyV1;
27 |
28 | interface AdClassify
29 | {
30 | public function fetchFilteringOptions(): TaxonomyV1;
31 | }
32 |
--------------------------------------------------------------------------------
/src/Common/Application/Service/Exception/AdsException.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Common\Application\Service\Exception;
25 |
26 | use Adshares\Ads\Driver\CommandError;
27 | use RuntimeException;
28 |
29 | class AdsException extends RuntimeException
30 | {
31 | public const LOW_LEVEL_BALANCE = CommandError::LOW_BALANCE;
32 | }
33 |
--------------------------------------------------------------------------------
/src/Common/Application/Service/Exception/ExchangeRateNotAvailableException.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Common\Application\Service\Exception;
25 |
26 | use RuntimeException;
27 |
28 | class ExchangeRateNotAvailableException extends RuntimeException
29 | {
30 | }
31 |
--------------------------------------------------------------------------------
/src/Common/Application/Service/Exception/SignatureVerifierException.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Common\Application\Service\Exception;
25 |
26 | use RuntimeException;
27 |
28 | class SignatureVerifierException extends RuntimeException
29 | {
30 | }
31 |
--------------------------------------------------------------------------------
/src/Common/Application/Service/LicenseDecoder.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Common\Application\Service;
25 |
26 | use Adshares\Common\Domain\ValueObject\License;
27 |
28 | interface LicenseDecoder
29 | {
30 | public function decode(string $encodedLicense): License;
31 | }
32 |
--------------------------------------------------------------------------------
/src/Common/Application/Service/LicenseProvider.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Common\Application\Service;
25 |
26 | use Adshares\Common\Application\Dto\EncodedLicense;
27 |
28 | interface LicenseProvider
29 | {
30 | public function fetchLicense(): EncodedLicense;
31 | }
32 |
--------------------------------------------------------------------------------
/src/Common/Application/Service/LicenseVault.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Common\Application\Service;
25 |
26 | use Adshares\Common\Domain\ValueObject\License;
27 |
28 | interface LicenseVault
29 | {
30 | public function read(): License;
31 |
32 | public function store(string $license): void;
33 | }
34 |
--------------------------------------------------------------------------------
/src/Common/Application/TransactionManager.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Common\Application;
25 |
26 | interface TransactionManager
27 | {
28 | public function begin(): void;
29 |
30 | public function commit(): void;
31 |
32 | public function rollback(): void;
33 | }
34 |
--------------------------------------------------------------------------------
/src/Common/Comparable.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Common;
25 |
26 | interface Comparable
27 | {
28 | public function equals(object $other): bool;
29 | }
30 |
--------------------------------------------------------------------------------
/src/Common/Domain/Adapter/ArrayCollection.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Common\Domain\Adapter;
25 |
26 | use Adshares\Common\Domain\Collection;
27 | use Doctrine\Common\Collections\ArrayCollection as DoctrineArrayCollection;
28 |
29 | class ArrayCollection extends DoctrineArrayCollection implements Collection
30 | {
31 | }
32 |
--------------------------------------------------------------------------------
/src/Common/Domain/Adapter/ArrayableItemCollection.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Common\Domain\Adapter;
25 |
26 | class ArrayableItemCollection extends ArrayCollection
27 | {
28 | public function toArray(): array
29 | {
30 | return array_map(fn($item) => $item->toArray(), $this->getValues());
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/Common/Domain/Collection.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Common\Domain;
25 |
26 | use Doctrine\Common\Collections\Collection as DoctrineCollection;
27 |
28 | interface Collection extends DoctrineCollection
29 | {
30 | }
31 |
--------------------------------------------------------------------------------
/src/Common/Domain/Id.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Common\Domain;
25 |
26 | interface Id extends ValueObject
27 | {
28 | public function __construct(string $value);
29 |
30 | public function toString(): string;
31 | }
32 |
--------------------------------------------------------------------------------
/src/Common/Domain/ValueObject.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | namespace Adshares\Common\Domain;
23 |
24 | use Adshares\Common\Comparable;
25 |
26 | interface ValueObject extends Comparable
27 | {
28 | }
29 |
--------------------------------------------------------------------------------
/src/Common/Domain/ValueObject/ChartResolution.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Common\Domain\ValueObject;
25 |
26 | enum ChartResolution: string
27 | {
28 | case HOUR = 'hour';
29 | case DAY = 'day';
30 | case WEEK = 'week';
31 | case MONTH = 'month';
32 | case QUARTER = 'quarter';
33 | case YEAR = 'year';
34 | }
35 |
--------------------------------------------------------------------------------
/src/Common/Domain/ValueObject/Exception/InvalidUuidException.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | namespace Adshares\Common\Domain\ValueObject\Exception;
23 |
24 | use Adshares\Common\Exception\RuntimeException;
25 |
26 | final class InvalidUuidException extends RuntimeException
27 | {
28 | }
29 |
--------------------------------------------------------------------------------
/src/Common/Exception/InvalidArgumentException.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Common\Exception;
25 |
26 | final class InvalidArgumentException extends \InvalidArgumentException
27 | {
28 | }
29 |
--------------------------------------------------------------------------------
/src/Common/Exception/RuntimeException.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Common\Exception;
25 |
26 | class RuntimeException extends \RuntimeException
27 | {
28 | }
29 |
--------------------------------------------------------------------------------
/src/Common/Identifiable.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Common;
25 |
26 | use Adshares\Common\Domain;
27 |
28 | interface Identifiable
29 | {
30 | public function id(): Domain\Id;
31 | }
32 |
--------------------------------------------------------------------------------
/src/Common/UrlInterface.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Common;
25 |
26 | interface UrlInterface
27 | {
28 | public function __toString(): string;
29 |
30 | public function toString(): string;
31 | }
32 |
--------------------------------------------------------------------------------
/src/Demand/Application/Exception/TransferMoneyException.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Demand\Application\Exception;
25 |
26 | use RuntimeException;
27 |
28 | class TransferMoneyException extends RuntimeException
29 | {
30 | }
31 |
--------------------------------------------------------------------------------
/src/Network/Broadcastable.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Network;
25 |
26 | interface Broadcastable
27 | {
28 | public static function fromHex(string $hex);
29 |
30 | public function toHex(): string;
31 | }
32 |
--------------------------------------------------------------------------------
/src/Publisher/Dto/Input/InvalidInputException.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Publisher\Dto\Input;
25 |
26 | use RuntimeException;
27 |
28 | class InvalidInputException extends RuntimeException
29 | {
30 | }
31 |
--------------------------------------------------------------------------------
/src/Supply/Application/Dto/FoundBanners.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Supply\Application\Dto;
25 |
26 | use Adshares\Common\Domain\Adapter\ArrayCollection;
27 | use Illuminate\Contracts\Support\Arrayable;
28 |
29 | final class FoundBanners extends ArrayCollection implements Arrayable
30 | {
31 | }
32 |
--------------------------------------------------------------------------------
/src/Supply/Application/Dto/FoundBanners/Banner.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Supply\Application\Dto\FoundBanners;
25 |
26 | final class Banner
27 | {
28 | }
29 |
--------------------------------------------------------------------------------
/src/Supply/Application/Service/BannerClassifier.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Supply\Application\Service;
25 |
26 | use Adshares\Supply\Application\Dto\Classification\Collection;
27 |
28 | interface BannerClassifier
29 | {
30 | public function fetchBannersClassification(array $bannerPublicIds): Collection;
31 | }
32 |
--------------------------------------------------------------------------------
/src/Supply/Application/Service/Exception/EmptyInventoryException.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | namespace Adshares\Supply\Application\Service\Exception;
23 |
24 | class EmptyInventoryException extends \RuntimeException
25 | {
26 | }
27 |
--------------------------------------------------------------------------------
/src/Supply/Application/Service/Exception/NoBannersForGivenCampaign.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | namespace Adshares\Supply\Application\Service\Exception;
23 |
24 | use RuntimeException;
25 |
26 | class NoBannersForGivenCampaign extends RuntimeException
27 | {
28 | }
29 |
--------------------------------------------------------------------------------
/src/Supply/Application/Service/Exception/UnexpectedClientResponseException.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | namespace Adshares\Supply\Application\Service\Exception;
23 |
24 | use RuntimeException;
25 |
26 | class UnexpectedClientResponseException extends RuntimeException
27 | {
28 | }
29 |
--------------------------------------------------------------------------------
/src/Supply/Application/Service/SupplyClient.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Supply\Application\Service;
25 |
26 | interface SupplyClient
27 | {
28 | public function fetchTargetingReach(string $targetingReachUrl): array;
29 | }
30 |
--------------------------------------------------------------------------------
/src/Supply/Domain/Factory/Exception/InvalidCampaignArgumentException.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | namespace Adshares\Supply\Domain\Factory\Exception;
23 |
24 | use Adshares\Common\Exception\RuntimeException;
25 |
26 | class InvalidCampaignArgumentException extends RuntimeException
27 | {
28 | }
29 |
--------------------------------------------------------------------------------
/src/Supply/Domain/Model/Exception/InvalidBudgetValueException.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | namespace Adshares\Supply\Domain\Model\Exception;
23 |
24 | use RuntimeException;
25 |
26 | class InvalidBudgetValueException extends RuntimeException
27 | {
28 | }
29 |
--------------------------------------------------------------------------------
/src/Supply/Domain/Model/Exception/UnsupportedBannerTypeException.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | namespace Adshares\Supply\Domain\Model\Exception;
23 |
24 | use RuntimeException;
25 |
26 | class UnsupportedBannerTypeException extends RuntimeException
27 | {
28 | }
29 |
--------------------------------------------------------------------------------
/src/Supply/Domain/Model/Exception/UnsupportedStatusTypeException.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Supply\Domain\Model\Exception;
25 |
26 | use RuntimeException;
27 |
28 | class UnsupportedStatusTypeException extends RuntimeException
29 | {
30 | }
31 |
--------------------------------------------------------------------------------
/src/Supply/Domain/Repository/Exception/CampaignRepositoryException.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Supply\Domain\Repository\Exception;
25 |
26 | class CampaignRepositoryException extends \RuntimeException
27 | {
28 | }
29 |
--------------------------------------------------------------------------------
/src/Supply/Domain/ValueObject/Exception/InvalidBudgetValueException.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Supply\Domain\ValueObject\Exception;
25 |
26 | use Adshares\Common\Exception\RuntimeException;
27 |
28 | class InvalidBudgetValueException extends RuntimeException
29 | {
30 | }
31 |
--------------------------------------------------------------------------------
/src/Supply/Domain/ValueObject/Exception/InvalidCampaignDateException.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Supply\Domain\ValueObject\Exception;
25 |
26 | use Adshares\Common\Exception\RuntimeException;
27 |
28 | class InvalidCampaignDateException extends RuntimeException
29 | {
30 | }
31 |
--------------------------------------------------------------------------------
/src/Supply/Domain/ValueObject/Exception/InvalidUrlException.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Supply\Domain\ValueObject\Exception;
25 |
26 | use RuntimeException;
27 |
28 | class InvalidUrlException extends RuntimeException
29 | {
30 | }
31 |
--------------------------------------------------------------------------------
/src/Supply/Domain/ValueObject/Exception/UnsupportedBannerTypeException.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | declare(strict_types=1);
23 |
24 | namespace Adshares\Supply\Domain\ValueObject\Exception;
25 |
26 | use RuntimeException;
27 |
28 | class UnsupportedBannerTypeException extends RuntimeException
29 | {
30 | }
31 |
--------------------------------------------------------------------------------
/tests/app/Mail/MailTestCase.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | namespace Adshares\Adserver\Tests\Mail;
23 |
24 | use Adshares\Adserver\Tests\CreatesApplication;
25 | use Adshares\Adserver\Tests\RefreshDatabase;
26 | use Illuminate\Foundation\Testing\TestCase;
27 |
28 | class MailTestCase extends TestCase
29 | {
30 | use CreatesApplication;
31 | use RefreshDatabase;
32 | }
33 |
--------------------------------------------------------------------------------
/tests/mock/Files/Banners/2xhtml.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/tests/mock/Files/Banners/2xhtml.zip
--------------------------------------------------------------------------------
/tests/mock/Files/Banners/300x250.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/tests/mock/Files/Banners/300x250.png
--------------------------------------------------------------------------------
/tests/mock/Files/Banners/300x250.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/tests/mock/Files/Banners/300x250.zip
--------------------------------------------------------------------------------
/tests/mock/Files/Banners/980x120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/tests/mock/Files/Banners/980x120.png
--------------------------------------------------------------------------------
/tests/mock/Files/Banners/adshares.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/tests/mock/Files/Banners/adshares.mp4
--------------------------------------------------------------------------------
/tests/mock/Files/Banners/empty.zip:
--------------------------------------------------------------------------------
1 | PK
--------------------------------------------------------------------------------
/tests/mock/Files/Banners/model.vox:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/tests/mock/Files/Banners/model.vox
--------------------------------------------------------------------------------
/tests/mock/Files/Banners/too_big_unzipped.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/tests/mock/Files/Banners/too_big_unzipped.zip
--------------------------------------------------------------------------------
/tests/mock/Files/Banners/too_big_zipped.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adshares/adserver/59b683c20ab330def00dda02367bc7c0d77b926e/tests/mock/Files/Banners/too_big_zipped.zip
--------------------------------------------------------------------------------
/tests/mock/Files/OAuth/oauth-public.key:
--------------------------------------------------------------------------------
1 | -----BEGIN PUBLIC KEY-----
2 | MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAtJY3WgK4VlQ27N6zdBc3
3 | 1fpQmJjAhG1MW99noF3xEslYhu8m2e9/Sz0fu5tSlYeOC76QvhMarbDBCp/qpbvq
4 | HxwIkYT4SOrRJNMXB1MRy3+ym/5uj4iiVcfUMkQ4L1eOQYunX4rTc8nzohu8MXOp
5 | l2n1b2eZ8PhMNceSKh5+bvQz0b7cwyWBJuRbgilZDV7cGPh2rQmKoqy9roTpbDxb
6 | TT3r/BxZKGVRbONaNFospnEoulxCrynwfBg+FN+T53++Oaq3x9hCMvrKwu9B8fMy
7 | v7WZ9wMefZy0beU7xaJLFL2/vGiXes6RWRpFTomcOKI6NjHO4SIf6SYY8YuQ93wr
8 | gJ2jz7DW043O8z0jGjqYw8fOlKqXndu5dY8Su//VCOPI9A/tvWtZmI6enepkTWn/
9 | HU/mgDSoFTfwJt5yYRfcque3qtpQFIl3dju2g/4zlFaoafNuQSk2j0sB582Ou37y
10 | s+60g14Bn/NSnAVSIwUHu7HnY3IpNf2rzVO65ROqCZQ/2LPAFogSSqtT3Qx0PFDf
11 | 5Z2r48UozuKewavcbsvbQhyi4/kZ6gwJ3PLm8255Isrfb0AcJfDu4aUVLDdzATwx
12 | V0vtqUwoodz1PIwRCIee2kLIOoFr8BOI8Jk2jBW6Nw3kNap1Of6GqZDwVaPeTkNv
13 | br/jrRotf+EnUDGaPFuydikCAwEAAQ==
14 | -----END PUBLIC KEY-----
--------------------------------------------------------------------------------
/tests/mock/ToStringClass.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 |
22 | namespace Adshares\Mock;
23 |
24 | class ToStringClass
25 | {
26 | /** @var string */
27 | private $value;
28 |
29 | public function __construct(string $value)
30 | {
31 | $this->value = $value;
32 | }
33 |
34 | public function __toString()
35 | {
36 | return $this->value;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/tests/mock/info.json:
--------------------------------------------------------------------------------
1 | {
2 | "module": "adserver",
3 | "name": "AdServer",
4 | "version": "#",
5 | "capabilities": [
6 | "ADV",
7 | "PUB"
8 | ],
9 | "serverUrl": "https://example.com",
10 | "panelUrl": "http://adpanel",
11 | "privacyUrl": "https://example.com/policies/privacy.html",
12 | "termsUrl": "https://example.com/policies/terms.html",
13 | "inventoryUrl": "https://example.com/adshares/inventory/list",
14 | "adsAddress": "0001-00000005-CBCA",
15 | "supportEmail": "mail@example.com",
16 | "demandFee": 0.0199,
17 | "supplyFee": 0.0199,
18 | "registrationMode": "public",
19 | "statistics": {
20 | "users": 120,
21 | "campaigns": 87,
22 | "sites": 294
23 | },
24 | "mode": "operational"
25 | }
26 |
--------------------------------------------------------------------------------
/tests/mock/network.json:
--------------------------------------------------------------------------------
1 | {
2 | "community": {
3 | "accountAddress": "0001-00000024-FF89",
4 | "demandFee": 0.01
5 | }
6 | }
7 |
--------------------------------------------------------------------------------