Elements Manual
Elements 2 Manual
Elements 2 Manual
  • Welcome 👋
  • QUICK START
    • Elements in Five Minutes or Less
  • General
    • General Concepts
    • N-Tier Architecture
    • Security Model
  • SCRIPTING ENGINE
    • Scripting Engine Overview
      • Intro to Resources and Cloud Functions
      • Horizontal Scaling Model
      • Database Access
      • Server-to-Server API Calls
      • Deploy Cloud Functions via Git
      • Creating and Destroying Resources
      • Cross-Resource Invocation
      • Indexing Resources
      • Coroutines
      • Manifest
  • Core Features
    • Core API Overview
    • Sessions
    • Applications
      • Facebook Application Configuration
      • Firebase Application Configuration
      • Amazon GameOn Application Configuration
      • iOS Application Configuration
      • Android Application Configuration
      • Matchmaking Application Configuration [deprecated]
    • Users and Profiles
    • Digital Goods
    • Progress and Missions
    • Leaderboards
    • Matchmaking
    • Followers
    • Friends
    • Reward Issuance
    • Push Notifications
    • Auth Schemes
    • Save Data
    • Schemas and Metadata Specifications
    • Queries
      • Base Query Syntax
      • Boolean Queries
      • Object Graph Navigation
      • Advanced Operators
        • .ref
        • .name
  • Web 3
    • Omni Chain Support
    • Vaults
    • Wallets
    • Smart Contracts
      • Smart Contracts: Ethereum
      • Smart Contracts: Flow
      • Smart Contracts: Solana
      • Smart Contracts: Neo
    • Know Your Customer
      • Formidium
  • CONFIGURATION
    • Using the Web Console
    • iOS and Android Product Bundles
    • Direct Database Access and Batch Configuration
  • UNITY PLUG-INS
    • Unity Plugin
    • Content Delivery Management and Unity CDN Plugin
  • DEPLOYMENT
    • Deployment Overview
      • Docker Containers
      • AWS Deployment
      • Standalone docker-compose
  • LUA SAMPLES
    • lua Samples
      • main.lua
      • event.lua
      • hello_world.lua
      • model.lua
      • startup.lua
      • HTTP Manifest
        • Example endpoint handler
        • Example operations table
  • RESTful APIs
    • Swagger and Swagger UI
    • Elements 3.0.X (Preview)
      • Applications
      • Friends and Followers
      • Digital Goods and Inventory
      • Leaderboards
      • Missions and Rewards
      • User and Profiles
      • Save Data
      • Custom Metadata
Powered by GitBook
On this page
  • Data Model
  • Smart Contract Addresses
  • Vault's Relationship to Smart Contracts
  1. Web 3

Smart Contracts

Elements fully supports blockchain Smart Contracts, allowing developers to create fully custom applications performing advanced operations on multiple blockchains at once.

PreviousWalletsNextSmart Contracts: Ethereum

Last updated 11 months ago

Most blockchains use are programmable, allowing developers to customize the operations performed by the nodes on the chain. Common tasks for smart contracts include simple fungible token transfer, sale or transfer of , and operations.

Unfortunately, execution and management of Smart Contracts for your web3 game or application requires complex configuration, attention to security detail, and careful management of infrastructure. What makes this more challenging is that there are multiple competing standards for the development and execution of smart contracts leaving developers to deal with multiple desperate SDKs and tools.

Elements solves this problem by providing a single point to track and manage smart contracts across multiple chains and SDKs. With tie-ins to the lua based Scripting Engine.

Data Model

The Smart Contract management system allows you to track the metadata necessary to operate against smart contracts deployed to the blockchain of your choice. A single smart contract consists of the following general properties:

Smart Contract Addresses

Each Blockchain API has specific requirements for addresses. Though some chains refer to a smart contract as having an address, this is not universally true across all chains. Elements uses the term "address" to refer to the singular identifier of a particular contract. The following subsections define the address semantics of each supported API.

Vault's Relationship to Smart Contracts

As the developer of a web3 application or game, you will likely have to pay transaction (or "gas fees") to perform write operations against the chain. In order to accomplish this automatically, you must fund and supply the private key of the wallet associated with your smart contract. Elements' secure vault system ensures that the funds stored in the wallet are safe, while providing the convenience of not having to manually verify each transaction against the chain.

addresses - A mapping of blockchain network identifiers to the smart contract addresses. The specific semantics of a smart contract address vary per chain and API. See below for specifics on each network.

vault - Reference to the which Elements will use to operate against the contract.

In order to sign new transactions, which is essentially executing smart contract code which writes to the blockchain, the signing wallet must pay a fee to the node which wins the opportunity to execute the transaction. Ethereum coined the term "" to describe this concept, and often times the term is colloquially applied to other unrelated networks as well.

Omni Vault
gas fee
Smart Contract Addresses
non-fungible tokens (NFTs)
Decentralized Finance (DeFi)
id
name
metadata
display name