Skip to content

Commit

Permalink
Merge pull request #48 from FuelLabs/SilentCicero-prod-patch
Browse files Browse the repository at this point in the history
Quick constants production patch.
  • Loading branch information
SilentCicero authored Mar 16, 2024
2 parents 1ff6fc1 + cf9b1c0 commit a2aa012
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions app/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
export const FUEL_GREEN = '#00f58c';

// TODO: Determine the URL based on the NODE_ENV.
// export const SERVER_URI = 'https://api.sway-playground.org';
export const SERVER_URI = 'http://0.0.0.0:8080';
export const SERVER_URI = 'https://api.sway-playground.org';
// export const SERVER_URI = 'http://0.0.0.0:8080';

export const DEFAULT_SWAY_CONTRACT = `contract;
abi TestContract {
abi Counter {
#[storage(read, write)]
fn increment_counter(amount: u64) -> u64;
fn increment(amount: u64) -> u64;
#[storage(read)]
fn get_counter() -> u64;
fn get() -> u64;
}
storage {
counter: u64 = 0,
}
impl TestContract for Contract {
impl Counter for Contract {
#[storage(read, write)]
fn increment_counter(amount: u64) -> u64 {
fn increment(amount: u64) -> u64 {
let incremented = storage.counter.read() + amount;
storage.counter.write(incremented);
incremented
}
#[storage(read)]
fn get_counter() -> u64 {
fn get() -> u64 {
storage.counter.read()
}
}`;
Expand All @@ -37,19 +37,11 @@ export const DEFAULT_SOLIDITY_CONTRACT = `pragma solidity ^0.8.24;
contract Counter {
uint64 public count;
// Function to get the current count
function get_counter() public view returns (uint64) {
function get() public view returns (uint64) {
return count;
}
// Function to increment count by 1
function increment_counter() public {
function increment() public {
count += 1;
}
// Function to decrement count by 1
function dec() public {
// This function will fail if count = 0
count -= 1;
}
}`;

0 comments on commit a2aa012

Please sign in to comment.