{"id":45073501,"url":"https://github.com/soliscript/soliscript","last_synced_at":"2026-02-19T13:00:58.450Z","repository":{"id":14702342,"uuid":"17422534","full_name":"soliscript/soliscript","owner":"soliscript","description":"soliscript - run blockchain contracts in rubidity (with 100%-solidity compatible data types \u0026 abis) on an ethereum simulacrum in your own home for fun \u0026 profit (for free)","archived":false,"fork":false,"pushed_at":"2023-10-10T16:53:53.000Z","size":30,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-14T00:19:41.214Z","etag":null,"topics":["abi","blockchain","ethereum","rubidity","simulacrum","solidity","soliscript","uint256"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soliscript.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2014-03-05T00:32:10.000Z","updated_at":"2023-10-10T16:51:39.000Z","dependencies_parsed_at":"2022-09-23T22:41:32.294Z","dependency_job_id":null,"html_url":"https://github.com/soliscript/soliscript","commit_stats":null,"previous_names":["persondb/person.db.ruby","soliscript/soliscript","persondb/person.db.models"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/soliscript/soliscript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soliscript%2Fsoliscript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soliscript%2Fsoliscript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soliscript%2Fsoliscript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soliscript%2Fsoliscript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soliscript","download_url":"https://codeload.github.com/soliscript/soliscript/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soliscript%2Fsoliscript/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29614585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T10:52:55.328Z","status":"ssl_error","status_checked_at":"2026-02-19T10:52:26.323Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["abi","blockchain","ethereum","rubidity","simulacrum","solidity","soliscript","uint256"],"created_at":"2026-02-19T13:00:34.877Z","updated_at":"2026-02-19T13:00:58.427Z","avatar_url":"https://github.com/soliscript.png","language":"Ruby","readme":"# Soliscript\n\nsoliscript - run blockchain contracts in rubidity (with 100%-solidity compatible data types \u0026 abis) on an ethereum simulacrum in your own home for fun \u0026 profit (for free)\n \n\n* home  :: [github.com/soliscript/soliscript](https://github.com/soliscript/soliscript)\n* bugs  :: [github.com/soliscript/soliscript/issues](https://github.com/soliscript/soliscript/issues)\n* gem   :: [rubygems.org/gems/soliscript](https://rubygems.org/gems/soliscript)\n* rdoc  :: [rubydoc.info/gems/soliscript](http://rubydoc.info/gems/soliscript)\n\n\n\n## What's Solidity?!  What's Rubidity?!\n\nSee [**Solidity - Contract Application Binary Interface (ABI) Specification** »](https://docs.soliditylang.org/en/latest/abi-spec.html)\n\nSee [**Rubidity - Ruby for Layer 1 (L1) Contracts / Protocols with \"Off-Chain\" Indexer**  »](https://github.com/s6ruby/rubidity)\n\n\n\n## Usage\n\nLet's try the contract samples from \nthe free (online) booklet titled [\"Programming Crypto Blockchain Contracts Step-by-Step Book / Guide\"](https://github.com/s6ruby/programming-crypto-contracts)\nin Soliscript (Rubidity with Ethereum Simulacrum)!\n\n\n\n\n### Simple Ponzi - Investment of a Lifetime!\n\nLet's start with a simple ponzi scheme contract:\n\n\n``` ruby\nclass SimplePonzi \u003c Contract\n\n    storage current_investor:   Address,\n            current_investment: UInt\n\n\n    sig []\n    def constructor\n      @current_investor  = msg.sender\n    end\n\n    sig [] \n    def receive         # @payable default function\n      minimum_investment = @current_investment * 11/10\n      assert  msg.value \u003e= minimum_investment, \n             'new investments must be 10% greater than current'  \n  \n      # record new investor\n      previous_investor   = @current_investor\n      @current_investor   = msg.sender\n      @current_investment = msg.value\n  \n      # pay out previous investor\n      previous_investor.send( msg.value )\n    end\n  \nend # class SimplPonzi\n```\n\n(Source: [`ponzi_simple.rb`](sandbox/ponzi_simple.rb))\n\n\nLet's look at the first simple ponzi contract script. The idea is:\n\nThe money sent in by the latest investor\ngets paid out to the previous investor and because every\nnew investment must be at least 10% larger than the last\ninvestment - EVERY INVESTOR WINS! (*)\n\n(*): Except the last \"sucker\" is HODLing the bag waiting for a greater fool.\n\n\nLet's setup some test accounts with funny money:\n\n``` ruby\ngenesis   = '0x'+'11'*20  #=\u003e '0x1111111111111111111111111111111111111111'\nalice     = '0x'+'aa'*20  #=\u003e '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'\nbob       = '0x'+'bb'*20  #=\u003e '0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'\ncharlie   = '0x'+'cc'*20  #=\u003e '0xcccccccccccccccccccccccccccccccccccccccc'\n\n## setup test accounts with starter balance\nAccount[ genesis ].balance   = 0\nAccount[ alice   ].balance   = 1_000_000\nAccount[ bob     ].balance   = 1_000_000\nAccount[ charlie ].balance   = 1_000_000\n\n## (pp) pretty print  all known accounts with balance\npp Account.all\n```\n\n(Source: [`run_ponzi_simple.rb`](sandbox/run_ponzi_simple.rb))\n\n\nprinting:\n\n```\n[#\u003caccount 0x1111...111111 @balance=0,       @nonce=0,\n #\u003caccount 0xaaaa...aaaaaa @balance=1000000, @nonce=0,\n #\u003caccount 0xbbbb...bbbbbb @balance=1000000, @nonce=0,\n #\u003caccount 0xcccc...cccccc @balance=1000000, @nonce=0]\n```\n\n\n\n\nAnd let's invest:\n\n``` ruby\n## genesis - create contract\nponzi = Simulacrum.send_transaction( from: genesis, data: SimplePonzi ).contract\n#=\u003e #\u003cSimplePonzi @current_investment=0, @current_investor=\"0x1111\"\u003e\n\nSimulacrum.send_transaction( from: alice, to: ponzi, value: 100_000 )\n#=\u003e #\u003cSimplePonzi @current_investment=100000, @current_investor=\"0xaaaa\"\u003e\n\nSimulacrum.send_transaction( from: bob, to: ponzi, value: 111_000 )\n#=\u003e #\u003cSimplePonzi @current_investment=111000, @current_investor=\"0xbbbb\"\u003e\n\nSimulacrum.send_transaction( from: charlie, to: ponzi, value: 200_000 )\n#=\u003e #\u003cSimplePonzi @current_investment=200000, @current_investor=\"0xcccc\"\u003e\n\n## (pp) pretty print all known accounts with balance\npp Account.all\n```\n\nResulting in:\n\n```\n[#\u003caccount 0x1111...111111 @balance=100000,  @nonce=1,\n #\u003caccount 0xaaaa...aaaaaa @balance=1011000, @nonce=1,\n #\u003caccount 0xbbbb...bbbbbb @balance=1089000, @nonce=1,\n #\u003caccount 0xcccc...cccccc @balance=800000,  @nonce=1]\n```\n\nThe \"Genesis\" `0x1111` account made a 100000 X profit of 100000 out-of-thin air.\nThe \"Alice\" `0xaaaa` account made an investment of 100000 and got 111000. 11000 profit! Yes, it works!\nThe \"Bob\" `0xbbbb` account made an investment of 111000 and got 200000. 89000 profit! Yes, it works!\nThe \"Charlie\" `0xcccc` account is still waiting for a greater fool and is HODLing the bag.\nTo the moon!\n\n\nAnd so on.  To be continued ...\n\n\n\n\n\n\n\n## Bonus - More Blockchain (Crypto) Tools, Libraries \u0026 Scripts In Ruby\n\nSee [**/rubidity**](https://github.com/s6ruby/rubidity) at the small, smart, secure, safe, solid \u0026 sound ruby (s6ruby) org.\n\nSee [**/blockchain**](https://github.com/rubycocos/blockchain) \nat the ruby code commons (rubycocos) org.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoliscript%2Fsoliscript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoliscript%2Fsoliscript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoliscript%2Fsoliscript/lists"}