Skip to content

Instantly share code, notes, and snippets.

View paulbellamy's full-sized avatar

Paul Bellamy paulbellamy

View GitHub Profile
@paulbellamy
paulbellamy / cap-38-changes.markdown
Last active September 1, 2021 15:15 — forked from JakeUrban/sep10-changes
CAP-38 AMM Changes

We've just released v6.0.1, of the SDF Javascript base library.

It includes changes to implement CAP-38, supporting automated market makers.

These changes will be released with the protocol v18 upgrade.

There are some further notes on the changes API endpoints, with mock responses, on this APIary. Further notes on the API changes are available in this document.

  • Each SDK must update to enable depositing, and withdrawing from liquidity pools.
  • SDKs must also update to include the new effect types, as well as new fields on Accounts.
@paulbellamy
paulbellamy / bucket.rb
Created May 2, 2012 16:23 — forked from bjpirt/bucket.rb
Quick bucketing of PG logs
#!/usr/bin/env ruby
module Enumerable
# sum of an array of numbers
def sum
return self.inject(0){|acc,i|acc +i}
end
# average of an array of numbers
def average