Skip to content
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

Update production contract to #602 #628

Merged
merged 69 commits into from
Dec 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
4a42a94
eden-subchain-client
tbfleming Oct 8, 2021
40bc439
eden-subchain-client
tbfleming Oct 8, 2021
99f9467
Move fetch
tbfleming Oct 8, 2021
32a0446
Add member createdAt
sparkplug0025 Oct 13, 2021
b56e246
Extend deadline for video uploads in FE to 2 weeks (#571)
brandonfancher Oct 13, 2021
46abb68
One more place in FE to extend video upload deadline.
brandonfancher Oct 13, 2021
2e6c878
Add membersByCreatedAt query
sparkplug0025 Oct 14, 2021
4fe3125
Fix query ranges
sparkplug0025 Oct 14, 2021
573338a
Merge pull request #577 from eoscommunity/sparkplug0025/members-creat…
tbfleming Oct 14, 2021
233f873
Merge remote-tracking branch 'origin/main' into subchain-package
tbfleming Oct 14, 2021
487f641
Force full cicd
tbfleming Oct 14, 2021
9f557ef
Fix SoftKey Transact return body (#557)
sparkplug0025 Oct 15, 2021
83dd738
Organize .env file env vars.
brandonfancher Oct 15, 2021
d9040a7
Add .env.test for Cypress tests.
brandonfancher Oct 15, 2021
65ac987
Update CICD webapp build script to use .env.test vars.
brandonfancher Oct 15, 2021
270c76d
Wait for subchain to load up.
brandonfancher Oct 15, 2021
4fe7dbb
env spelling in cicd
tbfleming Oct 15, 2021
5785376
Community members from box queries (#572)
brandonfancher Oct 15, 2021
c706032
Merge pull request #579 from eoscommunity/prevent_connect
tbfleming Oct 15, 2021
5342ac4
Merge remote-tracking branch 'origin/main' into subchain-package
tbfleming Oct 15, 2021
b94a506
eden-subchain-client
tbfleming Oct 15, 2021
e7d026c
eden-subchain-client
tbfleming Oct 15, 2021
b4f7f47
update package deps
tbfleming Oct 15, 2021
eac679d
update package deps
tbfleming Oct 15, 2021
c8a60d4
build issues
tbfleming Oct 15, 2021
2237d07
Type return value from usePagedQuery.
brandonfancher Oct 15, 2021
a914fcf
What is returned from a query is a QueryResult.
brandonfancher Oct 15, 2021
47f3ed2
Fix type naming.
brandonfancher Oct 15, 2021
0e34063
build issues
tbfleming Oct 15, 2021
92fe7bf
Merge remote-tracking branch 'origin/main' into subchain-package
tbfleming Oct 15, 2021
3b67093
Virtualize all members list in prep for member search/filter.
brandonfancher Oct 18, 2021
86c7bd7
Factor out VirtualMembersList.
brandonfancher Oct 18, 2021
101405b
Optimize Community members list for mobile.
brandonfancher Oct 19, 2021
94b420b
Add tap-mobile-top-nav-to-scroll-members-to-top.
brandonfancher Oct 19, 2021
308b8d9
Switch to react-virtualized from react-virtual.
brandonfancher Oct 19, 2021
987535b
Merge auction member data with all members into one list.
brandonfancher Oct 19, 2021
c67ff69
Fix members grid test.
brandonfancher Oct 20, 2021
7eb8ed8
Process PR feedback; remove comment.
brandonfancher Oct 20, 2021
5d43b5f
Merge remote-tracking branch 'origin/main' into subchain-package
tbfleming Oct 20, 2021
b2802f5
Community Search (#584)
brandonfancher Oct 22, 2021
fef3083
NFT Info: Add NFT icon and adjust styles on member chips (#586)
brandonfancher Oct 26, 2021
3630564
Add loader component to member chip profile images.
brandonfancher Oct 25, 2021
e8b4983
Fix missing induction videos
tbfleming Oct 26, 2021
ec66f88
force box build
tbfleming Oct 26, 2021
537a276
Merge pull request #590 from eoscommunity/genesis-induction-videos
tbfleming Oct 26, 2021
b9c91fb
Ephemeral Chain Runners (#587)
sparkplug0025 Oct 27, 2021
eb9568f
Add AtomicHub NFTs queries to Microchain (#581)
sparkplug0025 Oct 28, 2021
b2e7f18
Member detail page refactors (#592)
brandonfancher Oct 29, 2021
93a4e79
Init SHiP receiver
sparkplug0025 Oct 27, 2021
91e6250
Init SHiP on microchain
sparkplug0025 Oct 27, 2021
64560c2
SHiP receiver cleanup and Transaction Handling
sparkplug0025 Oct 28, 2021
b998827
Fix block appends
sparkplug0025 Oct 28, 2021
cbd9520
Working SHiP
sparkplug0025 Oct 29, 2021
c1703b4
Address PR reviews and add SHIP config
sparkplug0025 Oct 29, 2021
e2f749f
Refactor microchain ship transactions
sparkplug0025 Oct 29, 2021
36dcafb
Fix build and update runner
sparkplug0025 Oct 30, 2021
d7f2f44
Address PR review feedback
sparkplug0025 Nov 2, 2021
31a5794
Merge pull request #591 from eoscommunity/sparkplug0025/box-receivers
tbfleming Nov 2, 2021
5cf120a
Merge remote-tracking branch 'origin/main' into subchain-package
tbfleming Nov 2, 2021
e76f8ef
build issues
tbfleming Nov 2, 2021
b6bb398
Merge pull request #556 from eoscommunity/subchain-package
tbfleming Nov 2, 2021
cf58171
Ephemeral CI (#595)
sparkplug0025 Nov 4, 2021
918b53c
Completes induction with file uploads (#569)
sparkplug0025 Nov 5, 2021
0cf518f
repair formatting
tbfleming Nov 6, 2021
35247d6
Implement runner checkpoint option (#599)
sparkplug0025 Nov 9, 2021
50e0bc2
Remove transfer action and change tests that depend on it to use sett…
swatanabe Nov 10, 2021
371eabe
Inductions query in the Microchain (#600)
sparkplug0025 Nov 11, 2021
3b5273f
Adds endorsing status on microchain (#601)
sparkplug0025 Nov 11, 2021
397b4a0
Merge pull request #602 from eoscommunity/no-transfer
swatanabe Nov 11, 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
150 changes: 83 additions & 67 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ jobs:
- name: show_cache
if: steps.filter.outputs.src == 'true'
id: show_cache
run: echo "${{ runner.os }}-ccache_whole-${{ steps.ccache_cache_timestamp.outputs.timestamp }}"
run: |
echo "${{ runner.os }}-ccache_whole-${{ steps.ccache_cache_timestamp.outputs.timestamp }}"
echo "${{ runner.os }}-product_cache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}"

- name: ccache cache files
if: steps.filter.outputs.src == 'true'
Expand All @@ -84,6 +86,14 @@ jobs:
restore-keys: |
${{ runner.os }}-ccache_whole-

- name: product cache files
uses: actions/[email protected]
with:
path: product_cache
key: ${{ runner.os }}-product_cache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: |
${{ runner.os }}-product_cache-

- name: 🛠 Build
if: steps.filter.outputs.src == 'true'
run: |
Expand All @@ -104,6 +114,22 @@ jobs:
make -j$(nproc)

tar czf clsdk-ubuntu-20-04.tar.gz clsdk
rm -rf ../product_cache
mkdir -p ../product_cache
cp clsdk-ubuntu-20-04.tar.gz ../product_cache
cp atomicassets.abi ../product_cache
cp atomicassets.wasm ../product_cache
cp atomicmarket.abi ../product_cache
cp atomicmarket.wasm ../product_cache
cp bios.wasm ../product_cache
cp boot.wasm ../product_cache
cp eden-micro-chain.wasm ../product_cache
cp eden.abi ../product_cache
cp eden.wasm ../product_cache
cp run-full-election.wasm ../product_cache
cp run-genesis.wasm ../product_cache
cp token.abi ../product_cache
cp token.wasm ../product_cache

echo =====
ls -la ${GITHUB_WORKSPACE}
Expand All @@ -124,22 +150,38 @@ jobs:
ccache.log

- name: 📃 Upload clsdk
if: steps.filter.outputs.src == 'true'
uses: actions/upload-artifact@v2
with:
name: clsdk
path: |
build/clsdk-ubuntu-20-04.tar.gz
product_cache/clsdk-ubuntu-20-04.tar.gz

- name: 📃 Upload Eden Smart Contract
if: steps.filter.outputs.src == 'true'
uses: actions/upload-artifact@v2
with:
name: Eden Smart Contract
path: |
build/eden.abi
build/eden.wasm
build/eden-micro-chain.wasm
product_cache/eden.abi
product_cache/eden.wasm
product_cache/eden-micro-chain.wasm

- name: 📃 Upload Ephemeral Eden Chains Runners
uses: actions/upload-artifact@v2
with:
name: Ephemeral Eden Chains Runners
path: |
product_cache/atomicassets.abi
product_cache/atomicassets.wasm
product_cache/atomicmarket.abi
product_cache/atomicmarket.wasm
product_cache/bios.wasm
product_cache/boot.wasm
product_cache/eden.abi
product_cache/eden.wasm
product_cache/token.abi
product_cache/token.wasm
product_cache/run-genesis.wasm
product_cache/run-full-election.wasm

build-micro-chain:
name: Build Micro Chain
Expand Down Expand Up @@ -211,57 +253,6 @@ jobs:
path: |
build/eden-micro-chain.wasm

box-e2e:
needs: build-micro-chain
name: Eden Box E2E Tests
runs-on: ubuntu-latest

steps:
- name: ✅ Checkout code
uses: actions/checkout@v2

- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
src:
- ".github/workflows/build.yml"

- ".eslintignore"
- ".eslintrc.js"
- ".prettierrc.json"
- "lerna.json"
- "package.json"
- "packages/common/**"
- "tsconfig.build.json"
- "tsconfig.json"
- "yarn.lock"

- "docker/eden-box.Dockerfile"
- "packages/box/**"

- name: Download Eden Microchain
if: steps.filter.outputs.src == 'true'
uses: actions/download-artifact@v2
with:
name: Eden Microchain
path: build

- name: 🛠 Build and Start Box
if: steps.filter.outputs.src == 'true'
run: |
export SUBCHAIN_DFUSE_PREVENT_CONNECT=1
yarn
yarn build --stream
cd packages/box
yarn start &

- name: 🧪 Run E2E
if: steps.filter.outputs.src == 'true'
# TODO: add real E2E tests... for now it's just a shameless curl ping
run: |
curl localhost:3032

box-build:
needs: build-micro-chain
name: Build Eden Box
Expand Down Expand Up @@ -336,9 +327,9 @@ jobs:
tags: ${{ steps.prep.outputs.tags }}
context: .

webapp-e2e:
needs: build-micro-chain
name: WebApp E2E Tests
e2e:
needs: [build-cpp, build-micro-chain]
name: E2E Tests
environment: e2e_tests
runs-on: ubuntu-latest

Expand All @@ -363,8 +354,8 @@ jobs:
- "tsconfig.json"
- "yarn.lock"

- "docker/eden-webapp.Dockerfile"
- "packages/webapp/**"
- "packages/**"
- "contracts/**"

- name: Download Eden Microchain
if: steps.filter.outputs.src == 'true'
Expand All @@ -373,20 +364,45 @@ jobs:
name: Eden Microchain
path: build

- name: Download Ephemeral Chain Runners
if: steps.filter.outputs.src == 'true'
uses: actions/download-artifact@v2
with:
name: Ephemeral Eden Chains Runners
path: build

- name: Download clsdk
if: steps.filter.outputs.src == 'true'
uses: actions/download-artifact@v2
with:
name: clsdk
path: build

- name: Start Genesis Ephemeral Chain
if: steps.filter.outputs.src == 'true'
run: |
cp ./scripts/eden_chain_runner.sh ./build
cd build
tar -xvf clsdk-ubuntu-20-04.tar.gz clsdk/bin
ls -la
sh -x ./eden_chain_runner.sh run-genesis.wasm

- name: 🛠 Build and Start WebApp
if: steps.filter.outputs.src == 'true'
run: |
export SUBCHAIN_DFUSE_PREVENT_CONNECT=1
export DFUSE_PREVENT_CONNECT=1
export NODE_ENV=test
env
yarn
yarn build --stream --ignore @edenos/example-history-app
yarn start --stream --ignore @edenos/example-history-app &
yarn start-test --stream --ignore @edenos/example-history-app &
env:
IPFS_PINATA_JWT: ${{ secrets.IPFS_PINATA_JWT }}

- name: 🧪 Run E2E
if: steps.filter.outputs.src == 'true'
run: |
yarn test --stream
env:
cypress_test_users_pk: ${{ secrets.CYPRESS_TEST_USERS_PK }}

- name: 🎥 Upload Cypress Results
if: always() && steps.filter.outputs.src == 'true'
Expand Down
21 changes: 13 additions & 8 deletions contracts/eden/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,28 @@ add_custom_command(TARGET eden-abigen POST_BUILD
COMMAND ${ROOT_BINARY_DIR}/cltester eden-abigen.wasm >${ROOT_BINARY_DIR}/eden.abi
)

function(add_test_eden suffix)
add_executable(test-eden${suffix} tests/test-eden.cpp src/globals.cpp src/accounts.cpp src/members.cpp src/atomicassets.cpp src/elections.cpp)
target_include_directories(test-eden${suffix} PUBLIC include)
target_include_directories(test-eden${suffix} PUBLIC
function(add_test_eden test_file suffix)
add_executable(${test_file}${suffix} tests/${test_file}.cpp src/globals.cpp src/accounts.cpp src/members.cpp src/atomicassets.cpp src/elections.cpp)
target_include_directories(${test_file}${suffix} PUBLIC include)
target_include_directories(${test_file}${suffix} PUBLIC
../token/include
../boot/include
../../external/atomicassets-contract/include
../../libraries/clchain/include
./tests/include
)
target_link_libraries(test-eden${suffix} catch2 cltestlib${suffix})
set_target_properties(test-eden${suffix} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${ROOT_BINARY_DIR})
target_link_libraries(${test_file}${suffix} catch2 cltestlib${suffix})
set_target_properties(${test_file}${suffix} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${ROOT_BINARY_DIR})
endfunction()

add_test_eden("")
add_test_eden("-debug")
add_test_eden("test-eden" "")
add_test_eden("test-eden" "-debug")
eden_tester_test(test-eden)

# Chain Runners
add_test_eden("run-genesis" "")
add_test_eden("run-full-election" "")

file(CREATE_LINK ${CMAKE_CURRENT_SOURCE_DIR}/tests/data ${ROOT_BINARY_DIR}/eden-test-data SYMBOLIC)

function(add_eden_microchain suffix)
Expand Down
3 changes: 0 additions & 3 deletions contracts/eden/include/eden.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ namespace eden

void donate(eosio::name payer, const eosio::asset& quantity);

void transfer(eosio::name to, const eosio::asset& quantity, const std::string& memo);

void genesis(std::string community,
eosio::symbol community_symbol,
eosio::asset minimum_donation,
Expand Down Expand Up @@ -195,7 +193,6 @@ namespace eden
"eden.gm"_n,
action(withdraw, owner, quantity, ricardian_contract(withdraw_ricardian)),
action(donate, owner, quantity),
action(transfer, to, quantity, memo),
action(fundtransfer, from, distribution_time, rank, to, amount, memo),
action(usertransfer, from, to, amount, memo),
action(genesis,
Expand Down
14 changes: 0 additions & 14 deletions contracts/eden/src/actions/accounts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,6 @@ namespace eden
}
}

void eden::transfer(eosio::name to, const eosio::asset& quantity, const std::string& memo)
{
require_auth(get_self());
accounts internal{get_self(), "owned"_n};
setup_distribution(get_self(), internal);
internal.sub_balance("master"_n, quantity);
accounts{get_self(), "outgoing"_n}.add_balance(to, quantity, false);
eosio::action{{get_self(), "active"_n},
token_contract,
"transfer"_n,
std::tuple(get_self(), to, quantity, memo)}
.send();
}

void eden::withdraw(eosio::name owner, const eosio::asset& quantity)
{
require_auth(owner);
Expand Down
Loading