# *Week 17 & 18 at Blockfuse Labs Cohort 3 Bootcamp: Building for Base Batch 002 Hackathon and Beyond*
As a participant in the Blockfuse Labs Cohort 3 Bootcamp, I've had the opportunity to dive deeper into the world of blockchain development and build innovative projects. In this article, I'll be sharing my experience from Weeks 17 and 18, where I worked on building Ajo, a community saving platform on-chain, and explored advanced topics like gasless token transactions and upgradable proxy contracts.
## *Week 17: Building for Base Batch 002 Hackathon*
Week 17 was all about building Ajo, a community saving platform on-chain. The platform allows users to create and manage savings groups, set financial goals, and track progress. By leveraging blockchain technology, Ajo provides a secure, transparent, and decentralized way for communities to save and manage their funds.
Some of the key features of Ajo include:
- *On-chain savings groups*: Users can create and join savings groups, and track their progress in real-time.
- *Decentralized fund management*: Ajo uses smart contracts to manage funds, ensuring that transactions are secure and transparent.
- *Community engagement*: Users can interact with each other, share financial tips, and motivate each other to reach their savings goals.
Building Ajo was a challenging but rewarding experience. I learned a lot about building on-chain applications and the importance of user experience in blockchain development.
## *Week 18: Exploring Advanced Topics*
In Week 18, I explored advanced topics like gasless token transactions and upgradable proxy contracts. These topics are crucial for building scalable and user-friendly blockchain applications.
- *Gasless Token Transactions*: Gasless token transactions allow users to transfer tokens without paying gas fees. This is achieved through meta-transactions, where a third-party service pays the gas fees on behalf of the user.
- *Upgradable Proxy Contracts*: Upgradable proxy contracts enable developers to upgrade the logic of a smart contract without changing its address. This is useful for fixing bugs, adding new features, or modifying existing functionality.
- *Simple Bytecode Contract*
A simple bytecode contract is a contract that contains bytecode that can be executed on the Ethereum Virtual Machine (EVM). Here's an example of a simple bytecode contract in Solidity:
pragma solidity ^0.8.0;
contract SimpleBytecodeContract {
constructor() payable {}
fallback() external payable {}
function getBalance() public view returns (uint256) {
return address(this).balance;
}
}
- *Precompute Contract Address with CREATE2*
CREATE2 is an opcode in the EVM that allows developers to precompute the address of a contract before it's deployed. This can be useful for a variety of use cases, such as creating a contract that needs to interact with another contract that hasn't been deployed yet.
Here's an example of how to precompute a contract address using CREATE2:
pragma solidity ^0.8.0;
contract PrecomputeContractAddress {
function precomputeAddress(address deployer, bytes32 salt, bytes memory bytecode) public pure returns (address) {
bytes32 hash = keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, keccak256(bytecode)));
return address(uint160(uint256(hash)));
}
}
- *Minimal Proxy Contract*
A minimal proxy contract is a contract that delegates all calls to a logic contract. This can be useful for reducing gas costs and improving contract upgradability.
Here's an example of a minimal proxy contract:
pragma solidity ^0.8.0;
contract MinimalProxyContract {
address public implementation;
constructor(address _implementation) {
implementation = _implementation;
}
fallback() external payable {
assembly {
let target := implementation
calldatacopy(0, 0, calldatasize())
let result := delegatecall(gas(), target, 0, calldatasize(), 0, 0)
return(0, returndatasize())
}
}
}
- *Upgradeable Proxy Contract*
An upgradeable proxy contract is a contract that allows the implementation contract to be upgraded. This can be useful for fixing bugs or adding new features to a contract.
Here's an example of an upgradeable proxy contract:
pragma solidity ^0.8.0;
contract UpgradeableProxyContract {
address public implementation;
address public admin;
constructor(address _implementation, address _admin) {
implementation = _implementation;
admin = _admin;
}
modifier onlyAdmin() {
require(msg.sender == admin, "Only the admin can upgrade the implementation");
_;
}
function upgradeImplementation(address _newImplementation) public onlyAdmin {
implementation = _newImplementation;
}
fallback() external payable {
assembly {
let target := implementation
calldatacopy(0, 0, calldatasize())
let result := delegatecall(gas(), target, 0, calldatasize(), 0, 0)
return(0, returndatasize())
}
}
}
Learning about these advanced topics has given me a deeper understanding of the capabilities and limitations of blockchain technology. I'm excited to apply these concepts to future projects and continue building innovative applications.
*Conclusion*
Weeks 17 and 18 at Blockfuse Labs Cohort 3 Bootcamp have been an incredible experience. I've learned a lot about building on-chain applications, gasless token transactions, and upgradable proxy contracts. I'm grateful for the opportunity to work on projects like Ajo and explore advanced topics in blockchain development.
If you're interested in learning more about blockchain development or want to collaborate on a project, feel free to reach out. Let's build the future of blockchain together!