Skip to content

Commit

Permalink
chore: final cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
thepiwo committed Apr 29, 2024
1 parent 3dd1a5e commit c20c0f2
Show file tree
Hide file tree
Showing 13 changed files with 43 additions and 200 deletions.
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion aepp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ COPY --chown=node:node . /home/node/app
ARG COMMAND
RUN npm run build:$COMMAND

FROM nginx:1.13.7-alpine
FROM nginx:alpine
COPY ./nginx/nginx.conf /etc/nginx/nginx.conf
COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf
COPY --from=aepp-build /home/node/app/dist /usr/share/nginx/html
21 changes: 19 additions & 2 deletions aepp/src/utils/aeternityNetwork.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import BlockchainUtil from '../utils/blockchainUtil'
import config from '../config'
import GraffitiAuctionACI from '../utils/GraffitiAuctionACI'

const tempCallOptions = {gas: 100000000000};

export const nodes = [
{name: 'ae_mainnet', instance: new Node(config.nodeUrl.ae_mainnet)},
Expand All @@ -17,7 +16,6 @@ const aeternity = {
height: null,
networkId: null,
static: false,
tempCallOptions: tempCallOptions,
}

aeternity.updateHeight = async () => {
Expand Down Expand Up @@ -45,6 +43,25 @@ aeternity.initProvider = async () => {
})

//debugger;

/*
//for out of gas failures consider using something like
class CustomNode extends Node {
sendOperationRequest(args, spec) {
if (spec.path === '/v3/dry-run') {
spec = {
...spec,
path: 'http://localhost:3113/v3/debug/transactions/dry-run',
};
}
return super.sendOperationRequest(args, spec);
}
}
// call option: { gasMax: 6e10 }
*/

//aeternity.client.api.protectedDryRunTxs = aeternity.client.api.dryRunTxs;

return true
Expand Down
2 changes: 1 addition & 1 deletion aepp/src/views/Overview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
async updateSlots() {
try {
const slots = await aeternity.contract.all_auction_slots(aeternity.tempCallOptions)
const slots = await aeternity.contract.all_auction_slots()
const height = await aeternity.height
Expand Down
2 changes: 1 addition & 1 deletion aepp/src/views/Slots.vue
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
this.choice = this.slots.find(slot => slot.index === realIndex).id
},
async updateSlots () {
const allSlots = await aeternity.contract.all_auction_slots(aeternity.tempCallOptions)
const allSlots = await aeternity.contract.all_auction_slots()
// For rendering purposes
this.height = await aeternity.updateHeight()
Expand Down
16 changes: 0 additions & 16 deletions aeternity-nginx.conf

This file was deleted.

17 changes: 0 additions & 17 deletions aeternity.yaml

This file was deleted.

72 changes: 0 additions & 72 deletions docker-compose.yml

This file was deleted.

34 changes: 0 additions & 34 deletions server-nginx-cors.conf

This file was deleted.

15 changes: 0 additions & 15 deletions server-nginx.conf

This file was deleted.

7 changes: 1 addition & 6 deletions server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
FROM node:20

RUN apt update
RUN apt install -y software-properties-common ca-certificates wget curl ssh git python build-essential

WORKDIR /app
COPY . /app

RUN npm install
RUN npm ci

RUN apt purge -y software-properties-common ca-certificates wget curl ssh git python build-essential && apt autoremove -y
ENV OPENSSL_CONF=/dev/null
CMD ["node", "server.js"]
22 changes: 20 additions & 2 deletions server/src/blockchain.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,32 @@ blockchain.height = async () => {
blockchain.getMetaData = async () => {
if (!client) await blockchain.init();

const response = await contract.get_auction_metadata(tempCallOptions).catch(console.error);
const response = await contract.get_auction_metadata().catch(console.error);
return response.decodedResult
};

blockchain.auctionSlots = async () => {
if (!client) await blockchain.init();

const response = await contract.all_auction_slots(tempCallOptions).catch(console.error);
/*
//for out of gas failures consider using something like
class CustomNode extends Node {
sendOperationRequest(args, spec) {
if (spec.path === '/v3/dry-run') {
spec = {
...spec,
path: 'http://localhost:3113/v3/debug/transactions/dry-run',
};
}
return super.sendOperationRequest(args, spec);
}
}
// call option: { gasMax: 6e10 }
*/

const response = await contract.all_auction_slots().catch(console.error);
return response.decodedResult;
};

Expand Down

0 comments on commit c20c0f2

Please sign in to comment.